Explorar el Código

云喇叭和小票机

shish hace 4 años
padre
commit
245710acde
Se han modificado 1 ficheros con 25 adiciones y 0 borrados
  1. 25 0
      app-hd/controllers/ShopExtController.php

+ 25 - 0
app-hd/controllers/ShopExtController.php

@@ -87,4 +87,29 @@ class ShopExtController extends BaseController
         util::success($ext);
     }
 
+    //获取云喇叭信息 ssh 20220105
+    public function actionGetLb()
+    {
+        $shopId = $this->shopId;
+        $ext = ShopExtClass::getByCondition(['shopId' => $shopId]);
+        util::success($ext);
+    }
+
+    //添加喇叭 ssh 20220105
+    public function actionAddLb()
+    {
+        $shopAdmin = $this->shopAdmin;
+        if (isset($shopAdmin->super) == false || $shopAdmin->super != 1) {
+            util::fail('超管才能修改');
+        }
+
+        $shopId = $this->shopId;
+        $ext = ShopExtClass::getByCondition(['shopId' => $shopId], true);
+        $get = Yii::$app->request->get();
+        $lbSn = $get['lbSn'] ?? '';
+        $ext->lbSn = $lbSn;
+        $ext->save();
+        util::complete('设置成功');
+    }
+
 }