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