Files
jsowell-charger-web/jsowell-pile/src/main/resources/mapper/pile/MemberFeedbackMapper.xml
YAS\29473 aca01ed537 update
2025-06-04 09:12:07 +08:00

207 lines
6.3 KiB
XML

<?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.jsowell.pile.mapper.MemberFeedbackMapper">
<resultMap type="com.jsowell.pile.domain.MemberFeedback" id="MemberFeedbackResultMap">
<result property="id" column="id"/>
<result property="memberId" column="member_id"/>
<result property="memberName" column="member_name"/>
<result property="contactInfo" column="contact_info"/>
<result property="feedbackType" column="feedback_type"/>
<result property="feedbackContent" column="feedback_content"/>
<result property="status" column="status"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
<result property="replyContent" column="reply_content"/>
<result property="replyTime" column="reply_time"/>
<result property="delFlag" column="del_flag"/>
</resultMap>
<sql id="selectCarCouponRecordVo">
select id,
member_id,
member_name,
contact_info,
feedback_type,
feedback_content,
status,
create_time,
update_time,
reply_content,
reply_time,
del_flag
from member_feedback
</sql>
<insert id="insertMemberFeedback" parameterType="com.jsowell.pile.domain.MemberFeedback">
insert into member_feedback
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="memberId != null">
member_id,
</if>
<if test="memberName != null">
member_name,
</if>
<if test="contactInfo != null">
contact_info,
</if>
<if test="feedbackType != null">
feedback_type,
</if>
<if test="feedbackContent != null">
feedback_content,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="replyContent != null">
reply_content,
</if>
<if test="replyTime != null">
reply_time,
</if>
<if test="delFlag != null">
del_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id},
</if>
<if test="memberId != null">
#{memberId},
</if>
<if test="memberName != null">
#{memberName},
</if>
<if test="contactInfo != null">
#{contactInfo},
</if>
<if test="feedbackType != null">
#{feedbackType},
</if>
<if test="feedbackContent != null">
#{feedbackContent},
</if>
<if test="status != null">
#{status},
</if>
<if test="createTime != null">
#{createTime},
</if>
<if test="updateTime != null">
#{updateTime},
</if>
<if test="replyContent != null">
#{replyContent},
</if>
<if test="replyTime != null">
#{replyTime},
</if>
<if test="delFlag != null">
#{delFlag},
</if>
</trim>
</insert>
<update id="updateFeedback">
UPDATE member_feedback
<set>
<if test="status != null">
status = #{status},
</if>
<if test="replyContent != null">
reply_content = #{replyContent},
</if>
<if test="replyTime != null">
reply_time = #{replyTime},
</if>
</set>
WHERE id = #{id}
</update>
<delete id="deleteMemberFeedbackById">
DELETE
FROM member_feedback
WHERE id = #{id}
</delete>
<select id="selectMemberFeedbackList" resultType="com.jsowell.pile.vo.uniapp.customer.MemberFeedbackVO">
SELECT member_id,
member_name,
contact_info,
feedback_type,
feedback_content,
status,
create_time,
update_time,
reply_content,
reply_time
FROM member_feedback
WHERE member_id = #{memberId}
AND del_flag = '0'
ORDER BY create_time DESC
</select>
<select id="getFeedbackList" resultType="com.jsowell.pile.vo.uniapp.customer.MemberFeedbackVO">
SELECT
id,
member_id,
member_name,
contact_info,
feedback_type,
feedback_content,
status,
create_time,
update_time,
reply_content,
reply_time
FROM member_feedback
<where>
del_flag = '0'
<if test="memberId != null and memberId != ''">
AND member_id = #{memberId}
</if>
<if test="memberName != null and memberName != ''">
AND member_name = #{memberName}
</if>
<if test="feedbackType != null and feedbackType != ''">
AND feedback_type = #{feedbackType}
</if>
<if test="status != null and status != ''">
AND status = #{status}
</if>
</where>
ORDER BY create_time DESC
</select>
<select id="getFeedbackById" resultType="com.jsowell.pile.vo.uniapp.customer.MemberFeedbackVO">
SELECT id,
member_id,
member_name,
contact_info,
feedback_type,
feedback_content,
status,
create_time,
update_time,
reply_content,
reply_time
FROM member_feedback
WHERE id = #{id}
AND del_flag = '0'
</select>
</mapper>