点唱后端数据操作
This commit is contained in:
@@ -21,21 +21,21 @@ class SingerSong extends adminApi
|
|||||||
//搜索信息有值且是纯数字
|
//搜索信息有值且是纯数字
|
||||||
if(isset($search) && is_numeric($search)){
|
if(isset($search) && is_numeric($search)){
|
||||||
$where['ss.user_id'] = $search;
|
$where['ss.user_id'] = $search;
|
||||||
$wheres['ss.user_id'] = $search;
|
$wheres['user_id'] = $search;
|
||||||
}
|
}
|
||||||
if(isset($search) && !is_numeric($search)){
|
if(isset($search) && !is_numeric($search)){
|
||||||
$where['u.nickname'] = ['like', '%'.$search.'%'];;
|
$where['u.nickname'] = ['like', '%'.$search.'%'];;
|
||||||
}
|
}
|
||||||
if(isset($start_time) && isset($end_time)){
|
if(isset($start_time) && isset($end_time)){
|
||||||
$where['ss.createtime'] = ['between', [strtotime($start_time), strtotime($end_time)]];
|
$where['ss.createtime'] = ['between', [strtotime($start_time), strtotime($end_time)]];
|
||||||
$wheres['ss.createtime'] = ['between', [strtotime($start_time), strtotime($end_time)]];
|
$wheres['createtime'] = ['between', [strtotime($start_time), strtotime($end_time)]];
|
||||||
}
|
}
|
||||||
if(isset($status)){
|
if(isset($status)){
|
||||||
$where['ss.status'] = $status;
|
$where['ss.status'] = $status;
|
||||||
$wheres['ss.status'] = $status;
|
$wheres['status'] = $status;
|
||||||
}else{
|
}else{
|
||||||
$where['ss.status'] = 0;
|
$where['ss.status'] = 0;
|
||||||
$wheres['ss.status'] = 0;
|
$wheres['status'] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$count = db::name('vs_singer')->where($wheres)->count();
|
$count = db::name('vs_singer')->where($wheres)->count();
|
||||||
|
|||||||
Reference in New Issue
Block a user