From 17c550d122d4a187a0fb8afb7312fe9c78e8326b Mon Sep 17 00:00:00 2001 From: win10 Date: Wed, 10 Jun 2020 15:16:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=8F=AD=E7=BA=A7=E8=B6=85?= =?UTF-8?q?=E9=A2=9D=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/keti/model/KetiInfo.php | 2 +- app/teach/controller/Banji.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/keti/model/KetiInfo.php b/app/keti/model/KetiInfo.php index 1dc59f2a..0e7f51fa 100644 --- a/app/keti/model/KetiInfo.php +++ b/app/keti/model/KetiInfo.php @@ -56,7 +56,7 @@ class KetiInfo extends BaseModel $query->where('ketice_id', $src['ketice_id']); }) ->when(strlen($src['searchval']) > 0, function($query) use($src){ - $query->where('title', 'like', '%' . $src['searchval'] . '%'); + $query->where('title|bianhao', 'like', '%' . $src['searchval'] . '%'); }) ->with( [ diff --git a/app/teach/controller/Banji.php b/app/teach/controller/Banji.php index 15723e92..0e07104e 100644 --- a/app/teach/controller/Banji.php +++ b/app/teach/controller/Banji.php @@ -118,6 +118,9 @@ class Banji extends BaseController if($paixumax + $list['bjsum'] > 25) # 如果增加班级数超过2个,则少加班级 { $list['bjsum'] = 25 - $paixumax; + if($list['bjsum'] == 0){ + return json(['msg' => '已经超过同年级班级数的上线啦。', 'val' => 0]); + } } $i = 1; while($i <= $list['bjsum'])