setter
parent
1213abfe93
commit
55296574a9
|
@ -423,7 +423,7 @@ class Coupon extends Base
|
|||
'partner_trade_no' => $mch_billno,// 商户订单号,需保持唯一性(只能是字母或者数字,不能包含有符号)
|
||||
'openid' => $distributionUser->open_id,
|
||||
'check_name' => 'NO_CHECK',// NO_CHECK:不校验真实姓名, FORCE_CHECK:强校验真实姓名
|
||||
'amount' => $amount * 100, //单位为分,不小于100
|
||||
'amount' => $amount * 100, //单位为分,不小于300
|
||||
'desc' => '优惠券分销奖励',
|
||||
];
|
||||
|
||||
|
@ -433,7 +433,7 @@ class Coupon extends Base
|
|||
"mch_billno" => $mch_billno,
|
||||
"openid" => $distributionUser->open_id,
|
||||
"user_code" => $distributionUser->user_code,
|
||||
"money" => $amount,
|
||||
"money" => $amount * 100, //单位为分,不小于300
|
||||
"create_time" => date("Y-m-d H:i:s",$time),
|
||||
"pay_time" => '0000-00-00 00:00:00',
|
||||
|
||||
|
@ -632,7 +632,6 @@ class Coupon extends Base
|
|||
$agencyMoney = 0; //四舍五入 精确到分
|
||||
}
|
||||
|
||||
|
||||
//开始数据操作
|
||||
Db::startTrans();
|
||||
try {
|
||||
|
@ -728,12 +727,13 @@ class Coupon extends Base
|
|||
$mch_billno = createUuid();
|
||||
}
|
||||
|
||||
$agencyAmount = $agencyMoney * 100 ;
|
||||
|
||||
$agencyToBalanceData = [
|
||||
'partner_trade_no' => $mch_billno,// 商户订单号,需保持唯一性(只能是字母或者数字,不能包含有符号)
|
||||
'openid' => $agencyUser->open_id,
|
||||
'check_name' => 'NO_CHECK',// NO_CHECK:不校验真实姓名, FORCE_CHECK:强校验真实姓名
|
||||
'amount' => $agencyMoney * 100, //单位为分,不小于100
|
||||
'amount' => $agencyAmount , //单位为分,不小于300
|
||||
'desc' => '用户核销优惠券,渠道商奖励',
|
||||
];
|
||||
|
||||
|
@ -743,7 +743,7 @@ class Coupon extends Base
|
|||
"mch_billno" => $mch_billno,
|
||||
"openid" => $agencyUser->open_id,
|
||||
"user_code" => $agencyUser->user_code,
|
||||
"money" => $agencyMoney,
|
||||
"money" => $agencyAmount, //单位为分,不小于300
|
||||
"create_time" => date("Y-m-d H:i:s",$time),
|
||||
"pay_time" => '0000-00-00 00:00:00',
|
||||
|
||||
|
@ -768,9 +768,6 @@ class Coupon extends Base
|
|||
}
|
||||
// 不管成功还是失败 都要写入
|
||||
Redpack::create($agencyRedpackData);
|
||||
Db::rollback();
|
||||
return $this->json(4001,"agencyMoney{$agencyMoney}");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -805,7 +802,7 @@ class Coupon extends Base
|
|||
'partner_trade_no' => $mch_billno,// 商户订单号,需保持唯一性(只能是字母或者数字,不能包含有符号)
|
||||
'openid' => $account->open_id,
|
||||
'check_name' => 'NO_CHECK',// NO_CHECK:不校验真实姓名, FORCE_CHECK:强校验真实姓名
|
||||
'amount' => $amount, //单位为分,不小于100
|
||||
'amount' => $amount, //单位为分,不小于300
|
||||
'desc' => '验证优惠券签到奖励',
|
||||
];
|
||||
|
||||
|
@ -815,7 +812,7 @@ class Coupon extends Base
|
|||
"mch_billno" => $mch_billno,
|
||||
"openid" => $account->open_id,
|
||||
"user_code" => $account->user_code,
|
||||
"money" => $consumerMoney,
|
||||
"money" => $amount, //单位为分,不小于300
|
||||
"create_time" => date("Y-m-d H:i:s",$time),
|
||||
"pay_time" => '0000-00-00 00:00:00',
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue