|
|
@ -290,6 +290,11 @@ class CouponRebateService implements CouponRebateServiceInterface |
|
|
//开启事务
|
|
|
//开启事务
|
|
|
Db::beginTransaction(); |
|
|
Db::beginTransaction(); |
|
|
try { |
|
|
try { |
|
|
|
|
|
//读写锁
|
|
|
|
|
|
Db::table('ims_system_user') |
|
|
|
|
|
->lockForUpdate() |
|
|
|
|
|
->where('id', $active['repay']) |
|
|
|
|
|
->get(); |
|
|
//返券
|
|
|
//返券
|
|
|
if($exists_coupon_rebate){ |
|
|
if($exists_coupon_rebate){ |
|
|
//如果已有该优惠券 则领取数量 和 可用数量 自增1
|
|
|
//如果已有该优惠券 则领取数量 和 可用数量 自增1
|
|
|
|