boweniac 4 天之前
父節點
當前提交
6bfc1d06ee
共有 3 個文件被更改,包括 7 次插入7 次删除
  1. 3 3
      desc/wechat/dashboard.api
  2. 1 1
      internal/logic/dashboard/get_charts_logic.go
  3. 3 3
      internal/types/types.go

+ 3 - 3
desc/wechat/dashboard.api

@@ -31,7 +31,7 @@ type (
         ActiveUser *ChartsUint `json:"active_user"`
         NewUser *ChartsInt `json:"new_user"`
         LabelDist []LabelsData `json:"label_dist"`
-		ConsumeCoin *ChartsInt `json:"consume_coin"`
+		ConsumeCoin *ChartsMix `json:"consume_coin"`
     }
 
     ChartsUint {
@@ -51,8 +51,8 @@ type (
 		LabelText string `json:"labelText"`
 		Tip *string `json:"tip"`
 	}
-	ChartsStr {
-        Count string `json:"count"`
+	ChartsMix {
+        Count int64 `json:"count"`
         Rate *float32 `json:"rate"`
         Label []string `json:"label"`
         Val []float64 `json:"val"`

+ 1 - 1
internal/logic/dashboard/get_charts_logic.go

@@ -500,7 +500,7 @@ func (l *GetChartsLogic) GetCharts(req *types.ChartsReq) (resp *types.ChartsResp
 		}
 	}
 
-	consumeCoinInt := types.ChartsInt{}
+	consumeCoinInt := types.ChartsMix{}
 	consumeCoinInt.Val = consumeCoin.Val
 	consumeCoinInt.Label = consumeCoin.Label
 	consumeCoinInt.LabelText = consumeCoin.LabelText

+ 3 - 3
internal/types/types.go

@@ -3592,7 +3592,7 @@ type ChartsData struct {
 	ActiveUser     *ChartsUint  `json:"active_user"`
 	NewUser        *ChartsInt   `json:"new_user"`
 	LabelDist      []LabelsData `json:"label_dist"`
-	ConsumeCoin    *ChartsInt   `json:"consume_coin"`
+	ConsumeCoin    *ChartsMix   `json:"consume_coin"`
 }
 
 type ChartsUint struct {
@@ -3613,8 +3613,8 @@ type ChartsFloat struct {
 	Tip       *string   `json:"tip"`
 }
 
-type ChartsStr struct {
-	Count     string    `json:"count"`
+type ChartsMix struct {
+	Count     int64     `json:"count"`
 	Rate      *float32  `json:"rate"`
 	Label     []string  `json:"label"`
 	Val       []float64 `json:"val"`