Commit a27d09e3 authored by suntengda's avatar suntengda

update 拼单小程序活动列表新版接口 活动推荐修改

parent 02b33655
......@@ -415,15 +415,16 @@ class MarketingService
* @return \Api\PhpUtils\Mysql\MysqlBase|array
* @throws InterfaceException
*/
public static function pindanActiveBasicList($excludeMarketingId='',$limit=2,$needSkuList=true)
public static function pindanActiveBasicList($excludeMarketingId='',$limit=1,$needSkuList=true)
{
!empty($excludeMarketingId) && $limit += 1;//查询结果需要排除掉传递的活动,所以需要多取一条
$queryLimit = 1;
!empty($excludeMarketingId) && $queryLimit += 1;//查询结果需要排除掉传递的活动,所以需要多取一条
$where["marketing_type"] = Marketing::MARKETING_TYPE_PINDAN;
$where['online_status'] = Marketing::ONLINE_STATUS_QIDONG;
$where += self::getStartEndTimeFilter(MarketingPindan::ACTIVITY_STATUS_IN_PROGRESS);
$where['life_account_id'] = self::getPublicLifeAccountId();
$where['ORDER'] = ['end_time' => 'ASC','marketing_id'=>'ASC'];
$where['LIMIT'] = [0, $limit];
$where['LIMIT'] = [0, $queryLimit];
$list = Marketing::select(['marketing_id', 'marketing_name','start_time','end_time'], $where);
if(empty($list)) {
......@@ -448,7 +449,7 @@ class MarketingService
unset($value);
}
$list = array_slice($list,0);
$list = array_slice($list,0, $limit);
return $list;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment