shish 5 жил өмнө
parent
commit
4af14f7fbb

+ 1 - 1
app-ghs/controllers/OrderController.php

@@ -100,7 +100,7 @@ class OrderController extends BaseController
         $post['fromType'] = 1;
         $post['expressId'] = $post['expressId'] ?? 0;
         $post['sendCost'] = $post['sendCost'] ?? '0.00';
-        $post['payWay'] = dict::getDict('payWay', 'wxPay');
+        //$post['payWay'] = dict::getDict('payWay', 'wxPay');
 
         //PC端开单
         if (isset($post['clearType'])) {

+ 1 - 1
app-mall/controllers/OrderController.php

@@ -292,7 +292,7 @@ class OrderController extends BaseController
         $post['goodsNum'] = 1;
         $post['fromType'] = $fromType;
         $post['reachDate'] = isset($post['reachDate']) && !empty($post['reachDate']) ? $post['reachDate'] : '00-00-00';
-        $post['thirdPay'] = dict::getDict('thirdPay', 'onlineWay');
+        $post['onlinePay'] = dict::getDict('onlinePay', 'yes');
 
         //前端未修改时这边做兼容
         if (isset($post['receiveAddress']) && !empty($post['receiveAddress'])) {

+ 2 - 2
biz-ghs/order/services/OrderService.php

@@ -496,8 +496,8 @@ class OrderService extends BaseService
 
         //客户采购,会增加余额,会增加收入
         if ($isPurchase == true) {
-            //余额支付和第三方支付(微信支付、支付宝支付)会增加余额
-            if ($order->thirdPay == dict::getDict('thirdPay', 'onlineWay') || $payWay == dict::getDict('payWay', 'balancePay')) {
+            //余额支付和在线支付(微信支付、支付宝支付)会增加余额
+            if ($order->onlinePay == dict::getDict('onlinePay', 'yes') || $payWay == dict::getDict('payWay', 'balancePay')) {
                 ShopClass::customKdAddBalance($shop, $realPrice, $order, $capitalType);
             }
             if (isset($order->discountType) && $order->discountType == dict::getDict('discountType', 'usePtCoupon')) {

+ 2 - 2
biz-hd/order/classes/OrderClass.php

@@ -170,7 +170,7 @@ class OrderClass extends BaseClass
 
         $date = date("Y-m-d H:i:s");
         $order->payTime = $date;
-        $order->thirdPay = dict::getDict('thirdPay', 'onlineWay');
+        $order->onlinePay = dict::getDict('onlinePay', 'yes');
         $order->save();
         self::complete($order, $payWay);
         //订单全部流程走完了再通知
@@ -282,7 +282,7 @@ class OrderClass extends BaseClass
             }
         } else {
             //客户在线支付下单增加商家可提现余额
-            if (isset($order->thirdPay) && $order->thirdPay == dict::getDict('thirdPay', 'onlineWay')) {
+            if (isset($order->onlinePay) && $order->onlinePay == dict::getDict('onlinePay', 'yes')) {
                 $amount = $order->actPrice;
                 ShopClass::customKdAddBalance($shop, $amount, $order, $capitalType);
             }

+ 2 - 2
biz-hd/purchase/services/PurchaseService.php

@@ -208,14 +208,14 @@ class PurchaseService extends BaseService
         $id = $info->id;
         $info = PurchaseClass::getLockById($id);
 
-        $info->thirdPay = dict::getDict('thirdPay', 'onlineWay');
+        $info->onlinePay = dict::getDict('onlinePay', 'yes');
         $info->thirdNo = $transactionId;
         $info->save();
         self::payAfter($info, $payWay);
 
         $saleId = $info->saleId ?? 0;
         $order = OrderClass::getById($saleId, true);
-        $order->thirdPay = dict::getDict('thirdPay', 'onlineWay');
+        $order->onlinePay = dict::getDict('onlinePay', 'yes');
         $order->save();
         OrderService::payAfter($order, $payWay, true);
     }

+ 8 - 3
common/components/dict.php

@@ -31,6 +31,9 @@ class dict
         //支付方式的类型 1商家开单选的支付方式 2客户在线支付
         'thirdPay' => ['selectWay' => 1, 'onlineWay' => 2],
 
+        //是否在线支付
+        'onlinePay' => ['not' => 1, 'yes' => 2],
+
         //采购和销售单的有效期
         'sale_purchase_order_valid' => 150,
 
@@ -81,13 +84,15 @@ class dict
         'riseTypeName' => [0 => '不涨价', 1 => '按百分比', 2 => '按金额'],
 
         //支付方式
-        'payWay' => ['wxPay' => 0, 'alipay' => 1, 'balancePay' => 2, 'debtPay' => 3, 'unknown' => 9],
-        'payWayName' => [0 => '微信', 1 => '支付宝', 2 => '余额', 3 => '欠款', 9 => '未知'],
-        'payWayFullName' => [0 => '微信支付', 1 => '支付宝', 2 => '余额支付', 3 => '欠款支付', 9 => '未知'],
+        'payWay' => ['wxPay' => 0, 'alipay' => 1, 'balancePay' => 2, 'debtPay' => 3, 'cash' => 4, 'bankCard' => 5, 'unknown' => 9],
+        'payWayName' => [0 => '微信', 1 => '支付宝', 2 => '余额', 3 => '欠款', 4 => '现金', 5 => '银行卡', 9 => '未知'],
+        'payWayFullName' => [0 => '微信支付', 1 => '支付宝', 2 => '余额支付', 3 => '欠款支付', 4 => '现金', 5 => '银行卡', 9 => '未知'],
         //后台支付方式选项
         'htPayWayOption' => [
             ['name' => '微信', 'id' => 0],
             ['name' => '支付宝', 'id' => 1],
+            ['name' => '现金', 'id' => 4],
+            ['name' => '银行卡', 'id' => 5],
         ],
 
         //优惠类型