|
|
@@ -19,7 +19,7 @@ class HdController extends BaseController
|
|
|
{
|
|
|
$get = Yii::$app->request->get();
|
|
|
$id = $get['id'] ?? 0;
|
|
|
- $hd = HdClass::getById($id,true);
|
|
|
+ $hd = HdClass::getById($id, true);
|
|
|
if (empty($hd)) {
|
|
|
util::fail('没有花店信息');
|
|
|
}
|
|
|
@@ -35,7 +35,7 @@ class HdController extends BaseController
|
|
|
{
|
|
|
$get = Yii::$app->request->get();
|
|
|
$id = $get['id'] ?? 0;
|
|
|
- $hd = HdClass::getById($id,true);
|
|
|
+ $hd = HdClass::getById($id, true);
|
|
|
if (empty($hd)) {
|
|
|
util::fail('没有花店信息');
|
|
|
}
|
|
|
@@ -123,19 +123,25 @@ class HdController extends BaseController
|
|
|
$delStatus = $get['delStatus'] ?? 0;
|
|
|
$userId = $this->userId;
|
|
|
|
|
|
- $mallUpgrading = getenv('MALL_UPGRADING') == false ? 0 : getenv('MALL_UPGRADING');
|
|
|
- if ($mallUpgrading == 1) {
|
|
|
- $allowShopAdminIdsStr = getenv('MALL_UPGRADE_ALLOW_USER_IDS') ?: '';
|
|
|
- $allowShopAdminIds = !empty($allowShopAdminIdsStr) ? explode(',', $allowShopAdminIdsStr) : [];
|
|
|
- if (!in_array($userId, $allowShopAdminIds)) {
|
|
|
- util::fail('系统升级中,稍后再试,编号:'.$userId);
|
|
|
+ $respond = ['list' => []];
|
|
|
+ if ($userId > 0) {
|
|
|
+
|
|
|
+ $mallUpgrading = getenv('MALL_UPGRADING') == false ? 0 : getenv('MALL_UPGRADING');
|
|
|
+ if ($mallUpgrading == 1) {
|
|
|
+ $allowShopAdminIdsStr = getenv('MALL_UPGRADE_ALLOW_USER_IDS') ?: '';
|
|
|
+ $allowShopAdminIds = !empty($allowShopAdminIdsStr) ? explode(',', $allowShopAdminIdsStr) : [];
|
|
|
+ if (!in_array($userId, $allowShopAdminIds)) {
|
|
|
+ util::fail('系统升级中,稍后再试,编号:' . $userId);
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
+ $where = [];
|
|
|
+ $where['userId'] = $userId;
|
|
|
+ $where['delStatus'] = $delStatus;
|
|
|
+ $respond = HdClass::getHdList($where);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
- $where = [];
|
|
|
- $where['userId'] = $userId;
|
|
|
- $where['delStatus'] = $delStatus;
|
|
|
- $respond = HdClass::getHdList($where);
|
|
|
util::success($respond);
|
|
|
}
|
|
|
|