/** * check receive mode * @return boolean * @param $param, array */ public static function checkGoodsReceiveModes($params, $accountId) { $receiveModes = [self::RECEIVE_MODE_EXPRESS, self::RECEIVE_MODE_SELF]; $idList = self::getGoodsIdList($params, $accountId); $where = ['_id' => ['$in' => $idList], 'receiveModes' => ['$in' => $receiveModes]]; $count = Goods::count($where); if ($count != count($idList)) { return false; } return true; }