|
@@ -57,9 +57,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
<select id="selectFsUserComplaintVoList" resultType="com.fs.user.domain.vo.FsUserComplaintVo">
|
|
<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,
|
|
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,c.store_id,is_process_completed
|
|
|
|
|
- from fs_user_complaint c
|
|
|
|
|
- left join fs_user u on c.fs_user_id = u.user_id
|
|
|
|
|
|
|
+ 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,c.store_id,is_process_completed, ss.store_name
|
|
|
|
|
+ from
|
|
|
|
|
+ fs_user_complaint c
|
|
|
|
|
+ LEFT JOIN fs_user u ON c.fs_user_id = u.user_id
|
|
|
|
|
+ LEFT JOIN fs_store_scrm ss ON c.store_id = ss.store_id
|
|
|
<where>
|
|
<where>
|
|
|
<if test="fsUserId != null "> and c.fs_user_id = #{fsUserId}</if>
|
|
<if test="fsUserId != null "> and c.fs_user_id = #{fsUserId}</if>
|
|
|
<if test="nickName != null and nickName != ''"> and u.nick_name like CONCAT('%',#{nickName},'%')</if>
|
|
<if test="nickName != null and nickName != ''"> and u.nick_name like CONCAT('%',#{nickName},'%')</if>
|
|
@@ -75,6 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="isReadStore != null "> and c.is_read_store = #{isReadStore}</if>
|
|
<if test="isReadStore != null "> and c.is_read_store = #{isReadStore}</if>
|
|
|
<if test="isReadPlatform != null "> and c.is_read_platform = #{isReadPlatform}</if>
|
|
<if test="isReadPlatform != null "> and c.is_read_platform = #{isReadPlatform}</if>
|
|
|
<if test="storeId != null "> and c.store_id = #{storeId}</if>
|
|
<if test="storeId != null "> and c.store_id = #{storeId}</if>
|
|
|
|
|
+ <if test="queryIdentifier != null and queryIdentifier == 1">OR (c.complaint_type = 1 AND c.store_id IS NULL)</if>
|
|
|
</where>
|
|
</where>
|
|
|
order by id desc
|
|
order by id desc
|
|
|
</select>
|
|
</select>
|
|
@@ -85,11 +88,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectFsUserComplaintVoById" parameterType="Long" resultType="com.fs.user.domain.vo.FsUserComplaintVo">
|
|
<select id="selectFsUserComplaintVoById" parameterType="Long" 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,c.store_id
|
|
|
|
|
- ,c.is_process_completed
|
|
|
|
|
- from fs_user_complaint c
|
|
|
|
|
- left join fs_user u on c.fs_user_id = u.user_id
|
|
|
|
|
|
|
+ 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,
|
|
|
|
|
+ c.store_id,
|
|
|
|
|
+ c.is_process_completed,
|
|
|
|
|
+ ss.store_name
|
|
|
|
|
+ FROM
|
|
|
|
|
+ fs_user_complaint c
|
|
|
|
|
+ LEFT JOIN fs_user u ON c.fs_user_id = u.user_id
|
|
|
|
|
+ LEFT JOIN fs_store_scrm ss ON c.store_id = ss.store_id
|
|
|
where c.id = #{id}
|
|
where c.id = #{id}
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
@@ -180,4 +204,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
#{id}
|
|
#{id}
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</delete>
|
|
</delete>
|
|
|
|
|
+
|
|
|
|
|
+ <update id="updateComplaintById">
|
|
|
|
|
+ update fs_user_complaint set store_id = #{storeId} where id = #{complaintId} and store_id IS NULL
|
|
|
|
|
+ </update>
|
|
|
</mapper>
|
|
</mapper>
|