| | |
| | | <mapper namespace="org.springblade.modules.task.mapper.TaskMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="taskResultMap" type="org.springblade.modules.task.entity.TaskEntity"> |
| | | <resultMap id="taskResultMap" type="org.springblade.modules.task.vo.TaskVO"> |
| | | <result column="id" property="id"/> |
| | | <result column="name" property="name"/> |
| | | <result column="type" property="type"/> |
| | |
| | | |
| | | |
| | | <select id="selectTaskPage" resultMap="taskResultMap"> |
| | | select * from jczz_task where is_deleted = 0 |
| | | SELECT |
| | | jt.`status`, |
| | | jt.`id`, |
| | | jt.`name`, |
| | | jt.frequency, |
| | | jda.address_name, |
| | | jt.create_time |
| | | 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 = #{task.userId} |
| | | <if test="task.status != null"> |
| | | and jt.status = #{task.status} |
| | | </if> |
| | | <if test="task.name != null and task.name != ''"> |
| | | and jt.name like concat('%', #{task.name}, '%') |
| | | </if> |
| | | order by jt.create_time desc |
| | | |
| | | </select> |
| | | |
| | | |