linwe
2023-11-14 acf2bdafdfa2fb1fe423d0700950c3ddd53c481b
src/main/java/org/springblade/modules/task/mapper/TaskMapper.xml
@@ -34,8 +34,11 @@
        LEFT JOIN jczz_doorplate_address jda on jda.address_code=jt.house_code
        WHERE
        jg.user_id = #{task.userId}
        <if test="task.status != null">
        <if test="task.status != null and task.status != null">
            and jt.status = #{task.status}
        </if>
        <if test="task.frequency != null and task.frequency != ''">
            and jt.frequency = #{task.frequency}
        </if>
        <if test="task.name != null and task.name != ''">
            and jt.name like concat('%', #{task.name}, '%')
@@ -45,4 +48,30 @@
    </select>
    <select id="selectTaskCount" resultType="int" parameterType="org.springblade.modules.task.vo.TaskVO">
        SELECT count(1)
        FROM
        jczz_grid jg
        LEFT JOIN jczz_grid_range jgr ON jg.id = jgr.grid_id
        LEFT JOIN jczz_task jt ON jgr.house_code = jt.house_code
        LEFT JOIN jczz_doorplate_address jda on jda.address_code=jt.house_code
        WHERE
        jg.user_id = #{userId}
        <if test="status != null">
            and jt.status = #{status}
        </if>
        <if test="frequency != null">
            and jt.frequency = #{frequency}
        </if>
        <if test="type != null">
            and jt.type = #{type}
        </if>
        <if test="name != null and name != ''">
            and jt.name like concat('%', #{name}, '%')
        </if>
        order by jt.create_time desc
    </select>
</mapper>