<?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_user.dao.SysUserFeedbackDAO">
|
<resultMap id="baseResult" type="com.panzhihua.service_user.model.dos.SysUserFeedbackDO">
|
<id property="id" column="id"/>
|
<result property="content" column="content"/>
|
<result property="photoPath" column="photo_path"/>
|
<result property="createAt" column="create_at"/>
|
<result property="updateAt" column="update_at"/>
|
<result property="userId" column="user_id"/>
|
<result property="areaId" column="area_id"/>
|
<result property="communityId" column="community_id"/>
|
<result property="status" column="status"/>
|
|
</resultMap>
|
<sql id="columns">
|
`id`,`content`,`photo_path`,`create_at`,`update_at`,`user_id`,`area_id`,`community_id`,`status`
|
</sql>
|
<update id="reply">
|
update sys_user_feedback set reply=#{dto.reply} where id=#{dto.id}
|
</update>
|
|
|
<select id="detailFeedback" resultType="com.panzhihua.common.model.vos.user.SysUserFeedbackVO">
|
select
|
u.name,
|
u.nick_name,
|
f.*,
|
u.phone,
|
c.name communityName
|
from sys_user_feedback f
|
join sys_user u on f.user_id=u.user_id
|
join com_act c on u.community_id=c.community_id
|
where f.id=#{id}
|
</select>
|
|
<select id="pageFeedback" resultType="com.panzhihua.common.model.vos.user.SysUserFeedbackVO">
|
select
|
u.name,
|
u.nick_name,
|
f.id,
|
u.phone,
|
f.create_at,
|
f.content,
|
f.photo_path,
|
c.name communityName,
|
f.reply
|
from sys_user_feedback f
|
left join sys_user u on f.user_id=u.user_id
|
left join com_act c on u.community_id=c.community_id
|
<where>
|
<if test='pageFeedBackDTO.phone != null and pageFeedBackDTO.phone.trim() != ""'>
|
and u.phone like concat('%',#{pageFeedBackDTO.phone},'%')
|
</if>
|
<if test='pageFeedBackDTO.name != null and pageFeedBackDTO.name.trim() != ""'>
|
and u.name like concat('%',#{pageFeedBackDTO.name},'%')
|
</if>
|
<if test='pageFeedBackDTO.nickName != null and pageFeedBackDTO.nickName.trim() != ""'>
|
and u.nick_name like concat('%',#{pageFeedBackDTO.nickName},'%')
|
</if>
|
<if test='pageFeedBackDTO.areaCode != null and pageFeedBackDTO.areaCode.trim() != ""'>
|
and c.area_code = #{pageFeedBackDTO.areaCode}
|
</if>
|
<if test="pageFeedBackDTO.propertyId != null and pageFeedBackDTO.propertyId != ''">
|
and f.property_id = #{pageFeedBackDTO.propertyId}
|
</if>
|
<if test="pageFeedBackDTO.type != null and pageFeedBackDTO.type != ''">
|
and f.type = #{pageFeedBackDTO.type}
|
</if>
|
</where>
|
order by f.create_at desc
|
|
</select>
|
|
|
</mapper>
|