Commit a343aba2 by 段启岩

cms添加显示顺序

parent 0b259c2a
...@@ -64,6 +64,9 @@ public class Content implements Serializable { ...@@ -64,6 +64,9 @@ public class Content implements Serializable {
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonInclude(JsonInclude.Include.NON_NULL)
private String pic2; private String pic2;
@ApiModelProperty(value = "显示优先级")
private Integer priority;
private Date createTime; private Date createTime;
private Date updateTime; private Date updateTime;
......
...@@ -48,6 +48,8 @@ public class ContentServiceImpl extends ServiceImpl<ContentMapper, Content> impl ...@@ -48,6 +48,8 @@ public class ContentServiceImpl extends ServiceImpl<ContentMapper, Content> impl
QueryWrapper<Content> contentQueryWrapper = new QueryWrapper<>(); QueryWrapper<Content> contentQueryWrapper = new QueryWrapper<>();
contentQueryWrapper.eq("channel_id", channelId); contentQueryWrapper.eq("channel_id", channelId);
contentQueryWrapper.eq("content_type", contentType); contentQueryWrapper.eq("content_type", contentType);
contentQueryWrapper.orderByAsc("priority");
contentQueryWrapper.orderByDesc("create_time");
return page(page, contentQueryWrapper); return page(page, contentQueryWrapper);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment