linwei
2024-01-19 fe8f3e622207c3e848a9140783bb17dd3fbc3616
src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml
@@ -183,6 +183,7 @@
    <select id="selectArticlePage" resultType="org.springblade.modules.article.entity.Article">
        select * from jczz_article
        where 1=1
        and is_deleted = 0
        <if test="article.title!=null and article.title!=''">
            and title like concat('%',#{article.title},'%')
        </if>
@@ -201,16 +202,18 @@
        <if test="article.articleType!=null and article.articleType!=''">
            and article_type like concat('%',#{article.articleType},'%')
        </if>
        <if test="article.type != null ">and type = #{article.type}</if>
        <if test="article.keyword!=null and article.keyword!=''">
            AND CONCAT(title,source_name)
            LIKE CONCAT ('%', #{article.keyword},'%')
        </if>
        <if test="article.districtId != null and article.districtId != ''">
            and article_range like concat('%',#{article.districtId},'%')
        <if test="article.districtIdList != null and article.districtIdList != ''">
            and (article_range like
            <foreach collection="article.districtIdList" separator=" or article_range like" item="id">'%${id}%'
            </foreach>
            )
        </if>
        <if test="article.type != null ">and type = #{article.type}</if>
        and is_deleted = 0
        order by id desc
    </select>