Browse Source

供货商信息

shish 1 year ago
parent
commit
2a0e7adfdb
1 changed files with 18 additions and 0 deletions
  1. 18 0
      app-hd/controllers/GhsController.php

+ 18 - 0
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'],