Browse Source

fix:修复系统设置-基本配置,智能研报素材库编辑时更换图片保存成功后未生效bug

Roc 1 week ago
parent
commit
9e2265c6eb

+ 3 - 1
controllers/smart_report/smart_resource.go

@@ -167,7 +167,9 @@ func (this *SmartReportResourceController) Edit() {
 		return
 	}
 
-	cols := []string{"ImgName", "Style"}
+	cols := []string{"Type", "ImgUrl", "ImgName", "Style"}
+	item.Type = req.Type
+	item.ImgUrl = req.ImgUrl
 	item.ImgName = req.ImgName
 	item.Style = req.Style
 

+ 2 - 0
models/smart_report/smart_resource.go

@@ -107,6 +107,8 @@ func (m *SmartReportResource) GetItemsByCondition(condition string, pars []inter
 // SmartReportResourceEditReq 智能研报资源编辑请求体
 type SmartReportResourceEditReq struct {
 	ResourceId int    `description:"资源ID"`
+	Type       int    `description:"类型 1-版头 2-版尾"`
+	ImgUrl     string `description:"图片资源地址"`
 	ImgName    string `description:"图片名称"`
 	Style      string `description:"版图样式"`
 }