setter
parent
54b3591aa3
commit
f734476251
|
@ -728,7 +728,7 @@ class Coupon extends Base
|
|||
}
|
||||
$type = CouponRepository::getInstance()->getCouponTypeAll();
|
||||
$type = array_column($type->toArray(), null, "id");
|
||||
$data['type_name'] = $type[$data['type']]['name'];
|
||||
$couponMain['type_name'] = $type[$couponMain['type']]['name'];
|
||||
|
||||
//验证通过
|
||||
$couponMain['business_type'] = $account->business['type'];
|
||||
|
@ -743,7 +743,7 @@ class Coupon extends Base
|
|||
$totalMoney = $couponMain['deduction_money'] * $couponMain['count'];
|
||||
|
||||
//检测消费者部分是否最少1元
|
||||
$consumerMoney = ($data['commission_consumer']/100) * $data['deduction_money'];
|
||||
$consumerMoney = ($couponMain['commission_consumer']/100) * $couponMain['deduction_money'];
|
||||
if ($consumerMoney != 0 && $consumerMoney < CouponMain::min_consumer_money) {
|
||||
return $this->json(4002, "消费者红包最低" . CouponMain::min_consumer_money . "元");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue