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');// 申请信息