@@ -276,7 +276,7 @@ func GetEggCoreDataList(c *gin.Context) { | |||||
// @Produce json | // @Produce json | ||||
// @param Authorization header string true "验证参数Bearer和token空格拼接" | // @param Authorization header string true "验证参数Bearer和token空格拼接" | ||||
// @Param kind query string false "1:按天 2:按小时 3:按周" | // @Param kind query string false "1:按天 2:按小时 3:按周" | ||||
// @Success 200 {object} map[string]interface{} "具体数据" | |||||
// @Success 200 {object} md.GetPriceCurveResp "具体数据" | |||||
// @Failure 400 {object} md.Response "具体错误" | // @Failure 400 {object} md.Response "具体错误" | ||||
// @Router /api/institutionalManagement/eggEnergy/globalData/pointsCenterPriceCurve [get] | // @Router /api/institutionalManagement/eggEnergy/globalData/pointsCenterPriceCurve [get] | ||||
func GetPriceCurve(c *gin.Context) { | func GetPriceCurve(c *gin.Context) { | ||||
@@ -347,9 +347,9 @@ func GetPriceCurve(c *gin.Context) { | |||||
break | break | ||||
} | } | ||||
e.OutSuc(c, map[string]interface{}{ | |||||
"yData": yData, | |||||
"xData": xData, | |||||
e.OutSuc(c, md.GetPriceCurveResp{ | |||||
YData: yData, | |||||
XData: xData, | |||||
}, nil) | }, nil) | ||||
return | return | ||||
} | } | ||||
@@ -72,6 +72,11 @@ type GetEggCoreDataListResp struct { | |||||
UserHoldTotalNums map[string]string `json:"user_hold_total_nums"` // 用户持有总量 | UserHoldTotalNums map[string]string `json:"user_hold_total_nums"` // 用户持有总量 | ||||
} | } | ||||
type GetPriceCurveResp struct { | |||||
XData []interface{} `json:"x_data"` | |||||
YData []interface{} `json:"y_data"` | |||||
} | |||||
type GetFundDataListReq struct { | type GetFundDataListReq struct { | ||||
Kind int `json:"kind"` // 数据类型 | Kind int `json:"kind"` // 数据类型 | ||||
StartAt string `json:"start_at" example:"开始时间"` | StartAt string `json:"start_at" example:"开始时间"` | ||||
@@ -353,8 +353,7 @@ const docTemplate = `{ | |||||
"200": { | "200": { | ||||
"description": "具体数据", | "description": "具体数据", | ||||
"schema": { | "schema": { | ||||
"type": "object", | |||||
"additionalProperties": true | |||||
"$ref": "#/definitions/md.GetPriceCurveResp" | |||||
} | } | ||||
}, | }, | ||||
"400": { | "400": { | ||||
@@ -2312,6 +2311,19 @@ const docTemplate = `{ | |||||
} | } | ||||
} | } | ||||
}, | }, | ||||
"md.GetPriceCurveResp": { | |||||
"type": "object", | |||||
"properties": { | |||||
"x_data": { | |||||
"type": "array", | |||||
"items": {} | |||||
}, | |||||
"y_data": { | |||||
"type": "array", | |||||
"items": {} | |||||
} | |||||
} | |||||
}, | |||||
"md.GetPublicPlatoonBasicResp": { | "md.GetPublicPlatoonBasicResp": { | ||||
"type": "object", | "type": "object", | ||||
"properties": { | "properties": { | ||||
@@ -346,8 +346,7 @@ | |||||
"200": { | "200": { | ||||
"description": "具体数据", | "description": "具体数据", | ||||
"schema": { | "schema": { | ||||
"type": "object", | |||||
"additionalProperties": true | |||||
"$ref": "#/definitions/md.GetPriceCurveResp" | |||||
} | } | ||||
}, | }, | ||||
"400": { | "400": { | ||||
@@ -2305,6 +2304,19 @@ | |||||
} | } | ||||
} | } | ||||
}, | }, | ||||
"md.GetPriceCurveResp": { | |||||
"type": "object", | |||||
"properties": { | |||||
"x_data": { | |||||
"type": "array", | |||||
"items": {} | |||||
}, | |||||
"y_data": { | |||||
"type": "array", | |||||
"items": {} | |||||
} | |||||
} | |||||
}, | |||||
"md.GetPublicPlatoonBasicResp": { | "md.GetPublicPlatoonBasicResp": { | ||||
"type": "object", | "type": "object", | ||||
"properties": { | "properties": { | ||||
@@ -730,6 +730,15 @@ definitions: | |||||
description: 持有该类型用户数 | description: 持有该类型用户数 | ||||
type: integer | type: integer | ||||
type: object | type: object | ||||
md.GetPriceCurveResp: | |||||
properties: | |||||
x_data: | |||||
items: {} | |||||
type: array | |||||
y_data: | |||||
items: {} | |||||
type: array | |||||
type: object | |||||
md.GetPublicPlatoonBasicResp: | md.GetPublicPlatoonBasicResp: | ||||
properties: | properties: | ||||
is_open: | is_open: | ||||
@@ -1364,8 +1373,7 @@ paths: | |||||
"200": | "200": | ||||
description: 具体数据 | description: 具体数据 | ||||
schema: | schema: | ||||
additionalProperties: true | |||||
type: object | |||||
$ref: '#/definitions/md.GetPriceCurveResp' | |||||
"400": | "400": | ||||
description: 具体错误 | description: 具体错误 | ||||
schema: | schema: | ||||
@@ -84,6 +84,7 @@ require ( | |||||
github.com/pelletier/go-toml/v2 v2.2.1 // indirect | github.com/pelletier/go-toml/v2 v2.2.1 // indirect | ||||
github.com/pkg/errors v0.9.1 // indirect | github.com/pkg/errors v0.9.1 // indirect | ||||
github.com/saintfish/chardet v0.0.0-20230101081208-5e3ef4b5456d // indirect | github.com/saintfish/chardet v0.0.0-20230101081208-5e3ef4b5456d // indirect | ||||
github.com/shopspring/decimal v1.3.1 // indirect | |||||
github.com/streadway/amqp v1.0.0 // indirect | github.com/streadway/amqp v1.0.0 // indirect | ||||
github.com/syndtr/goleveldb v1.0.0 // indirect | github.com/syndtr/goleveldb v1.0.0 // indirect | ||||
github.com/temoto/robotstxt v1.1.2 // indirect | github.com/temoto/robotstxt v1.1.2 // indirect | ||||