Преглед изворни кода

Merge branch 'shizhongqi-createShop' into dev

shish пре 1 година
родитељ
комит
8ab33737d3
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3 1
      biz-hd/staff/classes/StaffClass.php

+ 3 - 1
biz-hd/staff/classes/StaffClass.php

@@ -135,6 +135,7 @@ class StaffClass extends BaseClass
         if (empty($shopList)) {
             // 情况1:自己没有店,在别人那边当员工,直接退出
             $admin->currentShopId = 0;
+            $admin->currentGhsShopId = 0;
             $admin->save();
         } else {
             // 情况2:自己有店,自己可能开批零店,也可能只开零售店,也在其他店当员工
@@ -144,13 +145,14 @@ class StaffClass extends BaseClass
                 foreach ($shopList as $shop) {
                     if ($shop->ptStyle == 1) {
                         $admin->currentShopId = $shop->id;
+                        $admin->currentGhsShopId = 0;
                         $admin->save();
                     } else {
                         util::fail('账号异常,请联系管理员,编号266389');
                     }
                 }
             } else {
-                if (count($shopList) > 2) {
+                if (count($shopList) != 2) {
                     util::fail('账号异常,请联系管理员,编号873380');
                 }
                 foreach ($shopList as $shop) {