From 507a61239038ab0ef365303f708678faffe1d579 Mon Sep 17 00:00:00 2001 From: wuhui_zzw <1760308791@qq.com> Date: Fri, 2 Feb 2024 17:16:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=EF=BC=9A=E4=BB=A3=E7=90=86?= =?UTF-8?q?=E4=B8=AD=E5=BF=83=20-=20=E4=BB=A3=E7=90=86=E4=B8=8B=E7=BA=A7?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/dao/marketing/AgentBrokerageDao.php | 3 +++ app/common/model/marketing/AgentBrokerage.php | 4 ++++ app/controller/api/Agent.php | 2 +- route/api.php | 3 +-- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/common/dao/marketing/AgentBrokerageDao.php b/app/common/dao/marketing/AgentBrokerageDao.php index 676da31..c78240c 100644 --- a/app/common/dao/marketing/AgentBrokerageDao.php +++ b/app/common/dao/marketing/AgentBrokerageDao.php @@ -39,6 +39,9 @@ class AgentBrokerageDao extends BaseDao{ 'userOrder' => function($query){ $query->field('order_id,order_sn,create_time,title'); }, + 'storeOrder' => function($query){ + $query->field('order_id,order_sn,create_time'); + }, 'staff' => function($query){ $query->field('uid,nickname,avatar'); }, diff --git a/app/common/model/marketing/AgentBrokerage.php b/app/common/model/marketing/AgentBrokerage.php index 6b4d4ee..a413893 100644 --- a/app/common/model/marketing/AgentBrokerage.php +++ b/app/common/model/marketing/AgentBrokerage.php @@ -2,6 +2,7 @@ namespace app\common\model\marketing; use app\common\model\BaseModel; +use app\common\model\store\order\StoreOrder; use app\common\model\user\User; use app\common\model\user\UserOrder; @@ -20,6 +21,9 @@ class AgentBrokerage extends BaseModel{ public function userOrder(){ return $this->hasOne(UserOrder::class,'order_id', 'user_order_id'); } + public function storeOrder(){ + return $this->hasOne(StoreOrder::class,'order_id', 'user_order_id'); + } public function staff(){ return $this->hasOne(User::class,'uid', 'staff_uid'); } diff --git a/app/controller/api/Agent.php b/app/controller/api/Agent.php index 0ccd3a1..83e888b 100644 --- a/app/controller/api/Agent.php +++ b/app/controller/api/Agent.php @@ -27,7 +27,7 @@ class Agent extends BaseController{ public function agentList(){ // 参数处理 [$page, $limit] = $this->getPage(); - $params = $this->request->params(['is_get_self','not_page']); + $params = $this->request->params(['is_get_self','not_page','pid']); if((int)$params['is_get_self'] > 0) $params['uid'] = $this->request->uid(); // 信息列表获取 if((int)$params['not_page'] > 0) $data = app()->make(AgentRepository::class)->getAllList((array)$params); diff --git a/route/api.php b/route/api.php index a9ca238..d9383d5 100644 --- a/route/api.php +++ b/route/api.php @@ -390,8 +390,7 @@ Route::group('api/', function () { Route::get('get_config', 'getConfig');// 获取配置信息 Route::post('agent_apply', 'apply');// 提交申请信息 Route::post('apply_record', 'applyRecord');// 申请记录 - Route::get('apply_info', 'applyInfo');// 申请记录 - + Route::get('apply_info', 'applyInfo');// 申请信息