From bff17b38f82c412ad1bac881426dc591238c3b5f Mon Sep 17 00:00:00 2001
From: gongzuming <gongzuming>
Date: 星期一, 26 八月 2024 13:57:58 +0800
Subject: [PATCH] 投诉反馈优化

---
 src/main/resources/update.sql                                      |   29 ++++++++++++++++++++---------
 src/main/java/com/mzl/flower/dto/response/content/FeedbackDTO.java |    8 +++++++-
 2 files changed, 27 insertions(+), 10 deletions(-)

diff --git a/src/main/java/com/mzl/flower/dto/response/content/FeedbackDTO.java b/src/main/java/com/mzl/flower/dto/response/content/FeedbackDTO.java
index 7d3c9e1..ee0b8d3 100644
--- a/src/main/java/com/mzl/flower/dto/response/content/FeedbackDTO.java
+++ b/src/main/java/com/mzl/flower/dto/response/content/FeedbackDTO.java
@@ -1,12 +1,14 @@
 package com.mzl.flower.dto.response.content;
 
+import com.mzl.flower.base.AbstractTransDTO;
+import com.mzl.flower.base.annotation.DictTrans;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.time.LocalDateTime;
 
 @Data
-public class FeedbackDTO {
+public class FeedbackDTO extends AbstractTransDTO {
 
     private Long id;
 
@@ -17,8 +19,12 @@
     private String feedBack;
 
     @ApiModelProperty("投诉反馈类型(feedback_type)")
+    @DictTrans(target = "typeStr",codeType = "feedback_type")
     private String type;
 
+    @ApiModelProperty("投诉反馈类型(feedback_type)")
+    private String typeStr;
+
     @ApiModelProperty("图片")
     private String pictures;
 
diff --git a/src/main/resources/update.sql b/src/main/resources/update.sql
index d2ed779..0328b71 100644
--- a/src/main/resources/update.sql
+++ b/src/main/resources/update.sql
@@ -1,10 +1,21 @@
-ALTER TABLE `t_flower`
-    ADD COLUMN `recommend_rank` int(11) NULL COMMENT '推荐排序' AFTER `real_sales`;
+CREATE TABLE `t_feedback` (
+                              `id` int(11) NOT NULL AUTO_INCREMENT,
+                              `user_id` varchar(45) DEFAULT NULL COMMENT '用户id',
+                              `type` varchar(20) DEFAULT NULL COMMENT '类型',
+                              `feed_back` varchar(300) DEFAULT NULL COMMENT '投诉反馈内容',
+                              `pictures` longtext COMMENT '投诉凭证',
+                              `reply` varchar(300) DEFAULT NULL COMMENT '回复内容',
+                              `handled` tinyint(1) DEFAULT NULL COMMENT '是否处理',
+                              `reply_time` datetime DEFAULT NULL COMMENT '回复时间',
+                              `deleted` tinyint(1) DEFAULT NULL COMMENT '逻辑删',
+                              `create_by` varchar(50) DEFAULT NULL COMMENT '创建者',
+                              `update_by` varchar(50) DEFAULT NULL COMMENT '修改者',
+                              `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+                              `update_time` datetime DEFAULT NULL COMMENT '修改时间',
+                              PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='投诉反馈';
 
-
-ALTER TABLE `t_flower_zone_map`
-    ADD COLUMN `rank` int(11) NULL COMMENT '专区排序' AFTER `update_time`;
-
-ALTER TABLE `t_order`
-    ADD COLUMN `wx_delivery_good` tinyint(1) NULL DEFAULT 0 COMMENT '微信是否发货' AFTER `bill_id`,
-    ADD COLUMN `wx_delivery_msg` longtext NULL COMMENT '微信发货返回信息' AFTER `wx_delivery_good`;
\ No newline at end of file
+INSERT INTO `t_code_type`(`ID`, `NAME`, `CODE`, `DESCRIPTION`, `deleted`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES ('feedback_type', '投诉反馈类型', 'feedback_type', NULL, 0, '1', '1', '2024-08-26 09:23:28', '2024-08-26 09:23:33');
+INSERT INTO `t_code_value`(`id`, `type_code`, `value`, `label`, `description`, `seq`, `status`, `is_vis`, `deleted`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES ('feedback_type_1', 'feedback_type', '1', '平台', '平台', 1, 'A', NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO `t_code_value`(`id`, `type_code`, `value`, `label`, `description`, `seq`, `status`, `is_vis`, `deleted`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES ('feedback_type_2', 'feedback_type', '2', '商品', '商品', 2, 'A', NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO `t_code_value`(`id`, `type_code`, `value`, `label`, `description`, `seq`, `status`, `is_vis`, `deleted`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES ('feedback_type_3', 'feedback_type', '3', '其它', '其它', 3, 'A', NULL, NULL, NULL, NULL, NULL, NULL);
\ No newline at end of file

--
Gitblit v1.9.3