ソースを参照

Merge branch 'master' into nomoiblelogin

shish 1 年間 前
コミット
75dc03d138

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

@@ -610,8 +610,8 @@ class ProductController extends BaseController
         $join = $shop->join ?? 0;
         $default = $shop->default ?? 0;
         if ($join == 0 && $default == 0) {
-            //除了小蔡鲜花的蔡总、郑总,其他人直营分店不能改价格,多处要同步修改,关键词d_price_change
-            if (!in_array($this->adminId, [35725, 23659])) {
+            //除了小蔡鲜花的蔡总、郑总、苏南3007,其他人直营分店不能改价格,多处要同步修改,关键词 direct_price_change
+            if (!in_array($this->adminId, [35725, 23659, 29264])) {
                 util::fail('直营店不能改价');
             }
         }

+ 19 - 12
app-hd/controllers/GhsController.php

@@ -22,6 +22,24 @@ class GhsController extends BaseController
 
     public $guestAccess = ['info', 'get-ghs-data'];
 
+    //提示花店有多个供货商
+    public function actionRemindMoreGhs()
+    {
+        $where = [];
+        $where['ownShopId'] = $this->shopId;
+        $where['delStatus'] = 0;
+        $count = GhsClass::getCount($where);
+        $needNotice = 0;
+        if ($count > 1) {
+            $admin = $this->admin;
+            $noticeHasMoreGhs = $admin->noticeHasMoreGhs ?? 0;
+            if ($noticeHasMoreGhs == 0) {
+                $needNotice = 1;
+            }
+        }
+        util::success(['needNotice' => $needNotice]);
+    }
+
     public static $levelMap = [
         'pt' => ['name' => '普店', 'num' => 0, 'amount' => 0, 'key' => ''],
         'hj' => ['name' => '银店', 'num' => 0, 'amount' => 0, 'key' => 'hj'],
@@ -197,17 +215,6 @@ class GhsController extends BaseController
             }
         }
         $respond['showAd'] = $showAd;
-
-        //告之你有多家供货商了
-        $list = $respond['list'] ?? [];
-        if (count($list) > 1) {
-            $admin = $this->admin;
-            $noticeHasMoreGhs = $admin->noticeHasMoreGhs ?? 0;
-            if ($noticeHasMoreGhs == 0) {
-                $respond['needNotice'] = 1;
-            }
-        }
-
         util::success($respond);
     }
 
@@ -264,7 +271,7 @@ class GhsController extends BaseController
         $info['shareLogo'] = $shareLogo;
         $info['superWx'] = '';
         if (!empty($ghsShop->superWx)) {
-            $info['superWx'] = imgUtil::groupImg($ghsShop->superWx). "?x-oss-process=image/resize,w_150";
+            $info['superWx'] = imgUtil::groupImg($ghsShop->superWx) . "?x-oss-process=image/resize,w_150";
         }
 
         $ghsMainId = $ghsShop->mainId ?? 0;

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

@@ -1555,8 +1555,8 @@ class ProductClass extends BaseClass
         if (floatval($price) != floatval($product->price) || floatval($skPrice) != floatval($product->skPrice) || floatval($hjPrice) != floatval($product->hjPrice)) {
             if ($shop->default == 0 && $shop->join == 0) {
 
-                //除了小蔡鲜花的蔡总、郑总,其他人直营分店不能改价格,多处要同步修改,关键词d_price_change
-                if (!in_array($adminId, [35725, 23659])) {
+                //除了小蔡鲜花的蔡总、郑总、苏南3007,其他人直营分店不能改价格,多处要同步修改,关键词 direct_price_change
+                if (!in_array($adminId, [35725, 23659, 29264])) {
                     util::fail('直营店不能改价哦');
                 }