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'])