|
|
@@ -988,9 +988,8 @@ public class ArticleService {
|
|
|
LambdaQueryWrapper<Article> wrapper = new LambdaQueryWrapper<Article>()
|
|
|
.ge(Article::getUpdatedAt, since)
|
|
|
.orderByDesc(Article::getUpdatedAt);
|
|
|
- if (status != null && !status.trim().isEmpty()) {
|
|
|
- wrapper.eq(Article::getStatus, status.trim());
|
|
|
- }
|
|
|
+ String s = (status != null && !status.trim().isEmpty()) ? status.trim() : "published";
|
|
|
+ wrapper.eq(Article::getStatus, s);
|
|
|
return articleMapper.selectList(wrapper);
|
|
|
}
|
|
|
|
|
|
@@ -1146,8 +1145,8 @@ public class ArticleService {
|
|
|
if (article == null) {
|
|
|
throw new RuntimeException("文章不存在");
|
|
|
}
|
|
|
- if (!"rejected".equals(article.getStatus())) {
|
|
|
- throw new RuntimeException("仅已驳回的文章可重新编辑");
|
|
|
+ if (!"rejected".equals(article.getStatus()) && !"withdrawn".equals(article.getStatus())) {
|
|
|
+ throw new RuntimeException("仅已驳回或已撤回的文章可重新编辑");
|
|
|
}
|
|
|
article.setStatus("draft");
|
|
|
article.setAuditStatus(null);
|