|
@@ -2,10 +2,10 @@ package data_manage
|
|
|
|
|
|
import (
|
|
|
"errors"
|
|
|
+ "eta/eta_api/utils"
|
|
|
"fmt"
|
|
|
"github.com/beego/beego/v2/client/orm"
|
|
|
"github.com/rdlucklib/rdluck_tools/paging"
|
|
|
- "eta/eta_api/utils"
|
|
|
"strconv"
|
|
|
"strings"
|
|
|
"time"
|
|
@@ -1644,6 +1644,7 @@ type SectionScatterReq struct {
|
|
|
type SectionScatterSeriesItemReq struct {
|
|
|
Name string `description:"系列名"`
|
|
|
NameEn string `description:"系列名(英文名)"`
|
|
|
+ IsNameDefault bool `description:"是否使用默认的系列名 false修改过 true默认 影响自动更新"`
|
|
|
Color string `description:"颜色"`
|
|
|
EdbInfoList []SectionScatterEdbItemReq
|
|
|
ShowTrendLine bool `description:"是否展示趋势线"`
|
|
@@ -1687,6 +1688,7 @@ type SectionScatterInfoResp struct {
|
|
|
type SectionScatterSeriesItemResp struct {
|
|
|
Name string `description:"系列名"`
|
|
|
NameEn string `description:"系列名(英文)"`
|
|
|
+ IsNameDefault bool `description:"是否使用默认的系列名 false修改过 true默认 影响自动更新"`
|
|
|
Color string `description:"颜色"`
|
|
|
EdbInfoList []SectionScatterEdbItemResp
|
|
|
ShowTrendLine bool `description:"是否展示趋势线"`
|
|
@@ -1773,5 +1775,28 @@ func GetChartInfoAdminList() (items []int, err error) {
|
|
|
sql := ` SELECT sys_user_id FROM chart_info GROUP BY sys_user_id `
|
|
|
|
|
|
_, err = o.Raw(sql).QueryRows(&items)
|
|
|
+ return
|
|
|
+}
|
|
|
+
|
|
|
+// EditChartInfoExtraConfig 修改 ETA图库 的 图表额外配置
|
|
|
+func EditChartInfoExtraConfig(chartId int, extraConfig string) (err error) {
|
|
|
+ o := orm.NewOrmUsingDB("data")
|
|
|
+ var pars []interface{}
|
|
|
+ pars = append(pars, extraConfig)
|
|
|
+
|
|
|
+ sql := ` UPDATE chart_info
|
|
|
+ SET
|
|
|
+ modify_time = NOW(),
|
|
|
+ extra_config = ?
|
|
|
+ `
|
|
|
+ sql += `WHERE chart_info_id = ?`
|
|
|
+
|
|
|
+ pars = append(pars, extraConfig)
|
|
|
+ _, err = o.Raw(sql, pars).Exec()
|
|
|
+ if err != nil {
|
|
|
+ fmt.Println("UPDATE chart_info Err:", err.Error())
|
|
|
+ return err
|
|
|
+ }
|
|
|
+
|
|
|
return
|
|
|
}
|