From d01e2d823859583b17f08c2fcc273c4f21bffcfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BD=AD=E6=A1=83?= <1098598843@qq.com> Date: Thu, 9 Feb 2023 11:14:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/Article.php | 2 ++ app/api/controller/Maintainentry.php | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/api/controller/Article.php b/app/api/controller/Article.php index 4cf728f..d0e3d1d 100644 --- a/app/api/controller/Article.php +++ b/app/api/controller/Article.php @@ -663,6 +663,7 @@ class Article extends BaseController $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(); + $notice = Db::table('cms_notice')->where('status',1)->where('is_read',0)->count(); $select = [ 'yishi' => $yishi, 'maodun' => $maodun, @@ -670,6 +671,7 @@ class Article extends BaseController 'saohei' => $saohei, 'sos' => $sos, 'shuqiu' => $one_shuqiu, + 'notice' => $notice, ]; return $this->apiSuccess('ok', $select); } diff --git a/app/api/controller/Maintainentry.php b/app/api/controller/Maintainentry.php index 3788127..9977a13 100644 --- a/app/api/controller/Maintainentry.php +++ b/app/api/controller/Maintainentry.php @@ -755,7 +755,7 @@ class Maintainentry extends BaseController } } - $waste_land_area = $post['land_area'] - $mianji; + $waste_land_area = $post['land_area'] - $mianji - $post['breed_area']; if($waste_land_area < 0){ $waste_land_area = 0; } @@ -1417,7 +1417,7 @@ class Maintainentry extends BaseController } } - $waste_land_area = $post['land_area'] - $mianji; + $waste_land_area = $post['land_area'] - $mianji - $post['breed_area']; if($waste_land_area < 0){ $waste_land_area = 0; }