zhou.xiaoning %!s(int64=3) %!d(string=hai) anos
pai
achega
9fa0871a83
Modificáronse 1 ficheiros con 6 adicións e 6 borrados
  1. 6 6
      controllers/quote/history.go

+ 6 - 6
controllers/quote/history.go

@@ -179,9 +179,9 @@ func QueryHistoryDatas(c *gin.Context) {
 					if len(rst) == 0 {
 						// 历史数据当前没数据则直接加当前盘面数据
 						historyData := HistoryData{
-							Opened:        utils.IntToFloat64(int(v.Last), dcplace),
-							Highest:       utils.IntToFloat64(int(v.Last), dcplace),
-							Lowest:        utils.IntToFloat64(int(v.Last), dcplace),
+							Opened:        utils.IntToFloat64(int(v.Opened), dcplace),
+							Highest:       utils.IntToFloat64(int(v.Highest), dcplace),
+							Lowest:        utils.IntToFloat64(int(v.Lowest), dcplace),
 							Closed:        utils.IntToFloat64(int(v.Last), dcplace),
 							TotleVolume:   int(v.Totalvolume),
 							TotleTurnover: float64(v.Totalturnover),
@@ -202,9 +202,9 @@ func QueryHistoryDatas(c *gin.Context) {
 						hd := rst[len(rst)-1]
 						if hd.TimeStamp.Before(fisrtDate) {
 							historyData := HistoryData{
-								Opened:        utils.IntToFloat64(int(v.Last), dcplace),
-								Highest:       utils.IntToFloat64(int(v.Last), dcplace),
-								Lowest:        utils.IntToFloat64(int(v.Last), dcplace),
+								Opened:        utils.IntToFloat64(int(v.Opened), dcplace),
+								Highest:       utils.IntToFloat64(int(v.Highest), dcplace),
+								Lowest:        utils.IntToFloat64(int(v.Lowest), dcplace),
 								Closed:        utils.IntToFloat64(int(v.Last), dcplace),
 								TotleVolume:   int(v.Totalvolume),
 								TotleTurnover: float64(v.Totalturnover),