|
@@ -180,6 +180,26 @@ class ShopController extends BaseController
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ //修改门店营业时间
|
|
|
|
|
+ public function actionUpdateOpenTime()
|
|
|
|
|
+ {
|
|
|
|
|
+ $post = Yii::$app->request->post();
|
|
|
|
|
+ $shopId = intval($post['shopId'] ?? $post['id'] ?? 0);
|
|
|
|
|
+ if ($shopId <= 0) {
|
|
|
|
|
+ $shopId = intval($this->shopId);
|
|
|
|
|
+ }
|
|
|
|
|
+ if ($shopId != intval($this->shopId)) {
|
|
|
|
|
+ util::fail('不是您的门店');
|
|
|
|
|
+ }
|
|
|
|
|
+ $shop = ShopClass::getShopInfo($shopId);
|
|
|
|
|
+ if (empty($shop)) {
|
|
|
|
|
+ util::fail('门店不存在');
|
|
|
|
|
+ }
|
|
|
|
|
+ ShopClass::valid($shop, $this->sjId);
|
|
|
|
|
+ ShopClass::updateOpenTime($shop, $post);
|
|
|
|
|
+ util::complete('修改成功');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public function actionAdd()
|
|
public function actionAdd()
|
|
|
{
|
|
{
|
|
|
$data = Yii::$app->request->post();
|
|
$data = Yii::$app->request->post();
|