linwe
2023-11-12 8d8c7da4e91028fc877f101dcd244bef3e18c197
src/main/java/org/springblade/modules/task/mapper/TaskMapper.xml
@@ -45,4 +45,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>