<?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.panzhihua.service_property.dao.ComPropertyRepairDao">
|
|
<resultMap type="com.panzhihua.service_property.entity.ComPropertyRepair" id="ComPropertyRepairBaseResultMap">
|
<result property="id" column="id"/>
|
<result property="repairContent" column="repair_content"/>
|
<result property="repairName" column="repair_name"/>
|
<result property="repairPhone" column="repair_phone"/>
|
<result property="repairPosition" column="repair_position"/>
|
<result property="repairStatus" column="repair_status"/>
|
<result property="createTime" column="create_time"/>
|
<result property="repairUrl" column="repair_url"/>
|
<result property="replyContent" column="reply_content"/>
|
<result property="replyUrl" column="reply_url"/>
|
<result property="replyTime" column="reply_time"/>
|
<result property="createBy" column="create_by"/>
|
<result property="feedbackBy" column="feedback_by"/>
|
<result property="feedbackContent" column="feedback_content"/>
|
<result property="feedbackUrl" column="feedback_url"/>
|
<result property="feedbackTime" column="feedback_time"/>
|
<result property="replyScore" column="reply_score"/>
|
<result property="propertyId" column="property_id"/>
|
</resultMap>
|
|
<select id="pageList" resultType="com.panzhihua.common.model.vos.property.ComPropertyRepairVO" parameterType="com.panzhihua.common.model.dtos.property.CommonPage">
|
select t.*,t1.name as feedback,t3.name as areaName from com_property_repair t left join sys_user t1 on t.feedback_by = t1.user_id left join com_property t2 on t.property_id = t2.area_id left join com_mng_village t3 on t.property_id=t3.village_id
|
<where>
|
1=1
|
<if test="commonPage.status !=null">
|
and t.repair_status =#{commonPage.status}
|
</if>
|
<if test="commonPage.username !=null and commonPage.username.trim() !=''">
|
and t.repair_name like concat(#{commonPage.username},'%')
|
</if>
|
<if test="commonPage.phone !=null and commonPage.phone.trim() !=''">
|
and t.repair_phone like concat(#{commonPage.phone},'%')
|
</if>
|
<if test="commonPage.address !=null and commonPage.address.trim() !=''">
|
and t.repair_position like concat(#{commonPage.address},'%')
|
</if>
|
<if test="commonPage.beginTime !=null">
|
and t.create_time >=#{commonPage.beginTime}
|
</if>
|
<if test="commonPage.endTime !=null">
|
and #{commonPage.endTime} >=t.create_time
|
</if>
|
<if test="commonPage.systemName !=null and commonPage.systemName.trim() !=''">
|
and t1.name like concat(#{commonPage.systemName},'%')
|
</if>
|
<if test="commonPage.paramId !=null and commonPage.paramId !=0">
|
and t2.community_id = ${commonPage.paramId}
|
</if>
|
<if test="commonPage.areaId !=null and commonPage.areaId !=0">
|
and t2.area_id =#{commonPage.areaId}
|
</if>
|
<if test="commonPage.userId !=null">
|
and t.create_by =#{commonPage.userId}
|
</if>
|
<if test="commonPage.propertyId != null and commonPage.propertyId != ''">
|
AND t.property_id=#{commonPage.propertyId}
|
</if>
|
</where>
|
order by t.create_time desc
|
</select>
|
|
<select id="selectDetail" resultType="com.panzhihua.common.model.vos.property.ComPropertyRepairVO">
|
select t.*,t1.name as feedback from com_property_repair t left join sys_user t1 on t.feedback_by = t1.user_id where t.id=#{id}
|
</select>
|
<select id="pageList2" resultType="com.panzhihua.common.model.vos.property.ComPropertyRepairVO">
|
select t.*,t1.name as feedback from com_property_repair t left join sys_user t1 on t.feedback_by = t1.user_id left join com_property t2 on t.property_id = t2.area_id left join com_mng_village t3 on t.property_id=t3.village_id
|
<where>
|
1=1
|
<if test="commonPage.status !=null">
|
and t.repair_status =#{commonPage.status}
|
</if>
|
<if test="commonPage.username !=null and commonPage.username.trim() !=''">
|
and t.repair_name like concat(#{commonPage.username},'%')
|
</if>
|
<if test="commonPage.phone !=null and commonPage.phone.trim() !=''">
|
and t.repair_phone like concat(#{commonPage.phone},'%')
|
</if>
|
<if test="commonPage.address !=null and commonPage.address.trim() !=''">
|
and t.repair_position like concat(#{commonPage.address},'%')
|
</if>
|
<if test="commonPage.beginTime !=null">
|
and t.create_time >=#{commonPage.beginTime}
|
</if>
|
<if test="commonPage.endTime !=null">
|
and #{commonPage.endTime} >=t.create_time
|
</if>
|
<if test="commonPage.systemName !=null and commonPage.systemName.trim() !=''">
|
and t1.name like concat(#{commonPage.systemName},'%')
|
</if>
|
<if test="commonPage.paramId !=null and commonPage.paramId !=0">
|
and t2.community_id = ${commonPage.paramId}
|
</if>
|
<if test="commonPage.areaId !=null and commonPage.areaId !=0">
|
and t2.area_id =#{commonPage.areaId}
|
</if>
|
<if test="commonPage.userId !=null">
|
and t.create_by =#{commonPage.userId}
|
</if>
|
<if test="commonPage.propertyId != null and commonPage.propertyId != ''">
|
AND t.property_id=#{commonPage.propertyId}
|
</if>
|
</where>
|
</select>
|
</mapper>
|