Просмотр исходного кода

期货报表增加币种名称字段

zou.yingbin 4 лет назад
Родитель
Сommit
61305d67d9
4 измененных файлов с 14 добавлено и 0 удалено
  1. 4 0
      docs/docs.go
  2. 4 0
      docs/swagger.json
  3. 3 0
      docs/swagger.yaml
  4. 3 0
      models/ermcp3Report.go

+ 4 - 0
docs/docs.go

@@ -18038,6 +18038,10 @@ var doc = `{
                     "description": "结算币种ID",
                     "type": "integer"
                 },
+                "currencyname": {
+                    "description": "币种名称",
+                    "type": "string"
+                },
                 "cycletime": {
                     "description": "周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】",
                     "type": "string"

+ 4 - 0
docs/swagger.json

@@ -18022,6 +18022,10 @@
                     "description": "结算币种ID",
                     "type": "integer"
                 },
+                "currencyname": {
+                    "description": "币种名称",
+                    "type": "string"
+                },
                 "cycletime": {
                     "description": "周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】",
                     "type": "string"

+ 3 - 0
docs/swagger.yaml

@@ -5313,6 +5313,9 @@ definitions:
       currencyid:
         description: 结算币种ID
         type: integer
+      currencyname:
+        description: 币种名称
+        type: string
       cycletime:
         description: 周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】
         type: string

+ 3 - 0
models/ermcp3Report.go

@@ -1955,6 +1955,7 @@ type Ermcp3TaFutuReDataReport struct {
 	OPENAVGPRICE  float64 `json:"openavgprice"`  // 开仓均价
 	CLOSEAVGPRICE float64 `json:"closeavgprice"` // 平仓均价
 	ENUMDICNAME   string  `json:"enumdicname"`   // 单位名称
+	CURRENCYNAME  string  `json:"currencyname"`  // 币种名称
 	QueryType     int32   `json:"-"`             // 查询类型 1-报表 2-报表明细
 	BeginDate     string  `json:"begindate"`     // 开始交易日
 	EndDate       string  `json:"enddate"`       // 结束交易日
@@ -1969,7 +1970,9 @@ func (r *Ermcp3TaFutuReDataReport) calc() {
 		r.CLOSEAVGPRICE = r.TODAYCLOSEAMOUNT / r.TODAYCLOSEQTY
 	}
 	r.ENUMDICNAME = mtpcache.GetEnumDicitemName(r.GOODUNITID)
+	r.CURRENCYNAME = mtpcache.GetCurrencyName(r.CURRENCYID)
 }
+
 func (r *Ermcp3TaFutuReDataReport) userType() int32 {
 	var userType int32 = 2
 	areaUserId := mtpcache.GetAreaUserId(r.USERID, 0)