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 () { // 活动分类