修改增收补贴发放的错误

This commit is contained in:
luofei 2024-03-22 14:52:26 +08:00
parent cf1a38ea0f
commit 6874dab755
2 changed files with 3 additions and 0 deletions

View File

@ -220,6 +220,7 @@ class StoreCouponUserRepository extends BaseRepository
return $model;
} catch (\Exception $e) {
Db::rollback();
throw new \Exception($e->getMessage());
}
}

View File

@ -46,6 +46,7 @@ class SendSubsidyCouponListen extends TimerService implements ListenerInterface
$userCouponRepo = app()->make(StoreCouponUserRepository::class);
$coupon->coupon_price = $amount;
$userCouponRepo->status = StoreCouponUser::STATUS_REPEAL;
$userCouponRepo->uid = $merchant['uid'];
$userCouponRepo->coupon = $coupon;
$userCouponRepo->order = ['uid' => $merchant['uid'],];
$userCouponRepo->extra = [
@ -57,6 +58,7 @@ class SendSubsidyCouponListen extends TimerService implements ListenerInterface
$userCouponRepo->onlyDetail = true;
$userCouponRepo->detailStatus = StoreCouponDetail::STATUS_INVALID;
$userCouponRepo->sendStatus = StoreCouponDetail::SEND_REPEAL;
$userCouponRepo->sendType = StoreCouponUserRepository::SEND_TYPE_SEND;
$userCouponRepo->send();
$count++;
}