Browse Source

Merge branch 'master' of http://git.huxiukeji.com/zhangxiaobin/ggyuyin

lizhen_gitee 1 year ago
parent
commit
37f10e12b8

+ 8 - 0
application/api/controller/Money.php

@@ -112,15 +112,22 @@ class Money extends Common
         $money = (float)bcadd($amount, 0, 2);
         // 生成订单
         $epayConfig = get_addon_config('epay');
+        $configWhere['name'] = ['in',['wechat_service_fee','alipay_service_fee']];
+        $config = Db::name('config')->where($configWhere)->column('name,value');
+        $wechatFee = isset($config['wechat_service_fee']) ? (float)$config['wechat_service_fee'] : 0.00;
+        $alipayFee = isset($config['alipay_service_fee']) ? (float)$config['alipay_service_fee'] : 0.00;
         if ($type == 'wechat') {
             $payType = 1;
             $businessNo = isset($epayConfig['wechat']['mch_id']) ? $epayConfig['wechat']['mch_id'] : '';
+            $serviceFee = $wechatFee;
         } elseif ($type == 'alipay') {
             $payType = 2;
             $businessNo = isset($epayConfig['alipay']['app_id']) ? $epayConfig['alipay']['app_id'] : '';
+            $serviceFee = $alipayFee;
         } else {
             $payType = 3;
             $businessNo = '';
+            $serviceFee = 0.00;
         }
         $recharOrderMode = new \app\common\model\RecharOrder();
         $data["user_id"] = $user_id;
@@ -128,6 +135,7 @@ class Money extends Common
         $data["money"] = $money;
         $data["jewel"] = $jewel;
         $data["pay_type"] = $payType;//支付渠道:1=微信,2=支付宝,3=衫德
+        $data["service_fee"] = $serviceFee;//手续费
         $data["business_no"] = $businessNo;//商户号
         $data["platform"] = $params_from;//1=安卓,2=ios
         $data["createtime"] = $time;

+ 1 - 1
application/api/controller/Usersign.php

@@ -137,7 +137,7 @@ class Usersign extends Api
                 $min = isset($signJewelArr[0]) ? $signJewelArr[0] : 1;
                 $max = isset($signJewelArr[1]) ? $signJewelArr[1] : 1;
                 $gift['num'] = rand($min,$max);
-                if ($gift < 1) {
+                if ($gift['num'] < 1) {
                     throw new Exception('签到功能已被关闭');
                 }
                 $data['goldnum'] = $gift['num'];

File diff suppressed because it is too large
+ 4 - 4
application/extra/site.php


Some files were not shown because too many files changed in this diff