Ver Fonte

客户设置

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

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

@@ -43,9 +43,10 @@ class CustomController extends BaseController
     {
         $get = Yii::$app->request->get();
         $showSold = $get['showSold'] ?? 0;
-        $mainId = $this->mainId;
-        CustomClass::updateByCondition(['ownMainId' => $mainId], ['showSold' => $showSold]);
-        \bizGhs\ghs\classes\GhsClass::updateByCondition(['mainId' => $mainId], ['showSold' => $showSold]);
+        $shop = $this->shop;
+        //没有配置到每个客户,只在总店有控制
+        $shop->showSold = $showSold;
+        $shop->save();
         util::complete('设置成功');
     }