|
|
@@ -14,21 +14,21 @@ class TennisLeague extends BaseModel {
|
|
|
|
|
|
function getinfo($list = 10, $page, $where = '')
|
|
|
{
|
|
|
- $source = \App\Models\Setinfo::where('id','1000')->first();
|
|
|
- if($source->infocontent != '混合数据'){
|
|
|
- $where[] = array('st_wq_local_league.source', '=', $source->infocontent);
|
|
|
- }
|
|
|
+// $source = \App\Models\Setinfo::where('id','1000')->first();
|
|
|
+// if($source->infocontent != '混合数据'){
|
|
|
+// $where[] = array('st_wq_local_league.source', '=', $source->infocontent);
|
|
|
+// }
|
|
|
if (is_array ($where) && count ($where) > 0){
|
|
|
$data = $this
|
|
|
- ->join('st_wq_local_league','st_wq_league.id','=','st_wq_local_league.lg_id')
|
|
|
- ->select('st_wq_league.id','st_wq_league.name_chinese','st_wq_league.area_id','st_wq_league.country_id','st_wq_league.status','st_wq_league.utime')
|
|
|
+ //->join('st_wq_local_league','st_wq_league.id','=','st_wq_local_league.lg_id')
|
|
|
+ ->select('st_wq_league.id','st_wq_league.name_chinese','st_wq_league.area_id','st_wq_league.country_id','st_wq_league.utime')
|
|
|
->orderby('st_wq_league.utime','desc')
|
|
|
->where($where)
|
|
|
->paginate ($list);
|
|
|
}else{
|
|
|
$data = $this
|
|
|
- ->join('st_wq_local_league','st_wq_league.id','=','st_wq_local_league.lg_id')
|
|
|
- ->select('st_wq_league.id','st_wq_league.name_chinese','st_wq_league.area_id','st_wq_league.country_id','st_wq_league.status','st_wq_league.utime')
|
|
|
+ //->join('st_wq_local_league','st_wq_league.id','=','st_wq_local_league.lg_id')
|
|
|
+ ->select('st_wq_league.id','st_wq_league.name_chinese','st_wq_league.area_id','st_wq_league.country_id','st_wq_league.utime')
|
|
|
->orderby('st_wq_league.utime','desc')
|
|
|
->orderby('utime','desc')
|
|
|
->paginate ($list);
|