Răsfoiți Sursa

Merge branch 'master' into dev

shish 11 luni în urmă
părinte
comite
3029507dec

+ 8 - 8
app-ghs/controllers/IntraCityController.php

@@ -75,14 +75,14 @@ class IntraCityController extends BaseController
 
             // 查询是否存在 wx_store_id,不存在则执行apply
             if ($main->wxStoreId == '') {
-                $re = IntraCityExpress::applyStore();
-                if (!is_array($re)) {
-                    $re = Json::decode($re, true);
-                }
-                if ($re['errcode'] != 0) {
-                    Yii::error("开通门店权限失败:" . $re['errmsg']);
-                    util::fail('开通门店权限失败');
-                }
+//                $re = IntraCityExpress::applyStore();
+//                if (!is_array($re)) {
+//                    $re = Json::decode($re, true);
+//                }
+//                if ($re['errcode'] != 0) {
+//                    Yii::error("开通门店权限失败:" . $re['errmsg']);
+//                    util::fail('开通门店权限失败');
+//                }
             }
 
             $result = IntraCityExpress::createStore($storeData);

+ 4 - 2
app-ghs/controllers/OrderController.php

@@ -1265,10 +1265,12 @@ class OrderController extends BaseController
         } else {
             if (!empty($diff)) {
                 $mainId = $this->mainId;
-                //花样年华 限制员工只能按原价开单,不能改价格
+                //花样年华,除了老板,只能按原价开单,不能改价格
                 if (getenv('YII_ENV') == 'production') {
                     if (in_array($mainId, [1553, 1563])) {
-                        util::fail('请按花材原价格开单');
+                        if ($this->adminId != 2876) {
+                            util::fail('请按花材原价格开单');
+                        }
                     }
                 } else {
                     if (in_array($mainId, [0, 1])) {

+ 3 - 2
app-ghs/controllers/ProductController.php

@@ -943,8 +943,9 @@ class ProductController extends BaseController
     {
         $shop = $this->shop;
         $default = $shop->default ?? 0;
-        if ($default == 0) {
-            util::fail('当前直营分店,请返回总店修改');
+        $join = $shop->join ?? 0;
+        if ($default == 0 && $join == 0) {
+            util::fail('当前是直营店,请返回总店修改');
         }
 
         $shopAdmin = $this->shopAdmin;

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

@@ -398,7 +398,8 @@ class TestController extends BaseController
             //['name' => '济南伟伟鲜花批发', 'merchantNo' => '8224510599200EL', 'wx' => [789073494, 789074603], 'zfb' => '2088670850497224'],
             //['name' => '赣州紫荆鲜花批发', 'merchantNo' => '82242805992004J', 'wx' => [790052021, 790051859], 'zfb' => '2088670969143838'],
             //['name' => '莆田鲜花闪送', 'merchantNo' => '82239405992005W', 'wx' => [808858266, 808858114], 'zfb' => '2088970298325670'],
-            ['name' => '惠安花优美', 'merchantNo' => '8223970599200DP', 'wx' => [811651765, 811651866], 'zfb' => '2088970528927690'],
+            ['name' => '昆明小向鲜花', 'merchantNo' => '8227310599200UX', 'wx' => [811911098, 811911180], 'zfb' => '2088970555233957'],
+            //['name' => '惠安花优美', 'merchantNo' => '8223970599200DP', 'wx' => [811651765, 811651866], 'zfb' => '2088970528927690'],
             //['name' => '小榄淘花里', 'merchantNo' => '8226030599200A2', 'wx' => [809357489, 809358311], 'zfb' => '2088970343842282'],
             ['name' => '深圳鼎盛皇室花卉', 'merchantNo' => '8225840599201MF', 'wx' => [807078304, 807076486], 'zfb' => '2088970117746334'],
             //['name' => '东莞惠雅鲜花(莞城店)', 'merchantNo' => '8226020599200GJ', 'wx' => [796953190, 796976959], 'zfb' => '2088770940104912'],

+ 11 - 10
app-hd/controllers/IntraCityController.php

@@ -48,7 +48,7 @@ class IntraCityController extends BaseController
             util::checkRepeatCommit($adminId, 4);
 
             $storeData = [
-                'out_store_id' => $this->mainId, //自定义门店编号 --  从 shopId 改为 dmainId
+                'out_store_id' => $this->mainId, //自定义门店编号 --  从 shopId 改为 mainId
                 'store_name' => $name,
                 'address_info' => [
                     'province' => $shop->province,
@@ -69,21 +69,20 @@ class IntraCityController extends BaseController
                     util::fail("缺少必填参数:{$field}");
                 }
             }
-
             // 创建门店前,检查是否已经 开通门店权限 (有wxStoreId,即说明开通了)
             //$shopExt = ShopExtClass::getByCondition(['shopId' => $shopId], true, false, 'id, wxStoreId');
             $shopExt = MainClass::getById($this->mainId, true, 'id, wxStoreId');
 
             // 查询是否存在 wx_store_id,不存在则执行apply
             if ($shopExt->wxStoreId == '') {
-                $re = IntraCityExpress::applyStore();
-                if (!is_array($re)) {
-                    $re = Json::decode($re, true);
-                }
-                if ($re['errcode'] != 0) {
-                    Yii::error("开通门店权限失败:" . $re['errmsg']);
-                    util::fail('开通门店权限失败');
-                }
+//                $re = IntraCityExpress::applyStore();
+//                if (!is_array($re)) {
+//                    $re = Json::decode($re, true);
+//                }
+//                if ($re['errcode'] != 0) {
+//                    Yii::error("开通门店权限失败:" . $re['errmsg']);
+//                    util::fail('开通门店权限失败');
+//                }
             }
 
             $result = IntraCityExpress::createStore($storeData);
@@ -95,6 +94,8 @@ class IntraCityController extends BaseController
                 util::success($result, "门店创建成功");
             } else {
                 Yii::error("门店创建失败:" . $result['errmsg']);
+                $errMsg = $result['errmsg'] ?? '';
+                noticeUtil::push("报错内容:" . $errMsg, '15280215347');
                 util::fail($result['errmsg']);
             }
         } catch (\Exception $e) {

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

@@ -1810,7 +1810,7 @@ class OrderClass extends BaseClass
         if (getenv('YII_ENV') == 'production') {
             $map = [65726, 58];
         } else {
-            $map = [828, 0];
+            $map = [828];
         }
         if (in_array($orderMainId, $map)) {
             self::printLogisticsLabel($orderInfo, $shop, $ext);
@@ -2855,7 +2855,7 @@ XL;
         if (getenv('YII_ENV') == 'production') {
             $map = [65726, 58];
         } else {
-            $map = [828, 0];
+            $map = [828];
         }
         /**************************如果是好多花的云仓还要再打一下标签纸,多处要同步修改,关键词 hdh_yc *****************************/
         $customId = $order->customId ?? 0;

+ 2 - 1
common/components/IntraCityExpress.php

@@ -143,8 +143,9 @@ class IntraCityExpress
             return $result;
         } catch (\Exception $e) {
             Yii::error($e->getMessage());
+            $msg = $e->getMessage();
             // 如果WxApi方式失败,回退到简单方式
-            util::fail('error');
+            util::fail($msg);
         }