|
|
@@ -229,11 +229,20 @@ class ShopController extends BaseController
|
|
|
}
|
|
|
|
|
|
$newShopId = Yii::$app->request->post('shopId', 0);
|
|
|
+ $deviceId = Yii::$app->request->post('deviceId', '');
|
|
|
+ if (empty($deviceId)) {
|
|
|
+ util::fail('设备ID出错');
|
|
|
+ }
|
|
|
$newShop = ShopClass::getById($newShopId, true);
|
|
|
if (empty($newShop)) {
|
|
|
util::fail('没有找到门店30');
|
|
|
}
|
|
|
$res = \bizHd\admin\classes\AdminClass::toggleShop($this->admin, $newShop, $this->sjId, $this->shopAdmin);
|
|
|
+
|
|
|
+ //设备登录状态更新
|
|
|
+ \bizHd\device\classes\HdDeviceClass::updateByCondition(['shopId'=>$this->shopId, 'deviceId'=>$deviceId], ['status'=>0]);
|
|
|
+ //\bizHd\device\classes\HdDeviceClass::updateByCondition(['shopId'=>$newShopId, 'deviceId'=>$deviceId], ['status'=>1]);
|
|
|
+
|
|
|
util::success($res);
|
|
|
}
|
|
|
|