Commit 12dabc45 authored by szh's avatar szh

反馈接口添加addr用户地址

parent 5edde7af
...@@ -107,6 +107,7 @@ CREATE TABLE `rasp_version` ( ...@@ -107,6 +107,7 @@ CREATE TABLE `rasp_version` (
DROP TABLE IF EXISTS `rasp_feedback`; DROP TABLE IF EXISTS `rasp_feedback`;
CREATE TABLE `rasp_feedback` ( CREATE TABLE `rasp_feedback` (
`id` varchar(25) NOT NULL DEFAULT '', `id` varchar(25) NOT NULL DEFAULT '',
`addr` varchar(255) NOT NULL DEFAULT '',
`description` text, `description` text,
`complete` tinyint(1) DEFAULT NULL, `complete` tinyint(1) DEFAULT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
......
...@@ -7,6 +7,7 @@ import ( ...@@ -7,6 +7,7 @@ import (
type RaspFeedback struct { type RaspFeedback struct {
Id string `json:"id" gorm:"PRIMARY_KEY"` Id string `json:"id" gorm:"PRIMARY_KEY"`
Addr string `json:"addr"`
Description string `json:"description"` Description string `json:"description"`
Complete bool `json:"complete"` Complete bool `json:"complete"`
} }
......
...@@ -154,10 +154,12 @@ func FeedBack(c *gin.Context){ ...@@ -154,10 +154,12 @@ func FeedBack(c *gin.Context){
} }
models.AddFeedBack(models.RaspFeedback{ models.AddFeedBack(models.RaspFeedback{
Id: fmt.Sprint(port), Id: fmt.Sprint(port),
Addr:KP["addr"],
Description: KP["description"], Description: KP["description"],
Complete: false, Complete: false,
}) })
models.AddFeedBackList(models.RaspFeedbackList{ models.AddFeedBackList(models.RaspFeedbackList{
Addr:KP["addr"],
Description: KP["description"], Description: KP["description"],
Addtime:time.Now().Unix(), Addtime:time.Now().Unix(),
}) })
......
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