linwei
2024-01-26 016e47ea961d84a186db0bbd45cd6d7eaaa57bc3
src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml
@@ -88,6 +88,8 @@
            ja.update_user,
            ja.create_user,
            ja.is_deleted,
            (select bdb.dict_value from blade_dict_biz bdb where bdb.parent_id='1740566650527752194' and ja.article_type
            = bdb.dict_key) dictValue,
            jpd.id pdId
            from jczz_article ja
            LEFT JOIN jczz_public_discuss jpd on jpd.article_id=ja.id
@@ -181,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>
@@ -199,13 +202,22 @@
        <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.type != null ">and type = #{article.type}</if>
        and is_deleted = 0
        <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>
@@ -462,7 +474,7 @@
        ja.create_user,
        ja.is_deleted,
        ja.article_range,
        ((select bdb.dict_value from blade_dict_biz bdb where bdb.parent_id='1722966265111248897' and ja.article_type
        ((select bdb.dict_value from blade_dict_biz bdb where bdb.parent_id=#{parentId} and ja.article_type
        = bdb.dict_key)) dictValue
        from jczz_article ja
        <where>