Ver Fonte

超级会员

shish há 9 meses atrás
pai
commit
4ced90a5be
1 ficheiros alterados com 4 adições e 3 exclusões
  1. 4 3
      app-ghs/controllers/ShopAdminController.php

+ 4 - 3
app-ghs/controllers/ShopAdminController.php

@@ -46,9 +46,6 @@ class ShopAdminController extends BaseController
         $transaction = $connection->beginTransaction();
         $transaction = $connection->beginTransaction();
         try {
         try {
 
 
-            $staff->founder = 2;
-            $staff->save();
-
             $newAdminId = $staff->adminId;
             $newAdminId = $staff->adminId;
 
 
             $mainId = $staff->mainId;
             $mainId = $staff->mainId;
@@ -66,6 +63,10 @@ class ShopAdminController extends BaseController
                     ShopAdminClass::updateByCondition(['mainId' => $mainId, 'adminId' => $adminId], ['founder' => 1]);
                     ShopAdminClass::updateByCondition(['mainId' => $mainId, 'adminId' => $adminId], ['founder' => 1]);
                 }
                 }
             }
             }
+
+            $staff->founder = 2;
+            $staff->save();
+
             $transaction->commit();
             $transaction->commit();
             util::complete('操作成功');
             util::complete('操作成功');
         } catch (\Exception $e) {
         } catch (\Exception $e) {