接口修改4
This commit is contained in:
parent
f1279af860
commit
ae7537a62a
@ -76,7 +76,7 @@ class Article extends BaseController
|
||||
//查询
|
||||
$select = Db::table('fa_article')->where($where)->page($page)->limit(20)
|
||||
->alias('a')
|
||||
->join(['article_vote_side_tables' => 'avst'],"a.id = avst.article_id and avst.end_time >=".date('Y-m-d'))
|
||||
->join(['fa_article_vote_side_tables' => 'avst'],"a.id = avst.article_id and avst.end_time >=".date('Y-m-d'))
|
||||
->field('a.id,a.title,a.describe,a.user_id,a.view,a.view_time,a.image,a.end_time,a.is_solve,a.is_vote,a.is_nickname,a.video,a.category_type,avst.end_time as die_time')
|
||||
->order('a.id DESC')
|
||||
->select()->toArray();
|
||||
@ -87,7 +87,7 @@ class Article extends BaseController
|
||||
//查询
|
||||
$select = Db::table('fa_article')->where($where)->page($page)->limit(20)
|
||||
->alias('a')
|
||||
->join(['article_vote_side_tables' => 'avst'],"a.id = avst.article_id and avst.end_time <=".date('Y-m-d'))
|
||||
->join(['fa_article_vote_side_tables' => 'avst'],"a.id = avst.article_id and avst.end_time <=".date('Y-m-d'))
|
||||
->field('a.id,a.title,a.describe,a.user_id,a.view,a.view_time,a.image,a.end_time,a.is_solve,a.is_vote,a.is_nickname,a.video,a.category_type,avst.end_time as die_time')
|
||||
->order('a.id DESC')->select()->toArray();
|
||||
}else{
|
||||
@ -658,11 +658,11 @@ class Article extends BaseController
|
||||
}
|
||||
}
|
||||
$yishi = Db::table('fa_article')->alias('a')->join(['fa_article_vote_side_tables' => 'b'],'a.id=b.article_id')->where($www)->where('a.category_id',162)->whereTime('b.end_time', '>', date('Y-m-d H:i:s'))->count();
|
||||
$maodun = Db::table('fa_article')->alias('a')->join(['article_comment' => 'b'],'a.id=b.vote_id')->where('a.is_solve', 1)->where($where)->where('a.category_id',147)->count();
|
||||
$xiejiao = Db::table('fa_article')->alias('a')->join(['article_comment' => 'b'],'a.id=b.vote_id')->where('a.is_solve', 1)->where($where)->where('a.category_id', 148)->count();
|
||||
$saohei = Db::table('fa_article')->alias('a')->join(['article_comment' => 'b'],'a.id=b.vote_id')->where('a.is_solve', 1)->where($where)->where('a.category_id', 149)->count();
|
||||
$sos = Db::table('fa_article')->alias('a')->join(['article_comment' => 'b'],'a.id=b.vote_id')->where('a.is_solve', 1)->where($where)->where('a.category_id', 150)->count();
|
||||
$one_shuqiu = Db::table('fa_article')->alias('a')->join(['article_comment' => 'b'],'a.id=b.vote_id')->where('a.is_solve', 1)->where($where)->where('a.category_id', 165)->count();
|
||||
$maodun = Db::table('fa_article')->alias('a')->join(['fa_article_comment' => 'b'],'a.id=b.vote_id')->where('a.is_solve', 1)->where($where)->where('a.category_id',147)->count();
|
||||
$xiejiao = Db::table('fa_article')->alias('a')->join(['fa_article_comment' => 'b'],'a.id=b.vote_id')->where('a.is_solve', 1)->where($where)->where('a.category_id', 148)->count();
|
||||
$saohei = Db::table('fa_article')->alias('a')->join(['fa_article_comment' => 'b'],'a.id=b.vote_id')->where('a.is_solve', 1)->where($where)->where('a.category_id', 149)->count();
|
||||
$sos = Db::table('fa_article')->alias('a')->join(['fa_article_comment' => 'b'],'a.id=b.vote_id')->where('a.is_solve', 1)->where($where)->where('a.category_id', 150)->count();
|
||||
$one_shuqiu = Db::table('fa_article')->alias('a')->join(['fa_article_comment' => 'b'],'a.id=b.vote_id')->where('a.is_solve', 1)->where($where)->where('a.category_id', 165)->count();
|
||||
$select = [
|
||||
'yishi' => $yishi,
|
||||
'maodun' => $maodun,
|
||||
@ -738,7 +738,7 @@ class Article extends BaseController
|
||||
//查询
|
||||
$select = Db::table('fa_article')->where($where)->page($page)->limit(20)
|
||||
->alias('a')
|
||||
->join(['article_vote_side_tables' => 'avst'],"a.id = avst.article_id and avst.end_time >=".date('Y-m-d'))
|
||||
->join(['fa_article_vote_side_tables' => 'avst'],"a.id = avst.article_id and avst.end_time >=".date('Y-m-d'))
|
||||
->field('a.id,a.title,a.describe,a.user_id,a.view,a.view_time,a.image,a.end_time,a.is_solve,a.is_vote,a.is_nickname,a.video,a.category_type,avst.end_time as die_time')
|
||||
->order('a.id DESC')
|
||||
->select()->toArray();
|
||||
@ -749,7 +749,7 @@ class Article extends BaseController
|
||||
//查询
|
||||
$select = Db::table('fa_article')->where($where)->page($page)->limit(20)
|
||||
->alias('a')
|
||||
->join(['article_vote_side_tables' => 'avst'],"a.id = avst.article_id and avst.end_time <=".date('Y-m-d'))
|
||||
->join(['fa_article_vote_side_tables' => 'avst'],"a.id = avst.article_id and avst.end_time <=".date('Y-m-d'))
|
||||
->field('a.id,a.title,a.describe,a.user_id,a.view,a.view_time,a.image,a.end_time,a.is_solve,a.is_vote,a.is_nickname,a.video,a.category_type,avst.end_time as die_time')
|
||||
->order('a.id DESC')->select()->toArray();
|
||||
}else{
|
||||
|
Loading…
x
Reference in New Issue
Block a user