Ver Fonte

feature(反馈报修): 修改错误的数据库注释、修改反馈和报修类型为字符串

liuyaqi há 3 anos atrás
pai
commit
1ebce85942

+ 1 - 1
dao/feedback/internal/feedback.go

@@ -30,7 +30,7 @@ type feedbackColumns struct {
 	Type               string // 反馈类型
 	Status             string // 反馈状态 1 未处理 2 已处理
 	Content            string // 反馈内容
-	CurrentProcessorId string // 反馈内容
+	CurrentProcessorId string // 当前处理人 Id
 	CreatedById        string // 创建者 Id
 	CreatedByName      string // 创建者用户名
 	CreatedByMobile    string // 创建者联系方式

+ 1 - 1
dao/repair/internal/repair.go

@@ -30,7 +30,7 @@ type repairColumns struct {
 	Type               string // 报修类型
 	Status             string // 报修状态 1 未处理 2 已处理
 	Content            string // 报修内容
-	CurrentProcessorId string // 反馈内容
+	CurrentProcessorId string // 当前处理人 Id
 	CreatedById        string // 创建者 Id
 	CreatedByName      string // 创建者用户名
 	CreatedByMobile    string // 创建者联系方式

+ 1 - 1
model/feedback/feedback.go

@@ -34,7 +34,7 @@ type FeedbackGetRsp struct {
 }
 
 type FeedbackAddReq struct {
-	Type    int    `json:"type" v:"required#请输入反馈类型"`                   // 反馈类型
+	Type    string `json:"type" v:"required#请输入反馈类型"`                   // 反馈类型
 	Content string `json:"content" v:"required#请输入反馈内容"`                // 反馈内容
 	Mobile  string `json:"mobile" v:"required|phone#请输入联系方式|请输入正确的手机号"` // 联系方式
 	Email   string `json:"email" v:"required|email#请输入电子邮箱|请输入正确的电子邮箱"` // 邮箱

+ 2 - 2
model/feedback/internal/feedback.go

@@ -11,10 +11,10 @@ import (
 // Feedback is the golang structure for table feedback.
 type Feedback struct {
 	Id                 int         `orm:"Id,primary"         json:"id"`                 // Id
-	Type               int         `orm:"Type"               json:"type"`               // 反馈类型
+	Type               string      `orm:"Type"               json:"type"`               // 反馈类型
 	Status             int         `orm:"Status"             json:"status"`             // 反馈状态 1 未处理 2 已处理
 	Content            string      `orm:"Content"            json:"content"`            // 反馈内容
-	CurrentProcessorId int         `orm:"CurrentProcessorId" json:"currentProcessorId"` // 反馈内容
+	CurrentProcessorId int         `orm:"CurrentProcessorId" json:"currentProcessorId"` // 当前处理人 Id
 	CreatedById        int         `orm:"CreatedById"        json:"createdById"`        // 创建者 Id
 	CreatedByName      string      `orm:"CreatedByName"      json:"createdByName"`      // 创建者用户名
 	CreatedByMobile    string      `orm:"CreatedByMobile"    json:"createdByMobile"`    // 创建者联系方式

+ 2 - 2
model/repair/internal/repair.go

@@ -11,10 +11,10 @@ import (
 // Repair is the golang structure for table repair.
 type Repair struct {
 	Id                 int         `orm:"Id,primary"         json:"id"`                 // Id
-	Type               int         `orm:"Type"               json:"type"`               // 报修类型
+	Type               string      `orm:"Type"               json:"type"`               // 报修类型
 	Status             int         `orm:"Status"             json:"status"`             // 报修状态 1 未处理 2 已处理
 	Content            string      `orm:"Content"            json:"content"`            // 报修内容
-	CurrentProcessorId int         `orm:"CurrentProcessorId" json:"currentProcessorId"` // 反馈内容
+	CurrentProcessorId int         `orm:"CurrentProcessorId" json:"currentProcessorId"` // 当前处理人 Id
 	CreatedById        int         `orm:"CreatedById"        json:"createdById"`        // 创建者 Id
 	CreatedByName      string      `orm:"CreatedByName"      json:"createdByName"`      // 创建者用户名
 	CreatedByMobile    string      `orm:"CreatedByMobile"    json:"createdByMobile"`    // 创建者联系方式

+ 1 - 1
model/repair/repair.go

@@ -34,7 +34,7 @@ type RepairGetRsp struct {
 }
 
 type RepairAddReq struct {
-	Type    int    `json:"type" v:"required#请输入报修类型"`                   // 报修类型
+	Type    string `json:"type" v:"required#请输入报修类型"`                   // 报修类型
 	Content string `json:"content" v:"required#请输入报修内容"`                // 报修内容
 	Mobile  string `json:"mobile" v:"required|phone#请输入联系方式|请输入正确的手机号"` // 联系方式
 	Email   string `json:"email" v:"required|email#请输入电子邮箱|请输入正确的电子邮箱"` // 邮箱

+ 2 - 2
sql/feedback.sql

@@ -1,10 +1,10 @@
 
 CREATE TABLE `feedback` (
   `Id` int NOT NULL AUTO_INCREMENT COMMENT 'Id',
-  `Type` int NOT NULL COMMENT '反馈类型',
+  `Type` varchar(255) NOT NULL COMMENT '反馈类型',
   `Status` int NOT NULL COMMENT '反馈状态 1 未处理 2 已处理',
   `Content` text NOT NULL COMMENT '反馈内容',
-  `CurrentProcessorId` int NOT NULL COMMENT '反馈内容',
+  `CurrentProcessorId` int NOT NULL COMMENT '当前处理人 Id',
   `CreatedById` int NOT NULL COMMENT '创建者 Id',
   `CreatedByName` varchar(255) NOT NULL COMMENT '创建者用户名',
   `CreatedByMobile` varchar(255) NOT NULL COMMENT '创建者联系方式',

+ 2 - 2
sql/repair.sql

@@ -1,10 +1,10 @@
 
 CREATE TABLE `repair` (
   `Id` int NOT NULL AUTO_INCREMENT COMMENT 'Id',
-  `Type` int NOT NULL COMMENT '报修类型',
+  `Type` varchar(255) NOT NULL COMMENT '报修类型',
   `Status` int NOT NULL COMMENT '报修状态 1 未处理 2 已处理',
   `Content` text NOT NULL COMMENT '报修内容',
-  `CurrentProcessorId` int NOT NULL COMMENT '反馈内容',
+  `CurrentProcessorId` int NOT NULL COMMENT '当前处理人 Id',
   `CreatedById` int NOT NULL COMMENT '创建者 Id',
   `CreatedByName` varchar(255) NOT NULL COMMENT '创建者用户名',
   `CreatedByMobile` varchar(255) NOT NULL COMMENT '创建者联系方式',

+ 4 - 4
swaggerui/swagger.yml

@@ -1,7 +1,7 @@
 openapi: 3.0.0
 info:
-    title: lims
-    description: 培训考试
+    title: LIMS
+    description: 实验室管理
     version: 0.0.1
 
 paths:
@@ -1865,7 +1865,7 @@ components:
         - email
       properties:
         type:
-          type: integer
+          type: string
           description: 反馈类型
         content:
           type: string
@@ -1957,7 +1957,7 @@ components:
         - email
       properties:
         type:
-          type: integer
+          type: string
           description: 报修类型
         content:
           type: string