linwei
2024-01-26 016e47ea961d84a186db0bbd45cd6d7eaaa57bc3
src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml
@@ -208,11 +208,15 @@
            AND CONCAT(title,source_name)
            LIKE CONCAT ('%', #{article.keyword},'%')
        </if>
        <if test="article.districtIdList != null and article.districtIdList != ''">
        <if test="article.districtIdList != null and article.districtIdList.size() > 0 ">
            and (article_range like
            <foreach collection="article.districtIdList" separator=" or article_range like" item="id">'%${id}%'
            </foreach>
            )
            and district_id in
            <foreach collection="article.districtIdList" index="index" item="item" open="(" separator="," close=")">
                #{item}
            </foreach>
        </if>
        order by id desc
    </select>