|
@@ -43,9 +43,10 @@ class Index extends Api
|
|
|
$where['user.attribute'] = $attribute;
|
|
|
}
|
|
|
//排除黑名单的
|
|
|
+ $where_black = [];
|
|
|
$black_ids = Db::name('user_black')->where(['uid'=>$this->auth->id])->column('black_uid');
|
|
|
if(!empty($black_ids)){
|
|
|
- $where['user.id'] = ['NOTIN',$black_ids];
|
|
|
+ $where_black['user.id'] = ['NOTIN',$black_ids];
|
|
|
}
|
|
|
//年龄
|
|
|
$agemin = input('agemin',18);
|
|
@@ -94,6 +95,7 @@ class Index extends Api
|
|
|
->join('user_power power' ,'user.id = power.user_id','LEFT')
|
|
|
->join('user_active active' ,'user.id = active.user_id','LEFT')
|
|
|
->where($where)
|
|
|
+ ->where($where_black)
|
|
|
->order('distance asc')
|
|
|
->autopage()
|
|
|
->select();
|
|
@@ -147,9 +149,10 @@ class Index extends Api
|
|
|
$where['user.attribute'] = $attribute;
|
|
|
}
|
|
|
//排除黑名单的
|
|
|
+ $where_black = [];
|
|
|
$black_ids = Db::name('user_black')->where(['uid'=>$this->auth->id])->column('black_uid');
|
|
|
if(!empty($black_ids)){
|
|
|
- $where['user.id'] = ['NOTIN',$black_ids];
|
|
|
+ $where_black['user.id'] = ['NOTIN',$black_ids];
|
|
|
}
|
|
|
//年龄
|
|
|
$agemin = input('agemin',18);
|
|
@@ -198,6 +201,7 @@ class Index extends Api
|
|
|
->join('user_power power' ,'user.id = power.user_id','LEFT')
|
|
|
->join('user_active active' ,'user.id = active.user_id','LEFT')
|
|
|
->where($where)
|
|
|
+ ->where($where_black)
|
|
|
->order('distance asc')
|
|
|
->autopage()
|
|
|
->select();
|