修改补贴金额的错误

This commit is contained in:
luofei 2024-03-20 16:38:50 +08:00
parent 5af33cdc7d
commit c518d87b39
2 changed files with 3 additions and 3 deletions

View File

@ -312,12 +312,12 @@ class StoreCouponUserDao extends BaseDao
->field('coupon_price,coupon_type') ->field('coupon_price,coupon_type')
->select()->toArray(); ->select()->toArray();
$result = [ $result = [
[ StoreCouponRepository::TYPE_STORE_COUPON => [
'total_amount' => 0.00, 'total_amount' => 0.00,
'type' => StoreCouponRepository::TYPE_STORE_COUPON, 'type' => StoreCouponRepository::TYPE_STORE_COUPON,
'type_cn' => StoreCouponRepository::TYPE_MAP[StoreCouponRepository::TYPE_STORE_COUPON], 'type_cn' => StoreCouponRepository::TYPE_MAP[StoreCouponRepository::TYPE_STORE_COUPON],
], ],
[ StoreCouponRepository::TYPE_PLATFORM_CARD => [
'total_amount' => 0.00, 'total_amount' => 0.00,
'type' => StoreCouponRepository::TYPE_PLATFORM_CARD, 'type' => StoreCouponRepository::TYPE_PLATFORM_CARD,
'type_cn' => StoreCouponRepository::TYPE_MAP[StoreCouponRepository::TYPE_PLATFORM_CARD], 'type_cn' => StoreCouponRepository::TYPE_MAP[StoreCouponRepository::TYPE_PLATFORM_CARD],

View File

@ -203,7 +203,7 @@ class Store extends BaseController
$couponPrice = 0; $couponPrice = 0;
$saleTarget = 0; $saleTarget = 0;
foreach ($coupon['config'] as $item) { foreach ($coupon['config'] as $item) {
if (!in_array($merchantTypeId, $item['type_id'])) { if (in_array($merchantTypeId, $item['type_id'])) {
$couponPrice = $item['subsidy']; $couponPrice = $item['subsidy'];
$saleTarget = $item['amount']; $saleTarget = $item['amount'];
break; break;