修改增收补贴发放的错误
This commit is contained in:
parent
50fe835c74
commit
4c279f2153
@ -59,8 +59,8 @@ class OrderDeliveryListen implements ListenerInterface
|
|||||||
$userCouponRepo->sendStatus = StoreCouponDetail::SEND_REPEAL;
|
$userCouponRepo->sendStatus = StoreCouponDetail::SEND_REPEAL;
|
||||||
$userCouponRepo->extra = [
|
$userCouponRepo->extra = [
|
||||||
'sale_target' => $couponTotal,
|
'sale_target' => $couponTotal,
|
||||||
'purchase_target' => $couponTotal * 0.4,
|
'purchase_target' => bcmul($couponTotal, 0.4, 2),
|
||||||
'official_purchase_target' => $couponTotal * 0.6,
|
'official_purchase_target' => bcmul($couponTotal, 0.6, 2),
|
||||||
];
|
];
|
||||||
$userCouponRepo->send();
|
$userCouponRepo->send();
|
||||||
}
|
}
|
||||||
|
@ -25,8 +25,8 @@ class SendSubsidyCouponListen extends TimerService implements ListenerInterface
|
|||||||
$count = 0;
|
$count = 0;
|
||||||
if ($coupon) {
|
if ($coupon) {
|
||||||
foreach ($coupon['config'] as $item) {
|
foreach ($coupon['config'] as $item) {
|
||||||
$purchaseAmount = $item['amount'] * 0.2; //普通店铺采购金额
|
$purchaseAmount = bcmul($item['amount'], 0.2, 2); //普通店铺采购金额
|
||||||
$officialPurchaseAmount = $item['amount'] * 0.3; //官方店铺采购金额
|
$officialPurchaseAmount = bcmul($item['amount'], 0.3, 2); //官方店铺采购金额
|
||||||
$merchants = Merchant::whereIn('type_id', $item['type_id'])
|
$merchants = Merchant::whereIn('type_id', $item['type_id'])
|
||||||
->where('sale_amount', '>=', $item['amount'])
|
->where('sale_amount', '>=', $item['amount'])
|
||||||
->where('purchase_amount', '>=', $purchaseAmount)
|
->where('purchase_amount', '>=', $purchaseAmount)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user