修改:商户列表显示招商人员信息
This commit is contained in:
parent
d64936c818
commit
5e7400560c
|
|
@ -17,6 +17,7 @@ use app\common\model\store\service\StoreService;
|
||||||
use app\common\model\system\config\SystemConfigValue;
|
use app\common\model\system\config\SystemConfigValue;
|
||||||
use app\common\model\system\financial\Financial;
|
use app\common\model\system\financial\Financial;
|
||||||
use app\common\model\system\serve\ServeOrder;
|
use app\common\model\system\serve\ServeOrder;
|
||||||
|
use app\common\model\user\User;
|
||||||
use app\common\repositories\store\order\StoreOrderRepository;
|
use app\common\repositories\store\order\StoreOrderRepository;
|
||||||
use app\common\repositories\store\StoreActivityRepository;
|
use app\common\repositories\store\StoreActivityRepository;
|
||||||
|
|
||||||
|
|
@ -283,6 +284,9 @@ class Merchant extends BaseModel
|
||||||
return (int)$monthOrderCount;
|
return (int)$monthOrderCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function spread(){
|
||||||
|
return $this->hasOne(User::class,'uid','spread_uid');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -83,10 +83,15 @@ class MerchantRepository extends BaseRepository
|
||||||
'admin' => function ($query) {
|
'admin' => function ($query) {
|
||||||
$query->field('mer_id,account');
|
$query->field('mer_id,account');
|
||||||
},
|
},
|
||||||
|
'spread' => function ($query) {
|
||||||
|
$query->field('uid,nickname,avatar');
|
||||||
|
},
|
||||||
'merchantCategory',
|
'merchantCategory',
|
||||||
'merchantType'
|
'merchantType'
|
||||||
])
|
])
|
||||||
->field('sort,mer_id,mer_name,real_name,mer_phone,mer_address,mark,status,create_time,is_best,is_trader,type_id,category_id,copy_product_num,export_dump_num,is_margin,margin,ot_margin,mer_avatar,margin_remind_time')->select();
|
->field('uid,spread_uid,sort,mer_id,mer_name,real_name,mer_phone,mer_address,mark,status,create_time,is_best,is_trader,type_id,category_id,copy_product_num,export_dump_num,is_margin,margin,ot_margin,mer_avatar,margin_remind_time')
|
||||||
|
->select();
|
||||||
|
|
||||||
return compact('count', 'list');
|
return compact('count', 'list');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue