yxm
2024-07-16 821836751704802acd946b8e0b4165740e489f68
待办添加区域条件筛选优化
1 files modified
19 ■■■■■ changed files
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sg/mapper/SgProjectInfoMapper.xml 19 ●●●●● patch | view | raw | blame | history
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sg/mapper/SgProjectInfoMapper.xml
@@ -86,18 +86,21 @@
        ( b.countyCode = a."guid" )
        OR ( b.cityCode = a."guid" )
        OR ( b.provinceCode = a."guid" ))
        where a."p_ad_code" = #{dto.adCode}
        where 1=1
          <if test="dto.adCode != null">
        and a."p_ad_code" = #{dto.adCode}
    </if>
        <if test="dto.projectId != null and dto.projectId != ''">
            and pro.id = #{dto.projectId}
            and b.id = #{dto.projectId}
        </if>
        <if test="dto.projectName != null and dto.projectName != ''">
            and pro.project_name like CONCAT(CONCAT('%', #{dto.projectName}), '%')
            and b.project_name like CONCAT(CONCAT('%', #{dto.projectName}), '%')
        </if>
        <if test="dto.status != null">
            and pro.status = #{dto.status}
            and b.status = #{dto.status}
        </if>
        <if test="dto.projectIds != null and dto.projectIds.size > 0">
            and pro.id in
            and b.id in
            <foreach collection="dto.projectIds" item="id" separator="," open="(" close=")">
                #{id}
            </foreach>
@@ -126,8 +129,10 @@
        ( b.countyCode = a."guid" )
        OR ( b.cityCode = a."guid" )
        OR ( b.provinceCode = a."guid" ))
        WHERE
        a."p_ad_code" = #{dto.adCode}
        WHERE 1=1
        <if test="dto.adCode != null">
        and a."p_ad_code" = #{dto.adCode}
        </if>
        <if test="dto.status != null">
        and b.status = #{dto.status}
    </if>