From 4bc04b1e8642f31b5d332a282bfc966fbe6c547c Mon Sep 17 00:00:00 2001 From: wangxinglong <2371974647@qq.com> Date: Thu, 20 Jan 2022 14:09:20 +0800 Subject: [PATCH] setter --- app/controller/api/Coupon.php | 4 ++-- app/controller/manager/Coupon.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controller/api/Coupon.php b/app/controller/api/Coupon.php index 13f2446..a72801e 100644 --- a/app/controller/api/Coupon.php +++ b/app/controller/api/Coupon.php @@ -627,8 +627,8 @@ class Coupon extends Base $couponMain['create_time'] = date("Y-m-d H:i:s"); //保留两位小数 - $couponMain['money'] = floor($couponMain['money'] * 100) / 100; - $totalMoney = $couponMain['money'] * $couponMain['count']; + $couponMain['deduction_money'] = floor($couponMain['deduction_money'] * 100) / 100; + $totalMoney = $couponMain['deduction_money'] * $couponMain['count']; //未领取的优惠券 $NotClaimedMoney = CouponRepository::getInstance()->getBusinessNotClaimedCoupon($account->business["code"]); diff --git a/app/controller/manager/Coupon.php b/app/controller/manager/Coupon.php index 1ec0d92..acabc97 100644 --- a/app/controller/manager/Coupon.php +++ b/app/controller/manager/Coupon.php @@ -224,9 +224,9 @@ class Coupon extends Base } //保留两位小数 - $data['money'] = floor($data['money'] * 100) / 100; + $data['deduction_money'] = floor($data['deduction_money'] * 100) / 100; - $totalMoney = $data['money'] * $data['count']; + $totalMoney = $data['deduction_money'] * $data['count']; //未领取的优惠券 $NotClaimedMoney = CouponRepository::getInstance()->getBusinessNotClaimedCoupon($business["code"]);