Commit d6457ba4 authored by daniel's avatar daniel

fix(feedback): feedback联调完成

parent 9b63338f
......@@ -30,9 +30,9 @@
WHERE id = #{id}
</update>
<delete id="delete" parameterType="java.lang.Integer">
DELETE FROM feedback_category WHERE id = #{id}
</delete>
<update id="delete" parameterType="java.lang.Integer">
UPDATE feedback_category SET del_flag = 1 WHERE id = #{id}
</update>
<select id="selectById" parameterType="java.lang.Integer" resultType="com.dlbridge.jadp.plugins.cmpt.dao.model.FeedbackCategory">
SELECT * FROM feedback_category WHERE id = #{id}
......@@ -53,7 +53,7 @@
<if test="isActive != null">
AND is_active = #{isActive}
</if>
AND del_flag = 0
AND del_flag = 0 order by sort_order asc
</where>
</select>
......
......@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dlbridge.jadp.plugins.cmpt.dao.mapper.FeedbackMapper">
<insert id="insert" parameterType="com.dlbridge.jadp.plugins.cmpt.dao.model.Feedback">
INSERT INTO feedback (user_id, category_id, content, contact_info, feedback_image_url, current_status, admin_notes, resolution_result,feedback_no, resolve_image_url, del_flag,cmpt_id)
INSERT INTO feedback (user_id, category_id, content, contact_info,feedback_no, feedback_image_url, current_status, admin_notes, resolution_result, resolve_image_url, del_flag,cmpt_id)
VALUES (#{userId}, #{categoryId}, #{content}, #{contactInfo},#{feedbackNo}, #{feedbackImageUrl}, #{currentStatus}, #{adminNotes}, #{resolutionResult}, #{resolveImageUrl}, 0,#{cmptId})
</insert>
......@@ -36,6 +36,9 @@
<if test="resolveImageUrl != null">
resolve_image_url = #{resolveImageUrl},
</if>
<if test="resolvedAt != null">
resolved_at = #{resolvedAt},
</if>
<if test="delFlag != null">
del_flag = #{delFlag}
</if>
......@@ -43,9 +46,11 @@
WHERE id = #{id}
</update>
<delete id="delete" parameterType="java.lang.Integer">
DELETE FROM feedback WHERE id = #{id}
</delete>
<update id="delete" parameterType="java.lang.Integer">
UPDATE feedback
SET del_flag = 1
WHERE id = #{id}
</update>
<select id="selectById" parameterType="java.lang.Integer" resultType="com.dlbridge.jadp.plugins.cmpt.dao.model.Feedback">
SELECT * FROM feedback WHERE id = #{id}
......@@ -63,7 +68,7 @@
<if test="categoryId != null">
AND category_id = #{categoryId}
</if>
<if test="feedbackNo != null">
<if test="feedbackNo != null and feedbackNo !=''">
AND feedback_no = #{feedbackNo}
</if>
<if test="currentStatus != null and currentStatus != ''">
......
......@@ -2,10 +2,13 @@ package com.dlbridge.jadp.plugins.cmpt.dao.model;
import com.dlbridge.jadp.common.persistence.JaapRecord;
import com.dlbridge.jadp.plugins.partner.bean.BagDelivery;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
......@@ -16,18 +19,32 @@ import java.util.Date;
@Accessors(chain = true)
public class Feedback extends JaapRecord<BagDelivery> {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "反馈编号,后台自主生成", notes = "反馈编号,后台自主生成")
private String feedbackNo; // 反馈编号,后台自主生成
@ApiModelProperty(value = "用户ID", notes = "用户ID")
private Integer userId;
@ApiModelProperty(value = "赛事ID", notes = "赛事ID")
private Integer cmptId; // 赛事id
@ApiModelProperty(value = "反馈类别ID", notes = "反馈类别ID")
private Integer categoryId; // 反馈类别ID
@ApiModelProperty(value = "问题描述内容", notes = "问题描述内容")
private String content; // 问题描述内容
@ApiModelProperty(value = "联系方式(手机/邮箱", notes = "联系方式(手机/邮箱")
private String contactInfo; // 联系方式(手机/邮箱
@ApiModelProperty(value = "反馈图片URL,多张以逗号分隔", notes = "反馈图片URL,多张以逗号分隔")
private String feedbackImageUrl; // 反馈图片URL,多张以逗号分隔
private String currentStatus; // 当前状态 'pending','processing','resolved'(待处理/处理中/已解决)
@ApiModelProperty(value = "当前状态0,1,2(待处理/处理中/已解决) 当前状态:待处理/处理中/已解决", notes = "当前状态0,1,2(待处理/处理中/已解决) 当前状态:待处理/处理中/已解决")
private Integer currentStatus; // 当前状态0,1,2(待处理/处理中/已解决) 当前状态:待处理/处理中/已解决
@ApiModelProperty(value = "管理员备注", notes = "管理员备注")
private String adminNotes; // 管理员备注
@ApiModelProperty(value = "解决结果", notes = "解决结果")
private String resolutionResult; // 解决结果
@ApiModelProperty(value = "解决图片URL,多张以逗号分隔", notes = "解决图片URL,多张以逗号分隔")
private String resolveImageUrl; // 解决图片URL,多张以逗号分隔
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date resolvedAt; // 解决时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createdAt;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updatedAt;
}
......@@ -4,7 +4,9 @@ package com.dlbridge.jadp.plugins.cmpt.dao.model;
import com.dlbridge.jadp.common.persistence.JaapRecord;
import com.dlbridge.jadp.plugins.partner.bean.BagDelivery;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
......@@ -17,11 +19,20 @@ import java.util.Date;
@Accessors(chain = true)
public class FeedbackCategory extends JaapRecord<BagDelivery> {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "用户id", notes = "用户id")
private Integer userId;
@ApiModelProperty(value = "赛事id", notes = "赛事id")
private Integer cmptId; // 赛事id
@ApiModelProperty(value = "分类名称", notes = "分类名称")
private String name; // 分类名称
@ApiModelProperty(value = "排序顺序", notes = "排序顺序")
private Integer sortOrder; // 排序顺序
@ApiModelProperty(value = "是否启用", notes = "是否启用")
private Integer isActive; // 是否启用
@ApiModelProperty(value = "创建时间", notes = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createdAt;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新时间", notes = "更新时间")
private Date updatedAt;
}
......@@ -10,4 +10,5 @@ public class FeedbackQueryDTO extends PageDTO {
private Integer categoryId;
private Integer cmptId;
private String currentStatus;
private String feedbackNo;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment