|
@@ -3,7 +3,7 @@
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.fs.user.mapper.FsUserComplaintMapper">
|
|
|
-
|
|
|
+
|
|
|
<resultMap type="FsUserComplaint" id="FsUserComplaintResult">
|
|
|
<result property="id" column="id" />
|
|
|
<result property="fsUserId" column="fs_user_id" />
|
|
@@ -17,29 +17,68 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
<result property="remark" column="remark" />
|
|
|
+ <result property="complaintType" column="complaint_type" />
|
|
|
+ <result property="isHandleStore" column="is_handle_store" />
|
|
|
+ <result property="isHandlePlatform" column="is_handle_platform" />
|
|
|
+ <result property="isReadUser" column="is_read_user" />
|
|
|
+ <result property="isReadStore" column="is_read_store" />
|
|
|
+ <result property="isReadPlatform" column="is_read_platform" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectFsUserComplaintVo">
|
|
|
- select id, fs_user_id, title, content, images, type, link_id, create_time, create_by, update_time, update_by, remark from fs_user_complaint
|
|
|
+ select id, fs_user_id, title, content, images, type, link_id, create_time, create_by, update_time, update_by,
|
|
|
+ remark,complaint_type,is_handle_store,is_handle_platform,is_read_user,is_read_store,is_read_platform
|
|
|
+ from fs_user_complaint
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectFsUserComplaintList" parameterType="FsUserComplaint" resultMap="FsUserComplaintResult">
|
|
|
<include refid="selectFsUserComplaintVo"/>
|
|
|
- <where>
|
|
|
+ <where>
|
|
|
<if test="fsUserId != null "> and fs_user_id = #{fsUserId}</if>
|
|
|
<if test="title != null and title != ''"> and title = #{title}</if>
|
|
|
<if test="content != null and content != ''"> and content = #{content}</if>
|
|
|
<if test="images != null and images != ''"> and images = #{images}</if>
|
|
|
<if test="type != null "> and type = #{type}</if>
|
|
|
<if test="linkId != null "> and link_id = #{linkId}</if>
|
|
|
+ <if test="complaintType != null "> and complaint_type = #{complaintType}</if>
|
|
|
+ <if test="isHandleStore != null "> and is_handle_store = #{isHandleStore}</if>
|
|
|
+ <if test="isHandlePlatform != null "> and is_handle_platform = #{isHandlePlatform}</if>
|
|
|
+ <if test="isReadUser != null "> and is_read_user = #{isReadUser}</if>
|
|
|
+ <if test="isReadStore != null "> and is_read_store = #{isReadStore}</if>
|
|
|
+ <if test="isReadPlatform != null "> and is_read_platform = #{isReadPlatform}</if>
|
|
|
+ </where>
|
|
|
+ order by id desc
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectFsUserComplaintVoList" resultType="com.fs.user.domain.vo.FsUserComplaintVo">
|
|
|
+ select c.id, u.nick_name,c.title, c.content, c.images, c.type, c.link_id, c.create_time, c.create_by, c.update_time, c.update_by,
|
|
|
+ c.remark,c.complaint_type,c.is_handle_store,c.is_handle_platform,c.is_read_user,c.is_read_store,c.is_read_platform
|
|
|
+ from fs_user_complaint c
|
|
|
+ left join fs_user u on c.fs_user_id = u.user_id
|
|
|
+ <where>
|
|
|
+ <if test="fsUserId != null "> and c.fs_user_id = #{fsUserId}</if>
|
|
|
+ <if test="userName != null and userName != ''"> and u.nick_name = #{userName}</if>
|
|
|
+ <if test="title != null and title != ''"> and c.title = #{title}</if>
|
|
|
+ <if test="content != null and content != ''"> and c.content = #{content}</if>
|
|
|
+ <if test="images != null and images != ''"> and c.images = #{images}</if>
|
|
|
+ <if test="type != null "> and c.type = #{type}</if>
|
|
|
+ <if test="linkId != null "> and c.link_id = #{linkId}</if>
|
|
|
+ <if test="complaintType != null "> and c.complaint_type = #{complaintType}</if>
|
|
|
+ <if test="isHandleStore != null "> and c.is_handle_store = #{isHandleStore}</if>
|
|
|
+ <if test="isHandlePlatform != null "> and c.is_handle_platform = #{isHandlePlatform}</if>
|
|
|
+ <if test="isReadUser != null "> and c.is_read_user = #{isReadUser}</if>
|
|
|
+ <if test="isReadStore != null "> and c.is_read_store = #{isReadStore}</if>
|
|
|
+ <if test="isReadPlatform != null "> and c.is_read_platform = #{isReadPlatform}</if>
|
|
|
</where>
|
|
|
+ order by id desc
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="selectFsUserComplaintById" parameterType="Long" resultMap="FsUserComplaintResult">
|
|
|
<include refid="selectFsUserComplaintVo"/>
|
|
|
where id = #{id}
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
<insert id="insertFsUserComplaint" parameterType="FsUserComplaint" useGeneratedKeys="true" keyProperty="id">
|
|
|
insert into fs_user_complaint
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
@@ -54,6 +93,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
<if test="updateBy != null">update_by,</if>
|
|
|
<if test="remark != null">remark,</if>
|
|
|
+ <if test="complaintType != null">complaint_type,</if>
|
|
|
+ <if test="isHandleStore != null">is_handle_store,</if>
|
|
|
+ <if test="isHandlePlatform != null">is_handle_platform,</if>
|
|
|
+ <if test="isReadUser != null">is_read_user,</if>
|
|
|
+ <if test="isReadStore != null">is_read_store,</if>
|
|
|
+ <if test="isReadPlatform != null">is_read_platform,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="fsUserId != null">#{fsUserId},</if>
|
|
@@ -67,6 +112,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
|
<if test="remark != null">#{remark},</if>
|
|
|
+ <if test="complaintType != null">#{complaintType},</if>
|
|
|
+ <if test="isHandleStore != null">#{isHandleStore},</if>
|
|
|
+ <if test="isHandlePlatform != null">#{isHandlePlatform},</if>
|
|
|
+ <if test="isReadUser != null">#{isReadUser},</if>
|
|
|
+ <if test="isReadStore != null">#{isReadStore},</if>
|
|
|
+ <if test="isReadPlatform != null">#{isReadPlatform},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
@@ -84,6 +135,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
|
+ <if test="complaintType != null">complaint_type = #{complaintType},</if>
|
|
|
+ <if test="isHandleStore != null">is_handle_store = #{isHandleStore},</if>
|
|
|
+ <if test="isHandlePlatform != null">is_handle_platform = #{isHandlePlatform},</if>
|
|
|
+ <if test="isReadUser != null">is_read_user = #{isReadUser},</if>
|
|
|
+ <if test="isReadStore != null">is_read_store = #{isReadStore},</if>
|
|
|
+ <if test="isReadPlatform != null">is_read_platform = #{isReadPlatform},</if>
|
|
|
</trim>
|
|
|
where id = #{id}
|
|
|
</update>
|
|
@@ -93,9 +150,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteFsUserComplaintByIds" parameterType="String">
|
|
|
- delete from fs_user_complaint where id in
|
|
|
+ delete from fs_user_complaint where id in
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
#{id}
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
-</mapper>
|
|
|
+</mapper>
|