|
|
@@ -86,13 +86,13 @@ class ShopController extends BaseController
|
|
|
//更新门店 ssh 2020.2.29
|
|
|
public function actionUpdate()
|
|
|
{
|
|
|
- $shop = $this->shop;
|
|
|
- $join = $shop->join ?? 0;
|
|
|
- $default = $shop->default ?? 0;
|
|
|
- if ($join == 0 && $default == 0) {
|
|
|
- util::fail('请在总店操作');
|
|
|
- }
|
|
|
$data = Yii::$app->request->post();
|
|
|
+
|
|
|
+ $shopAdmin = $this->shopAdmin;
|
|
|
+ if (isset($shopAdmin->super) == false || $shopAdmin->super != 1) {
|
|
|
+ util::fail('超管才能修改');
|
|
|
+ }
|
|
|
+
|
|
|
$data['sjId'] = $this->sjId;
|
|
|
$id = $data['id'] ?? 0;
|
|
|
$shop = ShopService::getById($id);
|
|
|
@@ -114,7 +114,7 @@ class ShopController extends BaseController
|
|
|
$join = $shop->join ?? 0;
|
|
|
$default = $shop->default ?? 0;
|
|
|
if ($join == 0 && $default == 0) {
|
|
|
- util::fail('请在总店操作');
|
|
|
+ util::fail('请在默认门店操作');
|
|
|
}
|
|
|
|
|
|
$data = Yii::$app->request->post();
|