diff --git a/app/api/controller/User.php b/app/api/controller/User.php index 4dc06861..56ccc7c4 100644 --- a/app/api/controller/User.php +++ b/app/api/controller/User.php @@ -30,6 +30,7 @@ use think\db\exception\DataNotFoundException; use think\db\exception\DbException; use think\db\exception\ModelNotFoundException; use think\response\Json; +use think\Db; use app\common\model\dealer\Order as DealerOrderModel; use app\common\model\Order as OrderModel; /** @@ -388,6 +389,16 @@ class User extends Controller return $this->renderSuccess(str_replace(root_path()."public/", base_url(), $qrcode)); } + public function maintenance() + { + $storeId = request()->header()['storeid']; + $list = Db::table('yoshop_maintenance')->where('store_id', $storeId)->field('name,id')->where('status',1)->select(); + foreach ($list as &$item) { + $list['tags'] = Db::table('yoshop_maintenance')->field('name,id,parent_id')->where('parent_id', $item['id'])->where('status',1)->select(); + } + return $this->renderSuccess($list); + } +