Procházet zdrojové kódy

fix:日期也要别名

Roc před 2 roky
rodič
revize
71e8906329

+ 1 - 0
models/request/chart.go

@@ -19,6 +19,7 @@ type BarChartInfoDateReq struct {
 	Date  string `description:"固定日期"`
 	Value int    `description:"N天的值"`
 	Color string `description:"颜色"`
+	Name  string `description:"别名"`
 }
 
 // BarChartInfoSortReq 柱方图预览请求数据(排序相关)

+ 1 - 0
models/response/chart_info/chart_info.go

@@ -17,4 +17,5 @@ type YData struct {
 	Date  string    `description:"数据日期"`
 	Color string    `description:"数据颜色"`
 	Value []float64 `description:"每个指标的值"`
+	Name  string    `description:"别名"`
 }

+ 1 - 0
services/chart/chart_info.go

@@ -850,6 +850,7 @@ func BarChartData(mappingList []*chartEdbMappingModel.ChartEdbInfoMapping, edbDa
 			Date:  maxDate.Format(utils.FormatDate),
 			Value: findDataList,
 			Color: barChartInfoDate.Color,
+			Name:  barChartInfoDate.Name,
 		})
 	}