Parcourir la source

自动开通方式调整

shish il y a 5 ans
Parent
commit
ae05f65d8e

+ 7 - 1
app-hd/controllers/ApplyController.php

@@ -97,7 +97,13 @@ class ApplyController extends BaseController
         $transaction = $connection->beginTransaction();
         try {
             //增加或更新申请
-            ApplyService::replaceRetail($post);
+            $respond = ApplyService::replaceRetail($post);
+
+            $id = $respond['id'] ?? 0;
+            if (!empty($id)) {
+                ApplyService::pass($id);
+            }
+
             $transaction->commit();
         } catch (\Exception $exception) {
             $transaction->rollBack();

+ 0 - 5
biz-hd/saas/services/ApplyService.php

@@ -151,11 +151,6 @@ class ApplyService extends BaseService
             \biz\admin\classes\AdminClass::updateById($adminId, ['openShop' => 2]);
         }
 
-        $id = $respond['id'] ?? 0;
-        if (!empty($id)) {
-            ApplyService::pass($id);
-        }
-
         return $respond;
     }