<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<mapper namespace="com.estate.expert.admin.domain.repository.CheckMapper">
|
|
|
<select id="pageList" resultType="com.estate.expert.admin.domain.business.check.CheckVo">
|
select t1.id,t1.title,t1.plan_id,t1.project_id,t1.client_id,t1.safety_slip,t1.check_user_img,t1.integrity_notification,t1.time,t1.create_time,
|
t2.name as plan_name,
|
t3.name as project_name,
|
t4.name as client_name
|
from check_info t1
|
left join plan t2 on t1.plan_id = t2.id
|
left join project t3 on t1.project_id = t3.id
|
left join client t4 on t1.client_id = t4.id
|
where 1=1
|
<if test="request.planId != null">
|
and t1.plan_id = #{request.planId}
|
</if>
|
<if test="request.taskId != null">
|
and t1.check_task_id = #{request.taskId}
|
</if>
|
<if test="request.clientId != null">
|
and t1.client_id = #{request.clientId}
|
</if>
|
<if test="sTime !=null">
|
and t1.time between #{sTime} and #{eTime}
|
</if>
|
order by t1.time desc
|
</select>
|
<select id="detail" resultType="com.estate.expert.admin.domain.business.check.CheckVo">
|
select t1.id,t1.plan_id,t1.project_id,t1.client_id,t1.safety_slip,t1.check_user_img,t1.integrity_notification,t1.time,t1.create_time,
|
t2.name as plan_name,
|
t3.name as project_name,
|
t4.name as client_name
|
from check_info t1
|
left join plan t2 on t1.plan_id = t2.id
|
left join project t3 on t1.project_id = t3.id
|
left join client t4 on t1.client_id = t4.id
|
where t1.id = #{id}
|
</select>
|
<select id="exportList" resultType="com.estate.expert.admin.domain.business.check.CheckVo">
|
select t1.id,t1.plan_id,t1.project_id,t1.client_id,t1.safety_slip,t1.check_user_img,t1.integrity_notification,t1.time,t1.create_time,
|
t2.name as plan_name,
|
t3.name as project_name,
|
t4.name as client_name
|
from check_info t1
|
left join plan t2 on t1.plan_id = t2.id
|
left join project t3 on t1.project_id = t3.id
|
left join client t4 on t1.client_id = t4.id
|
where 1=1
|
<if test="request.planId != null">
|
and t1.plan_id = #{request.planId}
|
</if>
|
<if test="request.taskId != null">
|
and t1.check_task_id = #{request.taskId}
|
</if>
|
<if test="request.clientId != null">
|
and t1.client_id = #{request.clientId}
|
</if>
|
<if test="sTime !=null">
|
and t1.time between #{sTime} and #{eTime}
|
</if>
|
order by t1.time desc
|
</select>
|
</mapper>
|