|
@@ -39,7 +39,6 @@ import org.docx4j.wml.Text;
|
|
|
import org.nlpcn.commons.lang.util.StringUtil;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.data.domain.*;
|
|
|
import org.springframework.data.domain.Sort.Direction;
|
|
|
import org.springframework.data.domain.Sort.Order;
|
|
@@ -133,9 +132,6 @@ public class PaperServiceImpl implements PaperService {
|
|
|
@Autowired
|
|
|
private RedisClient redisClient;
|
|
|
|
|
|
- @Value("${$redis.paper.prefix}")
|
|
|
- private String redisPaperPrefix;
|
|
|
-
|
|
|
@Autowired
|
|
|
private CoursePaperCloudService coursePaperCloudService;
|
|
|
|
|
@@ -446,8 +442,8 @@ public class PaperServiceImpl implements PaperService {
|
|
|
paperDetailService.deletePaperDetailsByPapers(papers);
|
|
|
paperRepo.deleteAll(papers);
|
|
|
|
|
|
- //清除缓存
|
|
|
for (String paperId : paperIds) {
|
|
|
+ //清除缓存
|
|
|
redisClient.delete(CACHE_PREFIX_EXTRACT_EXAM_PAPER + paperId);
|
|
|
basePaperCache.remove(paperId);
|
|
|
}
|
|
@@ -944,10 +940,7 @@ public class PaperServiceImpl implements PaperService {
|
|
|
paperDetailUnitRepo.saveAll(saveUnits);
|
|
|
|
|
|
//清除缓存
|
|
|
- if (paper.getPaperType() == PaperType.GENERATE) {
|
|
|
- redisClient.delete(redisPaperPrefix + ":" + paper.getId());
|
|
|
- basePaperCache.remove(paper.getId());
|
|
|
- }
|
|
|
+ basePaperCache.remove(paper.getId());
|
|
|
|
|
|
formatPaper(paper, user);
|
|
|
return paper;
|