Explorar o código

Merge branch 'master' into dev

shish hai 3 meses
pai
achega
2d8ea52b3d

+ 2 - 2
app-ghs/controllers/TestController.php

@@ -1006,7 +1006,7 @@ class TestController extends BaseController
     //交易查询 ssh 20231021
     public function actionTradeQuery()
     {
-        $shopId = 15289;
+        $shopId = 42562;
         $shop = ShopClass::getById($shopId, true);
         if (empty($shop)) {
             util::stop('没有找到门店,编号677230');
@@ -1022,7 +1022,7 @@ class TestController extends BaseController
             'lklCertificatePath' => $lklCertificatePath,
         ];
         $laResource = new Lakala($params);
-        $orderSn = 'CG30760064';
+        $orderSn = 'CG30971394';
         $tradeNo = '66223936904050';
         $queryParams = [
             'orderSn' => $orderSn,

+ 1 - 1
biz-ghs/order/classes/CheckOrderClass.php

@@ -430,7 +430,7 @@ class CheckOrderClass extends BaseClass
                     }
 
                     //如果花材是自动补充库存类型的花材,则库存低于900时,自动补充到98520,多处要同步修改,关键词 auto_add_stock
-                    if ($productData->virtualStock == 1 && $v['itemNum'] < 900) {
+                    if ($productData->virtualStock == 1 && $v['itemNum'] < 9900) {
                         ProductClass::updateStockById($productId, 98520, $adminId);
                     }
 

+ 1 - 1
biz-ghs/product/classes/ProductClass.php

@@ -1120,7 +1120,7 @@ class ProductClass extends BaseClass
         }
 
         //如果花材是自动补充库存类型的花材,则库存低于900时,自动补充到98520,多处要同步修改,关键词 auto_add_stock
-        if ($productData->virtualStock == 1 && $newStock < 900) {
+        if ($productData->virtualStock == 1 && $newStock < 9900) {
             self::updateStockById($productId, 98520);
         }
 

+ 8 - 8
biz-hd/express/classes/HdDeliveryOrderClass.php

@@ -17,13 +17,13 @@ class HdDeliveryOrderClass extends BaseClass
 
     public static function payAfter($order)
     {
-        if(empty($order)){
+        if (empty($order)) {
             return false;
         }
-        if($order->sendType != 2){
+        if ($order->sendType != 2) {
             return false;
         }
-        if($order->payStatus != 1){
+        if ($order->payStatus != 1) {
             return false;
         }
         $orderId = $order->id;
@@ -74,18 +74,18 @@ class HdDeliveryOrderClass extends BaseClass
         try {
             //跑腿订单生产者创建订单
             $orderId = $order->id ?? 0;
-            $callErrand = $post['callErrand']; // 是否立即发跑腿 1:是 0:否
+            $callErrand = $post['callErrand'] ?? 0; // 是否立即发跑腿 1:是 0:否
 
             if ($callErrand == 1) {
                 $hasPay = $post['hasPay'] ?? dict::getDict('hasPay', 'unPay'); //收款方式  0:扫码付 1:线下(已付款) 2:赊账(欠款)3:现金 4:余额
                 if ($hasPay == dict::getDict('hasPay', 'unPay')) { // 0:扫码付
                     $deliveryPlatform = $post['deliveryPlatform'];
                     $expireTime = 0;
-                    if($deliveryPlatform == 'shansong'){
+                    if ($deliveryPlatform == 'shansong') {
                         $expireTime = 1800 - 60;
-                    }elseif($deliveryPlatform == 'didi'){
+                    } elseif ($deliveryPlatform == 'didi') {
                         $expireTime = 7200;
-                    }else{
+                    } else {
                         $expireTime = 7200; // 默认缓存时长2小时
                     }
                     $cacheKey = 'hd_pt_cacheData:' . $orderId;
@@ -261,7 +261,7 @@ class HdDeliveryOrderClass extends BaseClass
             $shopId = $data['shopId'];
             // 发 App 通知
             self::sendAppNotice($shopId, $orderId, "订单号:{$orderId},原因:" . $e->getMessage());
-            
+
             return ConsumerInterface::MSG_REJECT;
         }
     }