linwe
2024-08-07 06df33f156924c564c17b11fdb96c5bb298a810d
src/main/java/org/springblade/modules/house/mapper/UserHouseLabelMapper.xml
@@ -813,7 +813,7 @@
                        LEFT JOIN jczz_label jl ON juhl.label_id = jl.id
                WHERE
                    juhl.lable_type = 1
                  AND jl.id = '1033'
                  AND jl.id = '1025'
                  AND juhl.household_id IS NOT NULL
                  AND juhl.house_code IN (
                    SELECT
@@ -832,7 +832,7 @@
                        LEFT JOIN jczz_label jl ON juhl.label_id = jl.id
                WHERE
                    juhl.lable_type = 1
                  AND jl.id = '15'
                  AND jl.id = '23'
                  AND juhl.household_id IS NOT NULL
                  AND juhl.house_code IN (
                    SELECT
@@ -852,5 +852,31 @@
    </select>
    <select id="getUserHouseLabelList" resultType="org.springblade.modules.house.entity.UserHouseLabelEntity">
        SELECT
        juhl.id,
        juhl.house_code,
        juhl.label_id,
        juhl.label_name,
        juhl.color,
        juhl.remark,
        juhl.user_id,
        juhl.lable_type,
        juhl.household_id
        FROM
        jczz_user_house_label juhl
        LEFT JOIN jczz_house jh ON juhl.house_code = jh.house_code
        LEFT JOIN jczz_grid jg on jg.id= jh.grid_id
        LEFT JOIN blade_region br on br.code = jg.community_code
        <where>
            juhl.lable_type = 1
            and juhl.color = #{userHouseLabelVO.color}
            and juhl.label_id = #{userHouseLabelVO.labelId}
            and juhl.household_id is not null
            <if test="userHouseLabelVO.taskRange != null ">and br.code like concat(#{userHouseLabelVO.taskRange},'%')
            </if>
        </where>
    </select>
</mapper>