|
@@ -38,6 +38,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:商品价格曲线"`
|
|
@@ -160,6 +163,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"`
|
|
|
}
|
|
@@ -234,6 +240,9 @@ type EditChartInfoReq struct {
|
|
|
LeftMax string `description:"图表左侧最大值"`
|
|
|
RightMin string `description:"图表右侧最小值"`
|
|
|
RightMax string `description:"图表右侧最大值"`
|
|
|
+ Right2Min string `description:"图表右侧最小值"`
|
|
|
+ Right2Max string `description:"图表右侧最大值"`
|
|
|
+ MinMaxSave int `description:"是否手动保存过上下限:0-否;1-是"`
|
|
|
BarChartInfo BarChartInfoReq `description:"柱方图的配置"`
|
|
|
CorrelationChartInfo CorrelationChartInfoReq `description:"相关性图表配置"`
|
|
|
ExtraConfig string `description:"图表额外配置信息,json字符串"`
|
|
@@ -574,9 +583,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)
|
|
@@ -604,9 +616,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
|
|
@@ -773,6 +788,15 @@ 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 += `,min_max_save = ? `
|
|
|
+ pars = append(pars, req.MinMaxSave)
|
|
|
+
|
|
|
sql += `WHERE chart_info_id = ?`
|
|
|
|
|
|
pars = append(pars, req.ChartInfoId)
|
|
@@ -930,6 +954,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)
|
|
@@ -1089,6 +1119,9 @@ type AddChartInfoReq struct {
|
|
|
LeftMax string `description:"图表左侧最大值"`
|
|
|
RightMin string `description:"图表右侧最小值"`
|
|
|
RightMax string `description:"图表右侧最大值"`
|
|
|
+ Right2Min string `description:"图表右侧2最小值"`
|
|
|
+ Right2Max string `description:"图表右侧2最大值"`
|
|
|
+ MinMaxSave int `description:"是否手动保存过上下限:0-否;1-是"`
|
|
|
BarChartInfo BarChartInfoReq `description:"柱方图的配置"`
|
|
|
CorrelationChartInfo CorrelationChartInfoReq `description:"相关性图表配置"`
|
|
|
ExtraConfig string `description:"图表额外配置信息,json字符串"`
|
|
@@ -1397,6 +1430,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:"错误信息"`
|