liu vor 1 Jahr
Ursprung
Commit
5cbe27826d

+ 28 - 8
src/main/java/com/template/controller/WelcomeBedController.java

@@ -215,12 +215,17 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
         //        当学院为空
         //        当学院为空
         PageUtils<WelcomeBed> result=null;
         PageUtils<WelcomeBed> result=null;
         if (ObjectUtils.isEmpty(collegeId)) {
         if (ObjectUtils.isEmpty(collegeId)) {
-            String collegeIds = "";
             WelcomeAccount account = welcomeAccountService.getById(accountId);
             WelcomeAccount account = welcomeAccountService.getById(accountId);
             if (ObjectUtils.isEmpty(account)) {
             if (ObjectUtils.isEmpty(account)) {
                 return CommonResult.fail("当前账号不存在,请重新登入");
                 return CommonResult.fail("当前账号不存在,请重新登入");
             }
             }
-            collegeIds = account.getCollegeId();
+            String aClassstrId = account.getCollegeId();
+            String[] split = aClassstrId.split(",");
+            List<String> collegeIds = new ArrayList<>();
+
+            for (String s : split) {
+                collegeIds.add(s);
+            }
             result = welcomeBedService.queryPageWelcomeBedsC(currentPage, pageCount, schoolId, buildId, dormitoryId, sex, isCheck, collegeIds, majorId, classstrId,retentionState);
             result = welcomeBedService.queryPageWelcomeBedsC(currentPage, pageCount, schoolId, buildId, dormitoryId, sex, isCheck, collegeIds, majorId, classstrId,retentionState);
         }else {
         }else {
            result = welcomeBedService.queryPageWelcomeBeds(currentPage, pageCount, schoolId, buildId, dormitoryId, sex, isCheck, collegeId, majorId, classstrId,retentionState);
            result = welcomeBedService.queryPageWelcomeBeds(currentPage, pageCount, schoolId, buildId, dormitoryId, sex, isCheck, collegeId, majorId, classstrId,retentionState);
@@ -681,12 +686,17 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
         //        当学院为空
         //        当学院为空
         List<WelcomeBed> result=null;
         List<WelcomeBed> result=null;
         if (ObjectUtils.isEmpty(collegeId)) {
         if (ObjectUtils.isEmpty(collegeId)) {
-            String collegeIds = "";
             WelcomeAccount account = welcomeAccountService.getById(accountId);
             WelcomeAccount account = welcomeAccountService.getById(accountId);
             if (ObjectUtils.isEmpty(account)) {
             if (ObjectUtils.isEmpty(account)) {
                 throw new RuntimeException("当前账号不存在,请重新登入");
                 throw new RuntimeException("当前账号不存在,请重新登入");
             }
             }
-            collegeIds = account.getCollegeId();
+            String aClassstrId = account.getCollegeId();
+            String[] split = aClassstrId.split(",");
+            List<String> collegeIds = new ArrayList<>();
+
+            for (String s : split) {
+                collegeIds.add(s);
+            }
             result = welcomeBedService.queryPageWelcomeBedsS(schoolId, buildId, dormitoryId, sex, isCheck, collegeIds, majorId, classstrId,retentionState);
             result = welcomeBedService.queryPageWelcomeBedsS(schoolId, buildId, dormitoryId, sex, isCheck, collegeIds, majorId, classstrId,retentionState);
         }else {
         }else {
             result = welcomeBedService.queryPageWelcomeBeds(schoolId, buildId, dormitoryId, sex, isCheck, collegeId, majorId, classstrId,retentionState);
             result = welcomeBedService.queryPageWelcomeBeds(schoolId, buildId, dormitoryId, sex, isCheck, collegeId, majorId, classstrId,retentionState);
@@ -1089,12 +1099,17 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
         //        当学院为空
         //        当学院为空
         PageUtils<WelcomeBed> result=null;
         PageUtils<WelcomeBed> result=null;
         if (ObjectUtils.isEmpty(collegeId)) {
         if (ObjectUtils.isEmpty(collegeId)) {
-            String collegeIds = "";
             WelcomeAccount account = welcomeAccountService.getById(accountId);
             WelcomeAccount account = welcomeAccountService.getById(accountId);
             if (ObjectUtils.isEmpty(account)) {
             if (ObjectUtils.isEmpty(account)) {
                 return CommonResult.fail("当前账号不存在,请重新登入");
                 return CommonResult.fail("当前账号不存在,请重新登入");
             }
             }
-            collegeIds = account.getCollegeId();
+            String aClassstrId = account.getCollegeId();
+            String[] split = aClassstrId.split(",");
+            List<String> collegeIds = new ArrayList<>();
+
+            for (String s : split) {
+                collegeIds.add(s);
+            }
             result = welcomeBedService.studentAccommodationPageS(currentPage, pageCount, schoolId, buildId, dormitoryId,collegeIds, majorId, classstrId,name);
             result = welcomeBedService.studentAccommodationPageS(currentPage, pageCount, schoolId, buildId, dormitoryId,collegeIds, majorId, classstrId,name);
         }else {
         }else {
             result = welcomeBedService.studentAccommodationPage(currentPage, pageCount, schoolId, buildId, dormitoryId,collegeId, majorId, classstrId,name);
             result = welcomeBedService.studentAccommodationPage(currentPage, pageCount, schoolId, buildId, dormitoryId,collegeId, majorId, classstrId,name);
@@ -1107,12 +1122,17 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
         //        当学院为空
         //        当学院为空
         List<WelcomeBed> result=null;
         List<WelcomeBed> result=null;
         if (ObjectUtils.isEmpty(collegeId)) {
         if (ObjectUtils.isEmpty(collegeId)) {
-            String collegeIds = "";
             WelcomeAccount account = welcomeAccountService.getById(accountId);
             WelcomeAccount account = welcomeAccountService.getById(accountId);
             if (ObjectUtils.isEmpty(account)) {
             if (ObjectUtils.isEmpty(account)) {
                 throw new RuntimeException("当前账号不存在,请重新登入");
                 throw new RuntimeException("当前账号不存在,请重新登入");
             }
             }
-            collegeIds = account.getCollegeId();
+            String aClassstrId = account.getCollegeId();
+            String[] split = aClassstrId.split(",");
+            List<String> collegeIds = new ArrayList<>();
+
+            for (String s : split) {
+                collegeIds.add(s);
+            }
             result =welcomeBedService.studentAccommodationListS( schoolId, buildId, dormitoryId,collegeIds, majorId, classstrId,name);
             result =welcomeBedService.studentAccommodationListS( schoolId, buildId, dormitoryId,collegeIds, majorId, classstrId,name);
         }else {
         }else {
             result = welcomeBedService.studentAccommodationList( schoolId, buildId, dormitoryId,collegeId, majorId, classstrId,name);
             result = welcomeBedService.studentAccommodationList( schoolId, buildId, dormitoryId,collegeId, majorId, classstrId,name);

+ 4 - 4
src/main/java/com/template/services/WelcomeBedService.java

@@ -80,12 +80,12 @@ public interface WelcomeBedService extends IService<WelcomeBed> {
 
 
     List<WelcomeBed> hBedGroup(Integer schoolId, Integer buildId, Integer dormitoryId, Integer collegeId, Integer majorId, Integer classstrid, String sex);
     List<WelcomeBed> hBedGroup(Integer schoolId, Integer buildId, Integer dormitoryId, Integer collegeId, Integer majorId, Integer classstrid, String sex);
 
 
-    PageUtils<WelcomeBed> queryPageWelcomeBedsC(int currentPage, int pageCount, Integer schoolId, Integer buildId, Integer dormitoryId, String sex, Integer isCheck, String collegeIds, Integer majorId, Integer classstrId, Integer retentionState);
+    PageUtils<WelcomeBed> queryPageWelcomeBedsC(int currentPage, int pageCount, Integer schoolId, Integer buildId, Integer dormitoryId, String sex, Integer isCheck, List<String> collegeIds, Integer majorId, Integer classstrId, Integer retentionState);
 
 
 
 
-    List<WelcomeBed> queryPageWelcomeBedsS(Integer schoolId, Integer buildId, Integer dormitoryId, String sex, Integer isCheck, String collegeIds, Integer majorId, Integer classstrId, Integer retentionState);
+    List<WelcomeBed> queryPageWelcomeBedsS(Integer schoolId, Integer buildId, Integer dormitoryId, String sex, Integer isCheck, List<String> collegeIds, Integer majorId, Integer classstrId, Integer retentionState);
 
 
-    PageUtils<WelcomeBed> studentAccommodationPageS(int currentPage, int pageCount, Integer schoolId, Integer buildId, Integer dormitoryId, String collegeIds, Integer majorId, Integer classstrId, String name);
+    PageUtils<WelcomeBed> studentAccommodationPageS(int currentPage, int pageCount, Integer schoolId, Integer buildId, Integer dormitoryId, List<String> collegeIds , Integer majorId, Integer classstrId, String name);
 
 
-    List<WelcomeBed> studentAccommodationListS(Integer schoolId, Integer buildId, Integer dormitoryId, String collegeIds, Integer majorId, Integer classstrId, String name);
+    List<WelcomeBed> studentAccommodationListS(Integer schoolId, Integer buildId, Integer dormitoryId, List<String> collegeIds, Integer majorId, Integer classstrId, String name);
 }
 }

+ 4 - 4
src/main/java/com/template/services/impl/WelcomeBedServiceImpl.java

@@ -365,7 +365,7 @@ public class WelcomeBedServiceImpl extends ServiceImpl<WelcomeBedMapper, Welcome
     }
     }
 
 
     @Override
     @Override
-    public PageUtils<WelcomeBed> queryPageWelcomeBedsC(int currentPage, int pageCount, Integer schoolId, Integer buildId, Integer dormitoryId, String sex, Integer isCheck, String collegeIds, Integer majorId, Integer classstrId, Integer retentionState) {
+    public PageUtils<WelcomeBed> queryPageWelcomeBedsC(int currentPage, int pageCount, Integer schoolId, Integer buildId, Integer dormitoryId, String sex, Integer isCheck, List<String> collegeIds, Integer majorId, Integer classstrId, Integer retentionState) {
         Page<WelcomeBed> page = new Page<>(currentPage, pageCount);
         Page<WelcomeBed> page = new Page<>(currentPage, pageCount);
         QueryWrapper<WelcomeBed> queryWrapper = new QueryWrapper<>();
         QueryWrapper<WelcomeBed> queryWrapper = new QueryWrapper<>();
         queryWrapper.eq(schoolId != null, "school_id", schoolId);
         queryWrapper.eq(schoolId != null, "school_id", schoolId);
@@ -383,7 +383,7 @@ public class WelcomeBedServiceImpl extends ServiceImpl<WelcomeBedMapper, Welcome
     }
     }
 
 
     @Override
     @Override
-    public List<WelcomeBed> queryPageWelcomeBedsS(Integer schoolId, Integer buildId, Integer dormitoryId, String sex, Integer isCheck, String collegeIds, Integer majorId, Integer classstrId, Integer retentionState) {
+    public List<WelcomeBed> queryPageWelcomeBedsS(Integer schoolId, Integer buildId, Integer dormitoryId, String sex, Integer isCheck, List<String> collegeIds, Integer majorId, Integer classstrId, Integer retentionState) {
         QueryWrapper<WelcomeBed> queryWrapper = new QueryWrapper<>();
         QueryWrapper<WelcomeBed> queryWrapper = new QueryWrapper<>();
         queryWrapper.eq(schoolId != null, "school_id", schoolId);
         queryWrapper.eq(schoolId != null, "school_id", schoolId);
         queryWrapper.eq(buildId != null, "build_id", buildId);
         queryWrapper.eq(buildId != null, "build_id", buildId);
@@ -399,7 +399,7 @@ public class WelcomeBedServiceImpl extends ServiceImpl<WelcomeBedMapper, Welcome
     }
     }
 
 
     @Override
     @Override
-    public PageUtils<WelcomeBed> studentAccommodationPageS(int currentPage, int pageCount, Integer schoolId, Integer buildId, Integer dormitoryId, String collegeIds, Integer majorId, Integer classstrId, String name) {
+    public PageUtils<WelcomeBed> studentAccommodationPageS(int currentPage, int pageCount, Integer schoolId, Integer buildId, Integer dormitoryId, List<String> collegeIds, Integer majorId, Integer classstrId, String name) {
         Page<WelcomeBed> page = new Page<>(currentPage, pageCount);
         Page<WelcomeBed> page = new Page<>(currentPage, pageCount);
         QueryWrapper<WelcomeBed> queryWrapper = new QueryWrapper<>();
         QueryWrapper<WelcomeBed> queryWrapper = new QueryWrapper<>();
         queryWrapper.eq(schoolId != null, "school_id", schoolId);
         queryWrapper.eq(schoolId != null, "school_id", schoolId);
@@ -416,7 +416,7 @@ public class WelcomeBedServiceImpl extends ServiceImpl<WelcomeBedMapper, Welcome
     }
     }
 
 
     @Override
     @Override
-    public List<WelcomeBed> studentAccommodationListS(Integer schoolId, Integer buildId, Integer dormitoryId, String collegeIds, Integer majorId, Integer classstrId, String name) {
+    public List<WelcomeBed> studentAccommodationListS(Integer schoolId, Integer buildId, Integer dormitoryId, List<String> collegeIds, Integer majorId, Integer classstrId, String name) {
         QueryWrapper<WelcomeBed> queryWrapper = new QueryWrapper<>();
         QueryWrapper<WelcomeBed> queryWrapper = new QueryWrapper<>();
         queryWrapper.eq(schoolId != null, "school_id", schoolId);
         queryWrapper.eq(schoolId != null, "school_id", schoolId);
         queryWrapper.eq(buildId != null, "build_id", buildId);
         queryWrapper.eq(buildId != null, "build_id", buildId);