修改发放优惠卷推送问题
This commit is contained in:
parent
5ea7df3373
commit
2030ea8f46
@ -7,6 +7,7 @@ use App\Amqp\Producer\UserCouponExpiredDelayDirectProducer;
|
|||||||
use App\Constants\HttpEnumCode;
|
use App\Constants\HttpEnumCode;
|
||||||
use App\Model\Coupon;
|
use App\Model\Coupon;
|
||||||
use App\Model\UserCoupon;
|
use App\Model\UserCoupon;
|
||||||
|
use App\Utils\Log;
|
||||||
use Hyperf\Amqp\Producer;
|
use Hyperf\Amqp\Producer;
|
||||||
use Hyperf\DbConnection\Db;
|
use Hyperf\DbConnection\Db;
|
||||||
use Psr\Container\ContainerExceptionInterface;
|
use Psr\Container\ContainerExceptionInterface;
|
||||||
@ -142,6 +143,15 @@ class CouponService extends BaseService
|
|||||||
if (!$res) {
|
if (!$res) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
// 患者-发送通知消息-优惠卷发放
|
||||||
|
$MessagePush = new MessagePush($user_id);
|
||||||
|
$MessagePush->patientDistributeCoupon($value['coupon_name']);
|
||||||
|
}catch (\Exception $e){
|
||||||
|
// 不做处理
|
||||||
|
Log::getInstance()->error($e->getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user