diff --git a/app/common/dao/store/coupon/StoreCouponUserDao.php b/app/common/dao/store/coupon/StoreCouponUserDao.php index 7f9b6475..2854d3f5 100644 --- a/app/common/dao/store/coupon/StoreCouponUserDao.php +++ b/app/common/dao/store/coupon/StoreCouponUserDao.php @@ -312,12 +312,12 @@ class StoreCouponUserDao extends BaseDao ->field('coupon_price,coupon_type') ->select()->toArray(); $result = [ - [ + StoreCouponRepository::TYPE_STORE_COUPON => [ 'total_amount' => 0.00, 'type' => StoreCouponRepository::TYPE_STORE_COUPON, 'type_cn' => StoreCouponRepository::TYPE_MAP[StoreCouponRepository::TYPE_STORE_COUPON], ], - [ + StoreCouponRepository::TYPE_PLATFORM_CARD => [ 'total_amount' => 0.00, 'type' => StoreCouponRepository::TYPE_PLATFORM_CARD, 'type_cn' => StoreCouponRepository::TYPE_MAP[StoreCouponRepository::TYPE_PLATFORM_CARD], diff --git a/app/controller/api/server/Store.php b/app/controller/api/server/Store.php index fb8e3ecd..7e92024d 100644 --- a/app/controller/api/server/Store.php +++ b/app/controller/api/server/Store.php @@ -203,7 +203,7 @@ class Store extends BaseController $couponPrice = 0; $saleTarget = 0; foreach ($coupon['config'] as $item) { - if (!in_array($merchantTypeId, $item['type_id'])) { + if (in_array($merchantTypeId, $item['type_id'])) { $couponPrice = $item['subsidy']; $saleTarget = $item['amount']; break;