|
@@ -14,6 +14,7 @@ import com.qmth.boot.tools.excel.model.DataMap;
|
|
|
import com.qmth.exam.reserve.bean.examsite.*;
|
|
|
import com.qmth.exam.reserve.bean.login.LoginUser;
|
|
|
import com.qmth.exam.reserve.bean.stdapply.CategoryVO;
|
|
|
+import com.qmth.exam.reserve.cache.impl.ApplyTaskCacheService;
|
|
|
import com.qmth.exam.reserve.cache.impl.ExamSiteCacheService;
|
|
|
import com.qmth.exam.reserve.dao.ExamSiteDao;
|
|
|
import com.qmth.exam.reserve.entity.CategoryEntity;
|
|
@@ -46,6 +47,9 @@ public class ExamSiteServiceImpl extends ServiceImpl<ExamSiteDao, ExamSiteEntity
|
|
|
@Autowired
|
|
|
private ExamSiteCacheService examSiteCacheService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ApplyTaskCacheService cacheService;
|
|
|
+
|
|
|
@Override
|
|
|
public List<CategoryVO> listExamSite(Long teachingId, Boolean flag) {
|
|
|
flag = flag != null && flag;
|
|
@@ -121,12 +125,13 @@ public class ExamSiteServiceImpl extends ServiceImpl<ExamSiteDao, ExamSiteEntity
|
|
|
ExamSiteEntity site = new ExamSiteEntity();
|
|
|
BeanUtils.copyProperties(req, site);
|
|
|
site.setCategoryId(req.getTeachingId());
|
|
|
- new ExamSiteEntity();
|
|
|
ExamSiteEntity beforeUpdateSite;
|
|
|
if (req.getId() == null) {
|
|
|
site.setCapacity(0);
|
|
|
site.setEnable(Boolean.TRUE);
|
|
|
save(site);
|
|
|
+ // 刷新考点缓存
|
|
|
+ cacheService.refreshApplyAvailableCountCache(site.getId(), 0 , 0);
|
|
|
} else {
|
|
|
beforeUpdateSite = getById(req.getId());
|
|
|
updateById(site);
|