|
@@ -69,6 +69,9 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private WelcomeSchoolService welcomeSchoolService;
|
|
private WelcomeSchoolService welcomeSchoolService;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private WelcomeAccountService welcomeAccountService;
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public CommonResult insertBedInfo(InsertWelcomeBedRequest iwbr, BindingResult bindingResult) {
|
|
public CommonResult insertBedInfo(InsertWelcomeBedRequest iwbr, BindingResult bindingResult) {
|
|
|
if (bindingResult.hasErrors()) {
|
|
if (bindingResult.hasErrors()) {
|
|
@@ -196,8 +199,21 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public CommonResult queryPageBeds(int currentPage, int pageCount, Integer schoolId, Integer buildId, Integer dormitoryId, String sex, Integer isCheck, Integer collegeId, Integer majorId, Integer classstrId,Integer retentionState) {
|
|
|
|
|
- PageUtils<WelcomeBed> result = welcomeBedService.queryPageWelcomeBeds(currentPage, pageCount, schoolId, buildId, dormitoryId, sex, isCheck, collegeId, majorId, classstrId,retentionState);
|
|
|
|
|
|
|
+ public CommonResult queryPageBeds(int currentPage, int pageCount, Integer schoolId, Integer buildId, Integer dormitoryId, String sex, Integer isCheck, Integer collegeId, Integer majorId, Integer classstrId,Integer retentionState,Integer accountId) {
|
|
|
|
|
+ // 当学院为空
|
|
|
|
|
+ PageUtils<WelcomeBed> result=null;
|
|
|
|
|
+ if (ObjectUtils.isEmpty(collegeId)) {
|
|
|
|
|
+ String collegeIds = "";
|
|
|
|
|
+ WelcomeAccount account = welcomeAccountService.getById(accountId);
|
|
|
|
|
+ if (ObjectUtils.isEmpty(account)) {
|
|
|
|
|
+ return CommonResult.fail("当前账号已被删除,请重新登入");
|
|
|
|
|
+ }
|
|
|
|
|
+ collegeIds = account.getCollegeId();
|
|
|
|
|
+ result = welcomeBedService.queryPageWelcomeBedsC(currentPage, pageCount, schoolId, buildId, dormitoryId, sex, isCheck, collegeIds, majorId, classstrId,retentionState);
|
|
|
|
|
+ }else {
|
|
|
|
|
+ result = welcomeBedService.queryPageWelcomeBeds(currentPage, pageCount, schoolId, buildId, dormitoryId, sex, isCheck, collegeId, majorId, classstrId,retentionState);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
return CommonResult.ok(result);
|
|
return CommonResult.ok(result);
|
|
|
}
|
|
}
|
|
|
|
|
|