From 9a9a429127c089518e2e13f0b1e10bc1c89b0854 Mon Sep 17 00:00:00 2001 From: gongfuxiang <2499232802@qq.com> Date: Wed, 8 May 2019 00:56:43 +0800 Subject: [PATCH] =?UTF-8?q?=E9=92=B1=E5=8C=85=E5=85=85=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugins/wallet/service/PayService.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/application/plugins/wallet/service/PayService.php b/application/plugins/wallet/service/PayService.php index 88595b1da..1ac790e1e 100644 --- a/application/plugins/wallet/service/PayService.php +++ b/application/plugins/wallet/service/PayService.php @@ -353,16 +353,21 @@ class PayService ); if(Db::name('PluginsWalletRecharge')->where(['id'=>$params['recharge']['id']])->update($upd_data)) { - // 字段名称 金额类型 - $money_field = [ - ['field' => 'normal_money', 'money_type' => 0, 'msg' => ' [ '.$pay_price.'元 ]'], - ]; - // 是否有赠送金额 $give_money = self::RechargeGiveMoneyHandle($pay_price); + + // 字段名称 金额类型 + if($give_money > 0) { - $money_field[] = ['field' => 'give_money', 'money_type' => 2, 'msg' => ' [ 赠送'.$give_money.'元 ]']; + $money_field = [ + ['field' => 'normal_money', 'money_type' => 0, 'msg' => ' [ '.$pay_price.'元, 赠送'.$give_money.'元 ]'], + ['field' => 'give_money', 'money_type' => 2, 'msg' => ' [ 赠送'.$give_money.'元 ]'], + ]; + } else { + $money_field = [ + ['field' => 'normal_money', 'money_type' => 0, 'msg' => ' [ '.$pay_price.'元 ]'], + ]; } // 钱包更新数据 -- GitLab