Commit 12dabc45 authored by szh's avatar szh

反馈接口添加addr用户地址

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