setter
parent
0fbd584ac0
commit
355bfa7bc8
|
@ -181,6 +181,7 @@ class Consumer extends Base
|
|||
* */
|
||||
public function advertisement()
|
||||
{
|
||||
|
||||
$repo = OperationRepository::getInstance();
|
||||
|
||||
$orders = ['sort'=>'asc'];
|
||||
|
@ -202,10 +203,13 @@ class Consumer extends Base
|
|||
return $this->json(4001,"优惠券商家不存在");
|
||||
}
|
||||
|
||||
|
||||
//如果优惠券所属商家指派了渠道商
|
||||
if ($coupon->business->is_assign == Business::COMMON_ON && !empty($coupon->business->agency_code)) {
|
||||
|
||||
$agency = Member::findOne([["business_code","=",$coupon->business->agency_code]]);
|
||||
if(empty($agency)){
|
||||
|
||||
if(!empty($agency)){
|
||||
$awhereMap = [];
|
||||
$awhereMap[] = ['position', '=', Slide::advertisement];
|
||||
$awhereMap[] = ['agency_id', '=', $agency["id"]];
|
||||
|
@ -214,10 +218,11 @@ class Consumer extends Base
|
|||
return $this->request->domain() . $value;
|
||||
});
|
||||
}, $orders);
|
||||
|
||||
if(!empty($list["list"])){
|
||||
return $this->json(1,"ok",$list["list"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$whereMap = [];
|
||||
|
|
Loading…
Reference in New Issue