优化:移动端 推广人信息列表输出是否暂时绑定相关信息
This commit is contained in:
parent
bae78b6a27
commit
c5303a92cd
|
|
@ -1019,7 +1019,9 @@ class UserRepository extends BaseRepository
|
|||
$where['spread_uid'] = $uid;
|
||||
$query = $this->search($where);
|
||||
$count = $query->count();
|
||||
$list = $query->setOption('field', [])->field('uid,avatar,nickname,pay_count,pay_price,spread_count,spread_time')->page($page, $limit)->select();
|
||||
$list = $query->setOption('field', [])
|
||||
->field('uid,avatar,nickname,pay_count,pay_price,spread_count,spread_time,spread_fixed,spread_limit')
|
||||
->page($page, $limit)->select();
|
||||
return compact('list', 'count');
|
||||
}
|
||||
|
||||
|
|
@ -1042,7 +1044,9 @@ class UserRepository extends BaseRepository
|
|||
if (count($where['spread_uids'])) {
|
||||
$query = $this->search($where);
|
||||
$count = $query->count();
|
||||
$list = $query->setOption('field', [])->field('uid,avatar,nickname,pay_count,pay_price,spread_count,spread_time')->page($page, $limit)->select();
|
||||
$list = $query->setOption('field', [])
|
||||
->field('uid,avatar,nickname,pay_count,pay_price,spread_count,spread_time,spread_fixed,spread_limit')
|
||||
->page($page, $limit)->select();
|
||||
} else {
|
||||
$list = [];
|
||||
$count = 0;
|
||||
|
|
|
|||
|
|
@ -250,17 +250,24 @@ class User extends BaseController
|
|||
* @author xaboy
|
||||
* @day 2020/6/22
|
||||
*/
|
||||
public function spread_list()
|
||||
{
|
||||
|
||||
public function spread_list(){
|
||||
$where = $this->request->params([ 'sort', 'keyword']);
|
||||
[$start,$stop]= $this->request->params(['start','stop'],true);
|
||||
$where['spread_time'] = $start&&$stop ? date('Y/m/d',$start).'-'.date('Y/m/d',$stop) : '';
|
||||
$level = $this->request->param('level');
|
||||
[$page, $limit] = $this->getPage();
|
||||
return app('json')->success($level == 2
|
||||
? $this->repository->getTwoLevelList($this->request->uid(),$where, $page, $limit)
|
||||
: $this->repository->getOneLevelList($this->request->uid(),$where, $page, $limit));
|
||||
$uid = $this->request->uid();
|
||||
$result = $level == 2 ? $this->repository->getTwoLevelList($uid,$where,$page,$limit) : $this->repository->getOneLevelList($uid,$where,$page,$limit);
|
||||
// 循环处理数据
|
||||
$config = systemConfig(['extension_limit', 'extension_limit_day', 'integral_user_give']);
|
||||
foreach($result['list'] as &$spreadInfo){
|
||||
$spreadInfo['is_temporary'] = 0;
|
||||
if($config['extension_limit'] && $config['extension_limit_day'] && $spreadInfo['spread_limit'] && $spreadInfo['spread_fixed'] == 0) {
|
||||
$spreadInfo['is_temporary'] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
return app('json')->success($result);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue