增加:配送商缴费订单记录及分配相关接口
This commit is contained in:
parent
5d3a8f685f
commit
fb7e051be9
|
|
@ -0,0 +1,83 @@
|
||||||
|
<?php
|
||||||
|
namespace app\controller\admin\marketing\agent;
|
||||||
|
|
||||||
|
|
||||||
|
use app\common\repositories\marketing\agent\AgentDeliveryRepository;
|
||||||
|
use crmeb\basic\BaseController;
|
||||||
|
use think\App;
|
||||||
|
|
||||||
|
class Delivery extends BaseController{
|
||||||
|
|
||||||
|
protected $repository;
|
||||||
|
|
||||||
|
public function __construct(App $app, AgentDeliveryRepository $repository){
|
||||||
|
parent::__construct($app);
|
||||||
|
$this->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();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -503,6 +503,18 @@ Route::group(function () {
|
||||||
'_path' => '/marketing/agent/list',
|
'_path' => '/marketing/agent/list',
|
||||||
'_auth' => true,
|
'_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 () {
|
Route::group('marketing/activity', function () {
|
||||||
// 活动分类
|
// 活动分类
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue