Commit e1bd000a authored by houyadong's avatar houyadong

成员交易逻辑修改-bug

parent 02440ae7
...@@ -237,6 +237,15 @@ class UserModel extends Model ...@@ -237,6 +237,15 @@ class UserModel extends Model
->group('userid') ->group('userid')
->order('sort_time desc') ->order('sort_time desc')
->select(); ->select();
if(empty($top3_data)){
$top3_data = $model->table($his_table_name)
->field('*,cj_time sort_time')
->where($entrust_where)
->where(['userid'=>['in',array_keys($top3_uids)],'cj_time'=>['gt',strtotime('today')]])
->group('userid')
->order('cj_time desc')
->select();
}
$top3_ids = array_column($top3_data,'id'); $top3_ids = array_column($top3_data,'id');
if(!empty($top3_ids)){ if(!empty($top3_ids)){
$entrust_where['id'] = ['not in',$top3_ids]; $entrust_where['id'] = ['not in',$top3_ids];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment