Explorar el Código

商城下单,通知零售端员工

林琦海 hace 5 años
padre
commit
9b8eba6f6f
Se han modificado 2 ficheros con 24 adiciones y 4 borrados
  1. 17 4
      biz-hd/order/classes/OrderClass.php
  2. 7 0
      common/components/dict.php

+ 17 - 4
biz-hd/order/classes/OrderClass.php

@@ -10,6 +10,7 @@ use biz\stat\classes\StatOrderCountClass;
 use bizGhs\stat\classes\StatYjClass;
 use bizGhs\ws\services\WsService;
 use bizHd\user\classes\UserClass;
+use common\components\dict;
 use common\components\miniUtil;
 use common\components\orderSn;
 use common\components\util;
@@ -159,10 +160,12 @@ class OrderClass extends BaseClass
         }
         $date = date("Y-m-d H:i:s");
         $order->payTime = $date;
-        $shopAdminIds = \bizGhs\shop\classes\ShopAdminClass::getRemindAdminIdsByShopId($order->shopId);
-        if($shopAdminIds){
-            foreach ($shopAdminIds as $v){
-                WsService::arrivalNotice($v,$order->actPrice);
+        if($order->fromtType == dict::getDict("fromType","shop")){
+            $shopAdminIds = \bizGhs\shop\classes\ShopAdminClass::getRemindAdminIdsByShopId($order->shopId);
+            if($shopAdminIds){
+                foreach ($shopAdminIds as $v){
+                    WsService::arrivalNotice($v,$order->actPrice);
+                }
             }
         }
         self::complete($order, $payWay);
@@ -231,6 +234,16 @@ class OrderClass extends BaseClass
                 }
             }
         };
+
+        //下单通知,来自mall linqh 2021.5.19
+        if($order->fromtType == dict::getDict("fromType","mall")){
+            $shopIdAdminIds = \bizGhs\shop\classes\ShopAdminClass::getRemindAdminIdsByShopId($shopId);
+            if($shopIdAdminIds){
+                foreach ($shopIdAdminIds as $v){
+                    WsService::newOrderNotice($v);
+                }
+            }
+        }
     }
 
     //转化出送到时间 ssh 2020.3.15

+ 7 - 0
common/components/dict.php

@@ -211,6 +211,13 @@ class dict
                 'id' => 37,
                 'reason' => '配送员以各种理由表示无法完成订单',
             ],
+        ],
+
+        //来源
+        'fromType'=>[
+            'shop'=>1, //门店
+            'mall'=>2, //商城
+            'friend'=>3,// 朋友圈
         ]
     ];