fix CMSAdvertisementService.search

main
Revers 9 months ago
parent 9557714213
commit 8fe93a9d05

@ -35,6 +35,18 @@ public class ArticleRespDTO implements Serializable {
@ApiModelProperty(value = "编辑日期,格式为: yyyy.MM.dd")
private String date;
@ApiModelProperty(value = "是否定时发布 否0 是1")
private String isScheduled;
@ApiModelProperty(value = "发布时间,格式为: yyyy.MM.dd")
private String pubTime;
@ApiModelProperty(value = "是否允许评论 否0 是1")
private String allowCommit;
@ApiModelProperty(value = "是否自动推送 否0 是1")
private String autoPush;
@ApiModelProperty(value = "总评论数,大于99显示99+")
private Long commitsNum;
@ApiModelProperty(value = "总阅览数,大于99显示99+")
@ -58,6 +70,11 @@ public class ArticleRespDTO implements Serializable {
response.setDate(article.getPubTime().toString());
response.setCommitsNum(article.getComment());
response.setVistisNum(article.getVisits());
response.setIsScheduled(article.getIsScheduled());
response.setPubTime(article.getPubTime().format(Constants.formatter));
response.setAllowCommit(article.getAllowCommit());
response.setAutoPush(article.getAutoPush());
return response;
}
}

@ -209,9 +209,9 @@ public class CMSAdvertisementService {
predicateList.add(builder.and(isDeleted, isDisplay));
LocalDateTime now = LocalDateTime.now();
predicateList.add(builder.lessThan(root.get("startTime"),now));
predicateList.add(builder.greaterThan(root.get("endTime"), now));
// LocalDateTime now = LocalDateTime.now();
// predicateList.add(builder.lessThan(root.get("startTime"),now));
// predicateList.add(builder.greaterThan(root.get("endTime"), now));
return builder.and(predicateList.toArray(new Predicate[predicateList.size()]));
};

Loading…
Cancel
Save