瀏覽代碼

快捷查找设置

tags/正式版本
雍文秀 2 年之前
父節點
當前提交
9f1a076c9b
共有 1 個文件被更改,包括 9 次插入2 次删除
  1. 9
    2
      sexam/src/main/java/com/xhkjedu/sexam/service/exam/ESubjectSearchService.java

+ 9
- 2
sexam/src/main/java/com/xhkjedu/sexam/service/exam/ESubjectSearchService.java 查看文件

@@ -5,6 +5,7 @@ import com.xhkjedu.sexam.mapper.exam.EClassMapper;
5 5
 import com.xhkjedu.sexam.mapper.exam.ESubjectMapper;
6 6
 import com.xhkjedu.sexam.mapper.system.UserMapper;
7 7
 import com.xhkjedu.sexam.vo.exam.CTeacherVo;
8
+import com.xhkjedu.utils.N_Utils;
8 9
 import org.springframework.stereotype.Service;
9 10
 
10 11
 import javax.annotation.Resource;
@@ -84,7 +85,10 @@ public class ESubjectSearchService {
84 85
         }
85 86
         map.put("teachers", teachers);//匹配的教师
86 87
         String notExist = sb.toString();//未匹配的教师
87
-        map.put("notExist", notExist.substring(0, notExist.length() - 1));
88
+        if (N_Utils.isNotEmpty(notExist)) {
89
+            notExist = notExist.substring(0, notExist.length() - 1);
90
+        }
91
+        map.put("notExist", notExist);
88 92
         return map;
89 93
     }
90 94
 
@@ -126,7 +130,10 @@ public class ESubjectSearchService {
126 130
         }
127 131
         map.put("teachers", teachers);//匹配的教师
128 132
         String notExist = sb.toString();//未匹配的教师
129
-        map.put("notExist", notExist.substring(0, notExist.length() - 1));
133
+        if (N_Utils.isNotEmpty(notExist)) {
134
+            notExist = notExist.substring(0, notExist.length() - 1);
135
+        }
136
+        map.put("notExist", notExist);
130 137
         return map;
131 138
     }
132 139
 }

Loading…
取消
儲存