|
@@ -1,17 +1,16 @@
|
|
package com.qmth.exam.reserve.controller.admin;
|
|
package com.qmth.exam.reserve.controller.admin;
|
|
|
|
|
|
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
import com.qmth.boot.api.annotation.Aac;
|
|
import com.qmth.boot.api.annotation.Aac;
|
|
import com.qmth.boot.api.constant.ApiConstant;
|
|
import com.qmth.boot.api.constant.ApiConstant;
|
|
import com.qmth.boot.core.fss.store.FileStore;
|
|
import com.qmth.boot.core.fss.store.FileStore;
|
|
import com.qmth.exam.reserve.bean.Constants;
|
|
import com.qmth.exam.reserve.bean.Constants;
|
|
import com.qmth.exam.reserve.bean.applytask.CurrentApplyTaskVO;
|
|
import com.qmth.exam.reserve.bean.applytask.CurrentApplyTaskVO;
|
|
|
|
+import com.qmth.exam.reserve.bean.org.OrgInfo;
|
|
import com.qmth.exam.reserve.bean.systemproperty.SystemPropertyBean;
|
|
import com.qmth.exam.reserve.bean.systemproperty.SystemPropertyBean;
|
|
import com.qmth.exam.reserve.cache.impl.ApplyTaskCacheService;
|
|
import com.qmth.exam.reserve.cache.impl.ApplyTaskCacheService;
|
|
|
|
+import com.qmth.exam.reserve.cache.impl.OrgCacheService;
|
|
import com.qmth.exam.reserve.controller.BaseController;
|
|
import com.qmth.exam.reserve.controller.BaseController;
|
|
-import com.qmth.exam.reserve.entity.OrgEntity;
|
|
|
|
import com.qmth.exam.reserve.entity.SystemPropertyEntity;
|
|
import com.qmth.exam.reserve.entity.SystemPropertyEntity;
|
|
-import com.qmth.exam.reserve.service.OrgService;
|
|
|
|
import com.qmth.exam.reserve.service.SystemPropertyService;
|
|
import com.qmth.exam.reserve.service.SystemPropertyService;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
@@ -36,7 +35,7 @@ public class SystemPropertyController extends BaseController {
|
|
private FileStore fileStore;
|
|
private FileStore fileStore;
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
- private OrgService orgService;
|
|
|
|
|
|
+ private OrgCacheService orgCacheService;
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private ApplyTaskCacheService applyTaskCacheService;
|
|
private ApplyTaskCacheService applyTaskCacheService;
|
|
@@ -50,19 +49,15 @@ public class SystemPropertyController extends BaseController {
|
|
SystemPropertyBean properties = new SystemPropertyBean();
|
|
SystemPropertyBean properties = new SystemPropertyBean();
|
|
properties.setFileUrlPrefix(fileStore.getServer());
|
|
properties.setFileUrlPrefix(fileStore.getServer());
|
|
|
|
|
|
- OrgEntity org;
|
|
|
|
|
|
+ OrgInfo org;
|
|
if (orgId != null) {
|
|
if (orgId != null) {
|
|
- org = orgService.getById(orgId);
|
|
|
|
|
|
+ org = orgCacheService.getOrgById(orgId);
|
|
} else {
|
|
} else {
|
|
- // 未明确指定学校,默认取一个学校
|
|
|
|
- LambdaQueryWrapper<OrgEntity> wrapper = new LambdaQueryWrapper<>();
|
|
|
|
- wrapper.select(OrgEntity::getId, OrgEntity::getName);
|
|
|
|
- wrapper.last("LIMIT 1");
|
|
|
|
- org = orgService.getOne(wrapper);
|
|
|
|
|
|
+ org = orgCacheService.currentOrg();
|
|
}
|
|
}
|
|
if (org != null) {
|
|
if (org != null) {
|
|
- properties.setOrgTitle(org.getName());
|
|
|
|
- orgId = org.getId();
|
|
|
|
|
|
+ properties.setOrgTitle(org.getOrgName());
|
|
|
|
+ orgId = org.getOrgId();
|
|
}
|
|
}
|
|
|
|
|
|
CurrentApplyTaskVO curApplyTask = applyTaskCacheService.currentApplyTask(orgId);
|
|
CurrentApplyTaskVO curApplyTask = applyTaskCacheService.currentApplyTask(orgId);
|