|
|
@@ -1288,6 +1288,16 @@ class ServiceWorkLogic extends BaseLogic
|
|
|
$userCouponLogic = UserCouponLogic::add(['codes'=>$codes,'user_id'=>$serviceWork->user_id]);
|
|
|
Log::info('工单中给用户发券:'.$serviceWork->user_id.'--'.json_encode($codes).'--'.json_encode($userCouponLogic));
|
|
|
if($userCouponLogic === false) throw new \Exception(UserCouponLogic::getError());
|
|
|
+ if(empty(UserCouponLogic::getError())){
|
|
|
+ // 通知用户公众号 跳转优惠券
|
|
|
+ event('Notice', [
|
|
|
+ 'scene_id' => 129,
|
|
|
+ 'params' => [
|
|
|
+ 'user_id' => $serviceWork->user_id,
|
|
|
+ 'order_id' => $serviceWork->id,
|
|
|
+ ]
|
|
|
+ ]);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return true;
|