linwe
2023-12-23 9d49dba3ba467a04b9ba9511b82b4d7fa8b402ed
src/main/java/org/springblade/modules/task/mapper/TaskMapper.xml
@@ -119,15 +119,26 @@
    <select id="selectTaskPageBy" resultType="org.springblade.modules.task.vo.TaskVO">
        SELECT
            jt.* ,
            jda.address_name
        jt.* ,
        jda.address_name
        FROM
            jczz_task jt
                LEFT JOIN jczz_doorplate_address jda ON jt.house_code = jda.address_code
                LEFT JOIN jczz_community jc ON jc.CODE = jda.nei_code
        WHERE
            jc.res_police_user_id = #{task.userId}
          AND jt.report_type = '1'
        jczz_task jt
        LEFT JOIN jczz_doorplate_address jda ON jt.house_code = jda.address_code
        LEFT JOIN jczz_community jc ON jc.CODE = jda.nei_code
        <where>
            <if test="task.reportType != null and task.reportType != '' and task.reportType == 1">
                AND jt.report_type = #{task.reportType}
            </if>
            <if test="task.reportType == null or task.reportType == ''">
                AND jt.report_type in (2,3,6)
            </if>
            <if test="task.userId != null and task.userId != ''">
                AND jc.res_police_user_id = #{task.userId}
            </if>
        </where>
    </select>