|
@@ -1223,7 +1223,9 @@ public class PaperServiceImpl implements PaperService {
|
|
|
query.addCriteria(Criteria.where("paperType").is(paperType));
|
|
|
query.addCriteria(Criteria.where("course.code").is(paperSearchInfo.getCourseNo()));
|
|
|
query.addCriteria(Criteria.where("id").nin(selectedIds));
|
|
|
-
|
|
|
+ if(PaperType.GENERATE.equals(paperType)) {
|
|
|
+ query.addCriteria(Criteria.where("storage").ne(1));
|
|
|
+ }
|
|
|
long total = this.mongoTemplate.count(query, Paper.class);
|
|
|
if (total == 0) {
|
|
|
return Page.empty();
|
|
@@ -1530,8 +1532,8 @@ public class PaperServiceImpl implements PaperService {
|
|
|
Question question = Model.of(quesRepo.findById(questionAudio.getQuestionId()));
|
|
|
|
|
|
//正则匹配音频标签
|
|
|
- Pattern audioPattern = Pattern.compile(String.format("<a.*name=\"%s\"></a>", fileName));
|
|
|
- final String audioTag = String.format("<a id=\"%s\" name=\"%s\"></a>", questionAudio.getId(), fileName);
|
|
|
+ Pattern audioPattern = Pattern.compile(String.format("<a id=\"[\\d,\\w]+\" name=\"%s\"></a>", fileName));
|
|
|
+ final String audioTag = String.format("<a id=\"%s\" name=\"%s\"></a>", questionAudio.getId(), fileName);
|
|
|
|
|
|
String numbers[] = fileName.split("_");
|
|
|
if (numbers[1].equals("1")) {
|