From 7864f7d1bf05f5020ee686b91a2c11cb51d7a8c4 Mon Sep 17 00:00:00 2001 From: wangxinglong <2371974647@qq.com> Date: Wed, 16 Mar 2022 15:43:12 +0800 Subject: [PATCH] setter --- app/controller/api/Coupon.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/app/controller/api/Coupon.php b/app/controller/api/Coupon.php index 383ef97..8724ddf 100644 --- a/app/controller/api/Coupon.php +++ b/app/controller/api/Coupon.php @@ -708,7 +708,6 @@ class Coupon extends Base if($business->is_assign == BusinessModel::COMMON_ON && (empty($coupon->distribution_user_code))){ if(isset($business->agency) && $business->agency){ //$business->agency->inc("balance",$agencyMoney)->update(); - //6. 用户提现到零钱 写入红包记录 if($agencyMoney > 0) { //找到渠道商关联的用户 $agencyUser = Account::findOne([ @@ -809,12 +808,12 @@ class Coupon extends Base // 写入红包 $redpackData = [ - "coupon_id" =>$coupon->id, - "mch_billno" =>$mch_billno, - "openid" =>$account->open_id, - "user_code" =>$account->user_code, - "money" =>$amount, - "create_time" => date("Y-m-d H:i:s",$time), + "coupon_id" => $coupon->id, + "mch_billno" => $mch_billno, + "openid" => $account->open_id, + "user_code" => $account->user_code, + "money" => $consumerMoney, + "create_time" => date("Y-m-d H:i:s",$time), "pay_time" => '0000-00-00 00:00:00', ];