This commit is contained in:
YAS\29473
2025-06-04 09:12:07 +08:00
parent 572af79b92
commit aca01ed537
7 changed files with 342 additions and 16 deletions

View File

@@ -0,0 +1,55 @@
package com.jsowell.pile.dto;
import lombok.Data;
import java.util.Date;
/**
* 查询会员反馈DTO
*/
@Data
public class QueryMemberFeedbackDTO {
private Integer pageSize;
private Integer pageNum;
private Long id;
/**
* 会员id
*/
private String memberId;
/**
* 会员姓名
*/
private String memberName;
/**
* 联系方式
*/
private String contactInfo;
/**
* 反馈类型 1=功能建议2=系统BUG3=服务投诉4=站点问题,5=电桩问题,6=其他)
*/
private String feedbackType;
/**
* 处理状态0=未处理,1=处理中,2=已处理,3=待跟进)
*/
private String status;
/**
* 管理员回复内容
*/
private String replyContent;
/**
* 管理员回复时间
*/
private Date replyTime;
}

View File

@@ -1,9 +1,11 @@
package com.jsowell.pile.mapper;
import com.jsowell.pile.domain.MemberFeedback;
import com.jsowell.pile.dto.QueryMemberFeedbackDTO;
import com.jsowell.pile.vo.uniapp.customer.MemberFeedbackVO;
import org.apache.ibatis.annotations.Mapper;
import java.util.Date;
import java.util.List;
@Mapper
@@ -22,4 +24,30 @@ public interface MemberFeedbackMapper {
* @return
*/
List<MemberFeedbackVO> selectMemberFeedbackList(String memberId);
/**
* 根据条件查询会员反馈信息列表
* @param dto
* @return
*/
List<MemberFeedbackVO> getFeedbackList(QueryMemberFeedbackDTO dto);
/**
* 根据会员ID查询会员反馈信息
* @param id
* @return
*/
MemberFeedbackVO getFeedbackById(Long id);
/**
* 根据ID更新会员反馈信息
* @param dto
*/
void updateFeedback(QueryMemberFeedbackDTO dto);
/**
* 根据ID删除会员反馈信息
* @param id
*/
void deleteMemberFeedbackById(Long id);
}

View File

@@ -1,6 +1,7 @@
package com.jsowell.pile.service;
import com.jsowell.pile.dto.MemberFeedbackDTO;
import com.jsowell.pile.dto.QueryMemberFeedbackDTO;
import com.jsowell.pile.vo.uniapp.customer.MemberFeedbackVO;
import java.util.List;
@@ -19,4 +20,30 @@ public interface MemberFeedbackService {
* @return
*/
List<MemberFeedbackVO> getFeedbackList(String memberId);
/**
* 条件查询用户反馈信息列表 (管理后台使用)
* @param dto
* @return
*/
List<MemberFeedbackVO> selectFeedbackList(QueryMemberFeedbackDTO dto);
/**
* 根据memberId获取用户反馈信息
* @param id
* @return
*/
MemberFeedbackVO getFeedbackById(Long id);
/**
* 根据memberId删除用户反馈信息
* @param dto
*/
void updateFeedback(QueryMemberFeedbackDTO dto);
/**
* 根据ids删除用户反馈信息
* @param ids
*/
void deleteFeedbackByIds(List<Long> ids);
}

View File

@@ -1,10 +1,13 @@
package com.jsowell.pile.service.impl;
import com.github.pagehelper.PageHelper;
import com.jsowell.common.constant.Constants;
import com.jsowell.common.core.redis.RedisCache;
import com.jsowell.common.util.DateUtils;
import com.jsowell.pile.domain.MemberBasicInfo;
import com.jsowell.pile.domain.MemberFeedback;
import com.jsowell.pile.dto.MemberFeedbackDTO;
import com.jsowell.pile.dto.QueryMemberFeedbackDTO;
import com.jsowell.pile.mapper.MemberBasicInfoMapper;
import com.jsowell.pile.mapper.MemberFeedbackMapper;
import com.jsowell.pile.service.MemberFeedbackService;
@@ -59,4 +62,49 @@ public class MemberFeedbackServiceImpl implements MemberFeedbackService {
public List<MemberFeedbackVO> getFeedbackList(String memberId) {
return memberFeedbackMapper.selectMemberFeedbackList(memberId);
}
/**
* 条件查询用户反馈列表 (后管)
* @param dto
* @return
*/
@Override
public List<MemberFeedbackVO> selectFeedbackList(QueryMemberFeedbackDTO dto) {
//分页
dto.setPageNum(dto.getPageNum() == null? 1 : dto.getPageNum());
dto.setPageSize(dto.getPageSize() == null? 10 : dto.getPageSize());
PageHelper.startPage(dto.getPageNum(), dto.getPageSize());
return memberFeedbackMapper.getFeedbackList(dto);
}
/**
* 根据id获取用户反馈信息
* @param id
* @return
*/
@Override
public MemberFeedbackVO getFeedbackById(Long id) {
return memberFeedbackMapper.getFeedbackById(id);
}
/**
* 根据id更新用户反馈信息
* @param dto
*/
@Override
public void updateFeedback(QueryMemberFeedbackDTO dto) {
memberFeedbackMapper.updateFeedback(dto);
}
/**
* 根据id删除用户反馈信息
* @param ids
*/
@Override
public void deleteFeedbackByIds(List<Long> ids) {
for (Long id : ids) {
memberFeedbackMapper.deleteMemberFeedbackById(id);
}
}
}

View File

@@ -9,6 +9,8 @@ import java.util.Date;
@Builder
public class MemberFeedbackVO {
private Long id;
/**
* 会员id
*/

View File

@@ -5,22 +5,34 @@
<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" />
<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
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">
@@ -102,11 +114,93 @@
</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
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'
WHERE member_id = #{memberId}
AND del_flag = '0'
ORDER BY create_time DESC
</select>
</mapper>
<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>