shish 5 rokov pred
rodič
commit
718461e5ad

+ 12 - 4
app-pt/controllers/GhsController.php

@@ -44,11 +44,19 @@ class GhsController extends BaseController
         if (empty($list)) {
             util::fail('没有找到门店');
         }
-        foreach ($list as $current) {
-            $ownShopId = $current['id'];
-            GhsClass::build($currentShopId, $ownShopId, $ownSjId);
+        $connection = Yii::$app->db;
+        $transaction = $connection->beginTransaction();
+        try {
+            foreach ($list as $current) {
+                $ownShopId = $current['id'];
+                GhsClass::build($currentShopId, $ownShopId, $ownSjId);
+            }
+            $transaction->commit();
+            util::complete();
+        } catch (Exception $exception) {
+            $transaction->rollBack();
+            util::fail("绑定失败");
         }
-        util::complete();
     }
 
 }

+ 1 - 1
common/components/dict.php

@@ -10,7 +10,7 @@ class dict
     public static $data = [
 
         //需要显示国兰的信息 0不需要 1需要(要审核小程序请显示国兰信息)
-        'showGlInfo' => 1,
+        'showGlInfo' => 0,
         //显示零售和供货商的演示入口
         'showDemo' => 1,
         //零售演示的管理员id