病例交流列表 新增了评论排序
This commit is contained in:
+14
@@ -49,9 +49,15 @@ public class getCaseExchangeSearchPage {
|
||||
@JsonProperty("read_num")
|
||||
private String readNum; // 阅读量
|
||||
|
||||
@JsonProperty("comment_num")
|
||||
private String commentNum; // 评论数
|
||||
|
||||
@JsonProperty("push_date")
|
||||
private String pushDate; // 发表时间
|
||||
|
||||
@JsonProperty("last_comment_time")
|
||||
private String lastCommentTime; // 最后评论时间
|
||||
|
||||
public Map<String, String> toMap() {
|
||||
Map<String, String> map = new HashMap<>();
|
||||
if (StringUtils.hasText(createdAt)) {
|
||||
@@ -62,10 +68,18 @@ public class getCaseExchangeSearchPage {
|
||||
map.put("a.read_num", readNum);
|
||||
}
|
||||
|
||||
if (StringUtils.hasText(commentNum)) {
|
||||
map.put("a.comment_num", commentNum);
|
||||
}
|
||||
|
||||
if (StringUtils.hasText(pushDate)) {
|
||||
map.put("a.push_date", pushDate);
|
||||
}
|
||||
|
||||
if (StringUtils.hasText(lastCommentTime)) {
|
||||
map.put("commentCreatedAt", lastCommentTime);
|
||||
}
|
||||
|
||||
// 默认排序(如果用户未传递任何排序字段)
|
||||
if (map.isEmpty()) {
|
||||
map.put("a.updated_at", "desc");
|
||||
|
||||
Reference in New Issue
Block a user