|
@@ -143,6 +143,10 @@ class User extends BaseModel
|
|
|
public static function getUserList($where)
|
|
|
{
|
|
|
$model = self::setWherePage(self::setWhere($where), $where, ['w.sex', 'w.province', 'w.city', 'u.status', 'u.is_promoter'], ['u.nickname', 'u.uid', 'u.phone']);
|
|
|
+ if ($where['fl'] == 1){
|
|
|
+ $model = $model->where('white_integral', '>', 0);
|
|
|
+ $where[] = ['white_integral', '>', 0];
|
|
|
+ }
|
|
|
$list = $model->alias('u')
|
|
|
->join('WechatUser w', 'u.uid=w.uid')
|
|
|
->field('u.*,w.country,w.province,w.city,w.sex,w.unionid,w.openid,w.routine_openid,w.groupid,w.tagid_list,w.subscribe,w.subscribe_time')
|
|
@@ -180,8 +184,12 @@ class User extends BaseModel
|
|
|
else if (time() > $levelinfo['valid_time']) $item['vip_name'] = SystemUserLevel::where('id', $levelinfo['level_id'])->value('name');
|
|
|
}
|
|
|
});//->toArray();
|
|
|
- $count = self::setWherePage(self::setWhere($where), $where, ['w.sex', 'w.province', 'w.city', 'u.status', 'u.is_promoter'], ['u.nickname', 'u.uid'])->alias('u')->join('WechatUser w', 'u.uid=w.uid')->count();
|
|
|
- return ['count' => $count, 'data' => $list];
|
|
|
+ if ($where['fl'] == 1){
|
|
|
+ $count = self::setWherePage(self::setWhere($where), $where, ['w.sex', 'w.province', 'w.city', 'u.status', 'u.is_promoter'], ['u.nickname', 'u.uid'])->where('white_integral', '>', 0)->alias('u')->join('WechatUser w', 'u.uid=w.uid')->count();
|
|
|
+ }else{
|
|
|
+ $count = self::setWherePage(self::setWhere($where), $where, ['w.sex', 'w.province', 'w.city', 'u.status', 'u.is_promoter'], ['u.nickname', 'u.uid'])->alias('u')->join('WechatUser w', 'u.uid=w.uid')->count();
|
|
|
+
|
|
|
+ } return ['count' => $count, 'data' => $list];
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -1156,7 +1164,7 @@ class User extends BaseModel
|
|
|
|
|
|
public static function getSpreadList($uid, $page, $limit)
|
|
|
{
|
|
|
- $list = self::where('spread_uid', $uid)->field('uid,nickname,now_money,integral,add_time')
|
|
|
+ $list = self::where('spread_uid', $uid)->field('uid,nickname,white_integral,now_money,integral,add_time')
|
|
|
->order('uid desc')->page((int)$page, (int)$limit)->select();
|
|
|
count($list) && $list = $list->toArray();
|
|
|
foreach ($list as &$item) {
|