提交 d2bb1116 作者: 刘明祎-运维用途

添加搜索条件

上级 6dd1b675
...@@ -54,6 +54,10 @@ public class IndustryCaseQO implements Serializable { ...@@ -54,6 +54,10 @@ public class IndustryCaseQO implements Serializable {
@Min(value = 1, groups = Page.class) @Min(value = 1, groups = Page.class)
private Integer pageSize; private Integer pageSize;
@ApiModelProperty(value = "是否是热点新闻")
private Integer isHot;
public void buildCurrentPage() { public void buildCurrentPage() {
this.pageNo = (pageNo - 1) * pageSize; this.pageNo = (pageNo - 1) * pageSize;
} }
......
...@@ -40,6 +40,9 @@ public class IndustryNewsQO implements Serializable { ...@@ -40,6 +40,9 @@ public class IndustryNewsQO implements Serializable {
@Min(value = 1, groups = Page.class) @Min(value = 1, groups = Page.class)
private Integer pageSize; private Integer pageSize;
@ApiModelProperty(value = "是否是热点新闻")
private Integer isHot;
public void buildCurrentPage() { public void buildCurrentPage() {
this.pageNo = (pageNo - 1) * pageSize; this.pageNo = (pageNo - 1) * pageSize;
} }
......
...@@ -31,7 +31,8 @@ ...@@ -31,7 +31,8 @@
news_contents, news_contents,
origin, origin,
create_time, create_time,
update_time update_time,
is_hot
from industry_news from industry_news
where is_deleted = 0 where is_deleted = 0
<if test=" userIds != null "> <if test=" userIds != null ">
...@@ -43,6 +44,9 @@ ...@@ -43,6 +44,9 @@
<if test="date != null "> <if test="date != null ">
and Date(create_time) = #{date} and Date(create_time) = #{date}
</if> </if>
<if test="isHot != null">
and is_hot = #{isHot}
</if>
<if test="keyword != null "> <if test="keyword != null ">
and news_title like CONCAT("%",#{keyword},"%") and news_title like CONCAT("%",#{keyword},"%")
</if> </if>
...@@ -170,6 +174,9 @@ ...@@ -170,6 +174,9 @@
<if test="endTime != null"> <if test="endTime != null">
and create_time &lt;= #{endTime} and create_time &lt;= #{endTime}
</if> </if>
<if test="isHot != null">
and is_hot = #{isHot}
</if>
</where> </where>
order by is_hot desc,create_time desc order by is_hot desc,create_time desc
limit #{pageNo}, #{pageSize} limit #{pageNo}, #{pageSize}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论