lidongdong
2023-06-29 af91f87e1d8196f10ff9eddff050cb9c6f659953
修改小程序三资公开分类问题
1个文件已修改
49 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActDynTypeDOMapper.xml 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActDynTypeDOMapper.xml
@@ -78,27 +78,27 @@
    <select id="getDynTypeListByAdmin" parameterType="com.panzhihua.common.model.dtos.community.PageComActDynTypeDTO"
            resultType="com.panzhihua.common.model.vos.community.ComActDynTypeVO">
        SELECT
        cadt.id,
        cadt.`name`,
        cadt.color,
        cadt.community_id,
        cadt.create_at,
        cadt.update_at,
        su.`name` AS createBy,
        su1.`name` AS updateBy
        FROM
        com_act_dyn_type AS cadt
        LEFT JOIN sys_user AS su ON su.user_id = cadt.create_by
        LEFT JOIN sys_user AS su1 ON su1.user_id = cadt.update_by
        where cadt.community_id = 0 and cadt.is_del = 2
        <if test="comActDynTypeDTO.category != null">
            AND cadt.category = #{comActDynTypeDTO.category}
        </if>
        <if test="comActDynTypeDTO.keyWord != null and comActDynTypeDTO.keyWord != &quot;&quot;">
            and (cadt.id = #{comActDynTypeDTO.keyWord} or cadt.`name` like concat (#{comActDynTypeDTO.keyWord},'%'))
        </if>
        union all
<!--        SELECT-->
<!--        cadt.id,-->
<!--        cadt.`name`,-->
<!--        cadt.color,-->
<!--        cadt.community_id,-->
<!--        cadt.create_at,-->
<!--        cadt.update_at,-->
<!--        su.`name` AS createBy,-->
<!--        su1.`name` AS updateBy-->
<!--        FROM-->
<!--        com_act_dyn_type AS cadt-->
<!--        LEFT JOIN sys_user AS su ON su.user_id = cadt.create_by-->
<!--        LEFT JOIN sys_user AS su1 ON su1.user_id = cadt.update_by-->
<!--        where cadt.community_id = 0 and cadt.is_del = 2-->
<!--        <if test="comActDynTypeDTO.category != null">-->
<!--            AND cadt.category = #{comActDynTypeDTO.category}-->
<!--        </if>-->
<!--        <if test="comActDynTypeDTO.keyWord != null and comActDynTypeDTO.keyWord != &quot;&quot;">-->
<!--            and (cadt.id = #{comActDynTypeDTO.keyWord} or cadt.`name` like concat (#{comActDynTypeDTO.keyWord},'%'))-->
<!--        </if>-->
<!--        union all-->
        SELECT
        cadt.id,
@@ -117,11 +117,8 @@
        <if test='comActDynTypeDTO.category != null '>
            AND cadt.category = #{comActDynTypeDTO.category}
        </if>
        <if test="comActDynTypeDTO.communityId != null">
            <if test="comActDynTypeDTO.communityId == 0">
                AND 1=2
            </if>
            and cadt.community_id = ${comActDynTypeDTO.communityId}
        <if test="comActDynTypeDTO.communityId != null and comActDynTypeDTO.communityId != 0 ">
            AND cadt.community_id = ${comActDynTypeDTO.communityId}
        </if>
        <if test="comActDynTypeDTO.keyWord != null and comActDynTypeDTO.keyWord != &quot;&quot;">
            and (cadt.id = #{comActDynTypeDTO.keyWord} or cadt.`name` like concat (#{comActDynTypeDTO.keyWord},'%'))