From 06ca0307649189280a74a336c149611f493920f0 Mon Sep 17 00:00:00 2001 From: lqmac Date: Tue, 12 Mar 2024 09:07:56 +0800 Subject: [PATCH] 1 --- app/api/controller/Setting.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/app/api/controller/Setting.php b/app/api/controller/Setting.php index cd3694ec..094cd7a6 100644 --- a/app/api/controller/Setting.php +++ b/app/api/controller/Setting.php @@ -14,6 +14,7 @@ namespace app\api\controller; use think\response\Json; use app\api\service\Setting as SettingService; +use app\store\model\Delivery as DeliveryModel; /** * 商城设置控制器 @@ -35,4 +36,18 @@ class Setting extends Controller $setting = $service->getPublic(); return $this->renderSuccess(compact('setting')); } + + /** + * 获取所有记录 + * @return Json + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException + */ + public function deliveryall(): Json + { + $model = new DeliveryModel; + $list = $model->getAll(); + return $this->renderSuccess(compact('list')); + } }