From f2f0fb7fa15add21479bcf6468e803879e1c0333 Mon Sep 17 00:00:00 2001 From: liuqing Date: Sun, 10 Mar 2024 22:53:34 +0800 Subject: [PATCH] update --- app/api/controller/User.php | 11 +++++++++++ 1 file changed, 11 insertions(+) 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); + } +