添加:代理中心 - 代理下级信息管理

This commit is contained in:
wuhui_zzw 2024-02-02 17:16:04 +08:00
parent 36d8f42664
commit 507a612390
4 changed files with 9 additions and 3 deletions

View File

@ -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');
},

View File

@ -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');
}

View File

@ -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);

View File

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