From fb7e051be9605ad785d1d5da198971d94c408fd7 Mon Sep 17 00:00:00 2001 From: wuhui_zzw <1760308791@qq.com> Date: Wed, 19 Jun 2024 09:10:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=EF=BC=9A=E9=85=8D=E9=80=81?= =?UTF-8?q?=E5=95=86=E7=BC=B4=E8=B4=B9=E8=AE=A2=E5=8D=95=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E5=8F=8A=E5=88=86=E9=85=8D=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/marketing/agent/Delivery.php | 83 +++++++++++++++++++ route/admin/marketing.php | 12 +++ 2 files changed, 95 insertions(+) create mode 100644 app/controller/admin/marketing/agent/Delivery.php diff --git a/app/controller/admin/marketing/agent/Delivery.php b/app/controller/admin/marketing/agent/Delivery.php new file mode 100644 index 0000000..13e99f6 --- /dev/null +++ b/app/controller/admin/marketing/agent/Delivery.php @@ -0,0 +1,83 @@ +repository = $repository; + } + /** + * Common: 获取缴费列表 + * Author: wu-hui + * Time: 2024/06/18 17:23 + * @return mixed + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException + */ + public function orderList(){ + // 参数处理 + [$page,$limit] = $this->getPage(); + $params = $this->request->params([ + ['agent_id', ''], + 'status' + ]); + // 信息列表获取 + $data = $this->repository->getList((array)$params,(int)$page,(int)$limit); + + return app('json')->success($data); + } + /** + * Common: 获取相关商户 + * Author: wu-hui + * Time: 2024/06/18 17:48 + * @return mixed + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException + */ + public function merList(){ + // 参数处理 + [$page,$limit] = $this->getPage(); + $params = $this->request->params([ + ['agent_id', ''], + ]); + // 信息列表获取 + $data = $this->repository->getMerList((array)$params,(int)$page,(int)$limit); + + return app('json')->success($data); + } + /** + * Common: 分配订单 + * Author: wu-hui + * Time: 2024/06/18 17:55 + * @return mixed + */ + public function orderAllocation(){ + // 参数获取 + $params = $this->request->params([ + ['mer_id', 0], + ['agent_delivery_id', 0], + ]); + // 分配到订单 + $this->repository->allocationOrder((int)$params['mer_id'], (int)$params['agent_delivery_id']); + + + return app('json')->success(); + } + + + + + + + +} diff --git a/route/admin/marketing.php b/route/admin/marketing.php index a6e88c5..3018552 100644 --- a/route/admin/marketing.php +++ b/route/admin/marketing.php @@ -503,6 +503,18 @@ Route::group(function () { '_path' => '/marketing/agent/list', '_auth' => true, ]); + // 代理中心 - 子项 + Route::group('marketing/agent', function () { + // 配送商 + Route::get('delivery_order','Delivery/orderList'); + Route::get('delivery_mer','Delivery/merList'); + Route::post('delivery_order_allocation','Delivery/orderAllocation'); + + + + + + })->prefix('admin.marketing.agent.'); // 活动相关 Route::group('marketing/activity', function () { // 活动分类