洪城义警-正式版后台
zengh
2021-09-14 2d394d9b0b82d67681ebc8c81f09080e4ad0554c
src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml
@@ -18,5 +18,30 @@
        <if test="article.endTime!=null and article.endTime!=''">
            and create_time&lt;=#{article.endTime}
        </if>
        <if test="article.articleType!=null and article.articleType!=''">
            and article_type = #{article.articleType}
        </if>
        <if test="article.keyword!=null and article.keyword!=''">
            AND CONCAT(title,source_name)
            LIKE CONCAT ('%', #{article.keyword},'%')
        </if>
        order by create_time desc
    </select>
    <!--查询资讯分页列表信息-->
    <select id="pageDate" resultType="org.springblade.modules.article.entity.Article">
        select * from sys_article
        where 1=1
        <if test="article.articleType!=null and article.articleType!=''">
            and article_type LIKE CONCAT ('%', #{article.articleType},'%')
        </if>
        <if test="article.keyword!=null and article.keyword!=''">
            AND CONCAT(title,source_name)
            LIKE CONCAT ('%', #{article.keyword},'%')
        </if>
        <if test="(article.rolename==null and article.rolename=='') or (article.rolename!='administrator' and article.rolename!='policeAdmin')">
            AND publish = 1
        </if>
        order by create_time desc
    </select>
</mapper>