From 596701bb990290441d5dc29ec6fc31879df46e3a Mon Sep 17 00:00:00 2001 From: "Mr. Lan" Date: Sun, 20 Sep 2020 20:39:05 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=E5=8F=8A=E6=8F=8F=E8=BF=B0=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/process/process.go | 4 +++- models/process/process.go | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/apis/process/process.go b/apis/process/process.go index 1f1fb62..ba5d769 100644 --- a/apis/process/process.go +++ b/apis/process/process.go @@ -109,6 +109,8 @@ func UpdateProcess(c *gin.Context) { "classify": processValue.Classify, "task": processValue.Task, "notice": processValue.Notice, + "icon": processValue.Icon, + "remarks": processValue.Remarks, }).Error if err != nil { app.Error(c, -1, err, fmt.Sprintf("更新流程信息失败,%v", err.Error())) @@ -193,7 +195,7 @@ func ClassifyProcessList(c *gin.Context) { for _, item := range classifyList { err = orm.Eloquent.Model(&process2.Info{}). Where("classify = ? and name LIKE ?", item.Id, fmt.Sprintf("%%%v%%", processName)). - Select("id, create_time, update_time, name"). + Select("id, create_time, update_time, name, icon, remarks"). Find(&item.ProcessList).Error if err != nil { app.Error(c, -1, err, fmt.Sprintf("获取流程失败,%v", err.Error())) diff --git a/models/process/process.go b/models/process/process.go index 8e06792..3ac26a9 100644 --- a/models/process/process.go +++ b/models/process/process.go @@ -13,13 +13,15 @@ import ( type Info struct { base.Model Name string `gorm:"column:name; type:varchar(128)" json:"name" form:"name"` // 流程名称 + Icon string `gorm:"column:icon; type:varchar(128)" json:"icon" form:"icon"` // 流程标签 Structure json.RawMessage `gorm:"column:structure; type:json" json:"structure" form:"structure"` // 流程结构 Classify int `gorm:"column:classify; type:int(11)" json:"classify" form:"classify"` // 分类ID Tpls json.RawMessage `gorm:"column:tpls; type:json" json:"tpls" form:"tpls"` // 模版 Task json.RawMessage `gorm:"column:task; type:json" json:"task" form:"task"` // 任务ID, array, 可执行多个任务,可以当成通知任务,每个节点都会去执行 SubmitCount int `gorm:"column:submit_count; type:int(11); default:0" json:"submit_count" form:"submit_count"` // 提交统计 Creator int `gorm:"column:creator; type:int(11)" json:"creator" form:"creator"` // 创建者 - Notice json.RawMessage `gorm:"column:notice; type:json" json:"notice" form:"notice"` // TODO:绑定通知 + Notice json.RawMessage `gorm:"column:notice; type:json" json:"notice" form:"notice"` // 绑定通知 + Remarks string `gorm:"column:remarks; type:varchar(1024)" json:"remarks" form:"remarks"` // 流程备注 } func (Info) TableName() string {