lgy 1 day ago
parent
commit
bb1a230a6b
1 changed files with 3 additions and 3 deletions
  1. 3 3
      server/application/api/model/dict/DictModel.php

+ 3 - 3
server/application/api/model/dict/DictModel.php

@@ -182,11 +182,11 @@ class DictModel extends ZskkDefaultModel {
     {
         $data = ExamModel::where('institution_id',$id)
             ->where("application_department is not null and application_department != ''")
-            ->field("count(*) as count,application_department")
+            ->field("count(*),application_department")
             ->cache($id.'_depart',43200)
             ->group('application_department')
-            ->having('count>1')
-            ->order('count desc')
+            ->having('count(*)>1')
+            ->order('count(*) desc')
             ->select();
         return $data;
     }