Browse Source

1.13,补充

Crazy 4 tháng trước cách đây
mục cha
commit
6f91101b7a

+ 1 - 1
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/user/AdminUserMapper.java

@@ -330,7 +330,7 @@ public interface AdminUserMapper extends BaseMapperX<AdminUserDO> {
     List<AdminUserDO> getStudentErrorAttendance();
 
 
-    @Select("SELECT COUNT(*) FROM system_users WHERE grade =#{grade} AND supervisor_id = #{supervisorId} AND (external_supervisor_id IS NULL OR external_supervisor_id == 0)  AND master_type = #{masterType} AND user_type = '1' AND deleted = 0")
+    @Select("SELECT COUNT(*) FROM system_users WHERE grade =#{grade} AND supervisor_id = #{supervisorId} AND (external_supervisor_id IS NULL OR external_supervisor_id = 0)  AND master_type = #{masterType} AND user_type = '1' AND deleted = 0")
     Integer countStudentListBySupervisorId(@Param("grade") String grade,@Param("supervisorId") Long supervisorId, @Param("masterType") Integer masterType);
 
     @Select("SELECT COUNT(*) FROM system_users WHERE grade =#{grade} AND external_supervisor_id = #{externalSupervisorId} AND master_type = #{masterType} AND user_type = '1' AND deleted = 0")

+ 4 - 4
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/supervisorSelectionSetting/supervisorSelectionSettingServiceImpl.java

@@ -95,10 +95,10 @@ public class supervisorSelectionSettingServiceImpl implements supervisorSelectio
         result.getList().forEach(re->{
             Long supervisorId = re.getSupervisorId();
             AdminUserDO user =adminUserService.getUser(re.getSupervisorId());
-            Integer  occupiedAcademicSlots =null;
-            Integer  occupiedProfessionalSlots =null;
-            Integer  agentAcademicSlots =null;
-            Integer  agentProfessionalSlots =null;
+            Integer  occupiedAcademicSlots =0;
+            Integer  occupiedProfessionalSlots =0;
+            Integer  agentAcademicSlots =0;
+            Integer  agentProfessionalSlots =0;
             if (user.getUserType().equals("3")){
                 occupiedAcademicSlots =adminUserService.countStudentListBySupervisorId(project.getStudentGrade(),supervisorId,1);//占用学硕
                 occupiedProfessionalSlots =adminUserService.countStudentListBySupervisorId(project.getStudentGrade(),supervisorId,2);//占用专硕