|
@@ -36,6 +36,9 @@ type ChartInfo struct {
|
|
|
LeftMax string `description:"图表左侧最大值"`
|
|
|
RightMin string `description:"图表右侧最小值"`
|
|
|
RightMax string `description:"图表右侧最大值"`
|
|
|
+ Right2Min string `description:"图表右侧2最小值"`
|
|
|
+ Right2Max string `description:"图表右侧2最大值"`
|
|
|
+ MinMaxSave int `description:"是否手动保存过上下限:0-否;1-是"`
|
|
|
Disabled int `description:"是否禁用,0:启用,1:禁用,默认:0"`
|
|
|
BarConfig string `description:"柱方图的配置,json数据"`
|
|
|
Source int `description:"1:ETA图库;2:商品价格曲线"`
|
|
@@ -158,6 +161,9 @@ type SaveChartInfoReq struct {
|
|
|
LeftMax string `description:"图表左侧最大值"`
|
|
|
RightMin string `description:"图表右侧最小值"`
|
|
|
RightMax string `description:"图表右侧最大值"`
|
|
|
+ Right2Min string `description:"图表右侧最小值"`
|
|
|
+ Right2Max string `description:"图表右侧最大值"`
|
|
|
+ MinMaxSave int `description:"是否手动保存过上下限:0-否;1-是"`
|
|
|
ExtraConfig string `description:"图表额外配置,json数据"`
|
|
|
StartYear int `description:"当选择的日期类型为最近N年类型时,即date_type=20, 用start_year表示N"`
|
|
|
}
|
|
@@ -227,6 +233,8 @@ type EditChartInfoReq struct {
|
|
|
LeftMax string `description:"图表左侧最大值"`
|
|
|
RightMin string `description:"图表右侧最小值"`
|
|
|
RightMax string `description:"图表右侧最大值"`
|
|
|
+ Right2Min string `description:"图表右侧最小值"`
|
|
|
+ Right2Max string `description:"图表右侧最大值"`
|
|
|
BarChartInfo BarChartInfoReq `description:"柱方图的配置"`
|
|
|
CorrelationChartInfo CorrelationChartInfoReq `description:"相关性图表配置"`
|
|
|
ExtraConfig string `description:"图表额外配置信息,json字符串"`
|
|
@@ -562,9 +570,12 @@ func ModifyChartInfoAndMapping(edbInfoIdStr string, req *SaveChartInfoReq, chart
|
|
|
left_min=?,
|
|
|
left_max=?,
|
|
|
right_min=?,
|
|
|
- right_max=?,
|
|
|
+ right_max=?,
|
|
|
+ right2_min=?,
|
|
|
+ right2_max=?,
|
|
|
+ min_max_save=?,
|
|
|
start_year=?`
|
|
|
- pars := []interface{}{edbInfoIdStr, req.DateType, req.StartDate, req.EndDate, req.LeftMin, req.LeftMax, req.RightMin, req.RightMax, req.StartYear}
|
|
|
+ pars := []interface{}{edbInfoIdStr, req.DateType, req.StartDate, req.EndDate, req.LeftMin, req.LeftMax, req.RightMin, req.RightMax, req.Right2Min, req.Right2Max, req.MinMaxSave, req.StartYear}
|
|
|
if req.ExtraConfig != `` {
|
|
|
updateStr += `,extra_config=? `
|
|
|
pars = append(pars, req.ExtraConfig)
|
|
@@ -592,9 +603,12 @@ func ModifyChartInfoAndMapping(edbInfoIdStr string, req *SaveChartInfoReq, chart
|
|
|
left_max=?,
|
|
|
right_min=?,
|
|
|
right_max=?,
|
|
|
+ right2_min=?,
|
|
|
+ right2_max=?,
|
|
|
+ min_max_save=?,
|
|
|
start_year=?
|
|
|
WHERE chart_info_id = ?`
|
|
|
- _, err = to.Raw(sql, edbInfoIdStr, req.Calendar, req.DateType, req.StartDate, req.EndDate, req.StartDate, req.EndDate, req.LeftMin, req.LeftMax, req.RightMin, req.RightMax, req.StartYear, req.ChartInfoId).Exec()
|
|
|
+ _, err = to.Raw(sql, edbInfoIdStr, req.Calendar, req.DateType, req.StartDate, req.EndDate, req.StartDate, req.EndDate, req.LeftMin, req.LeftMax, req.RightMin, req.RightMax, req.Right2Min, req.Right2Max, req.MinMaxSave, req.StartYear, req.ChartInfoId).Exec()
|
|
|
if err != nil {
|
|
|
fmt.Println("UPDATE chart_info Err:", err.Error())
|
|
|
return err
|
|
@@ -761,6 +775,12 @@ func EditChartInfoAndMapping(req *EditChartInfoReq, edbInfoIdStr string, calenda
|
|
|
sql += `,right_max = ? `
|
|
|
pars = append(pars, req.RightMax)
|
|
|
|
|
|
+ sql += `,right2_min = ? `
|
|
|
+ pars = append(pars, req.Right2Min)
|
|
|
+
|
|
|
+ sql += `,right2_max = ? `
|
|
|
+ pars = append(pars, req.Right2Max)
|
|
|
+
|
|
|
sql += `WHERE chart_info_id = ?`
|
|
|
|
|
|
pars = append(pars, req.ChartInfoId)
|
|
@@ -907,6 +927,12 @@ func EditFutureGoodChartInfoAndMapping(req *EditChartInfoReq, edbInfoIdStr strin
|
|
|
sql += `,right_max = ? `
|
|
|
pars = append(pars, req.RightMax)
|
|
|
|
|
|
+ sql += `,right2_min = ? `
|
|
|
+ pars = append(pars, req.Right2Min)
|
|
|
+
|
|
|
+ sql += `,right2_max = ? `
|
|
|
+ pars = append(pars, req.Right2Max)
|
|
|
+
|
|
|
sql += `WHERE chart_info_id = ?`
|
|
|
|
|
|
pars = append(pars, req.ChartInfoId)
|
|
@@ -1066,6 +1092,8 @@ type AddChartInfoReq struct {
|
|
|
LeftMax string `description:"图表左侧最大值"`
|
|
|
RightMin string `description:"图表右侧最小值"`
|
|
|
RightMax string `description:"图表右侧最大值"`
|
|
|
+ Right2Min string `description:"图表右侧2最小值"`
|
|
|
+ Right2Max string `description:"图表右侧2最大值"`
|
|
|
BarChartInfo BarChartInfoReq `description:"柱方图的配置"`
|
|
|
CorrelationChartInfo CorrelationChartInfoReq `description:"相关性图表配置"`
|
|
|
ExtraConfig string `description:"图表额外配置信息,json字符串"`
|
|
@@ -1372,6 +1400,9 @@ type ChartInfoView struct {
|
|
|
LeftMax string `description:"图表左侧最大值"`
|
|
|
RightMin string `description:"图表右侧最小值"`
|
|
|
RightMax string `description:"图表右侧最大值"`
|
|
|
+ Right2Min string `description:"图表右侧最小值"`
|
|
|
+ Right2Max string `description:"图表右侧最大值"`
|
|
|
+ MinMaxSave int `description:"是否手动保存过上下限:0-否;1-是"`
|
|
|
IsEdit bool `description:"是否有编辑权限"`
|
|
|
IsEnChart bool `description:"是否展示英文标识"`
|
|
|
WarnMsg string `description:"错误信息"`
|