2 Commits c5f39dc407 ... 137f48bee7

Autore SHA1 Messaggio Data
  muchinfo 137f48bee7 Merge branch 'master' of http://192.168.31.240:3000/MTP2.0_New/MTP20_IF 3 mesi fa
  muchinfo 6aeba42464 任务 #7129 【Go查询】接口“api/sbyj/GetMyOrders”: "TradeHolderDetailEx"Redis结构添加“止盈止损"相关字段 3 mesi fa
8 ha cambiato i file con 459 aggiunte e 450 eliminazioni
  1. 4 4
      controllers/guangzuan/tradeService.go
  2. 2 2
      controllers/user/user.go
  3. 119 167
      docs/docs.go
  4. 119 167
      docs/swagger.json
  5. 111 107
      docs/swagger.yaml
  6. 16 0
      models/sbyj.go
  7. 80 2
      pb/mtp2.pb.go
  8. 8 1
      pb/mtp2.proto

+ 4 - 4
controllers/guangzuan/tradeService.go

@@ -18,8 +18,8 @@ import (
 // @Security Group
 // @Param    userid   query    int    true  "用户ID"
 // @Param    executestatus query    int false "执行状态 - 1:未生效 2:进行中 3:已结束"
-// @Param    page          query    int false "页码"
-// @Param    pagesize      query    int false "每页条数"
+// @Param    page     query    int    false "页码"
+// @Param    pagesize query    int    false "每页条数"
 // @Success  200           {array}  models.GzcjjcorderM
 // @Failure  500     {object} app.Response
 // @Router   /Guangzuan/QueryGZCJJCOrder [get]
@@ -39,8 +39,8 @@ func QueryGZCJJCOrder(c *gin.Context) {
 // @Security Group
 // @Param    userid        query    int true  "用户ID"
 // @Param    orderid  query    string false "单据ID"
-// @Param    page     query    int    false "页码"
-// @Param    pagesize query    int    false "每页条数"
+// @Param    page          query    int false "页码"
+// @Param    pagesize      query    int false "每页条数"
 // @Success  200      {array}  models.GzcjjcorderdetailM
 // @Failure  500           {object} app.Response
 // @Router   /Guangzuan/QueryGZCJJCOrderDetail [get]

+ 2 - 2
controllers/user/user.go

@@ -769,7 +769,7 @@ type QueryUserScoreReq struct {
 // @Produce  json
 // @Security ApiKeyAuth
 // @Param    userID query    int true "用户ID"
-// @Success  200       {object} models.QueryUserScoreRsp
+// @Success  200    {object} models.QueryUserScoreRsp
 // @Failure  500    {object} app.Response
 // @Router   /User/QueryUserScore [get]
 // @Tags     用户信息
@@ -801,7 +801,7 @@ func QueryUserScore(c *gin.Context) {
 // @Produce  json
 // @Security ApiKeyAuth
 // @Param    userID query    int true "用户ID"
-// @Success  200       {object} models.QueryUserScoreDetailRsp
+// @Success  200    {object} models.QueryUserScoreDetailRsp
 // @Failure  500    {object} app.Response
 // @Router   /User/QueryUserScoreDetail [get]
 // @Tags     用户信息

+ 119 - 167
docs/docs.go

@@ -24729,11 +24729,7 @@ const docTemplate = `{
                 },
                 "fillData": {
                     "description": "单行文本、多行文本、日期、身份证类型参数填充。",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/asign.APIFillData"
-                        }
-                    ]
+                    "$ref": "#/definitions/asign.APIFillData"
                 },
                 "tableDatas": {
                     "description": "表格填充数据",
@@ -24777,19 +24773,11 @@ const docTemplate = `{
             "properties": {
                 "company": {
                     "description": "企业法人银行卡四要素,实体类型为企业时必填",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/asign.CompanyBankCard4"
-                        }
-                    ]
+                    "$ref": "#/definitions/asign.CompanyBankCard4"
                 },
                 "person": {
                     "description": "个人银行卡四要素,实体类型为个人时必填",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/asign.PersonBankCard4"
-                        }
-                    ]
+                    "$ref": "#/definitions/asign.PersonBankCard4"
                 },
                 "type": {
                     "description": "实体类型 1:个人 2:企业",
@@ -25293,11 +25281,7 @@ const docTemplate = `{
                 },
                 "province": {
                     "description": "省",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.Division"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.Division"
                 }
             }
         },
@@ -26699,7 +26683,7 @@ const docTemplate = `{
             "type": "object",
             "properties": {
                 "amount": {
-                    "description": "点价金额=(点价价格+升贴水)*点价数量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "applyid": {
@@ -27283,7 +27267,7 @@ const docTemplate = `{
                     "type": "integer"
                 },
                 "deductamount": {
-                    "description": "退款(非必填)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "deliverygoodscode": {
@@ -27323,7 +27307,7 @@ const docTemplate = `{
                     "type": "integer"
                 },
                 "payamount": {
-                    "description": "收付款(非必填)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "pricemove": {
@@ -27490,11 +27474,7 @@ const docTemplate = `{
                 },
                 "mg": {
                     "description": "套保品种基本信息",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.ErmcpMiddleGoodsModel"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.ErmcpMiddleGoodsModel"
                 },
                 "wrcList": {
                     "description": "现货品种列表(现货商品折算配置)",
@@ -28091,31 +28071,31 @@ const docTemplate = `{
                     "type": "number"
                 },
                 "diffArbitrageQty": {
-                    "description": "套利变动量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "diffExposoureQty": {
-                    "description": "变动量(套保敞口)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "diffFutuQty": {
-                    "description": "变动量(期货总量) 平安:保值净持仓量今日变动",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "diffHedgeQty": {
-                    "description": "套保变动量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "diffQty": {
-                    "description": "变动量(总敞口) 平安:净敞口今日变动",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "diffSpotHedgeQty": {
-                    "description": "变动量(现货应套保总量) 平安:应套保量今日变动",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "diffSpotQty": {
-                    "description": "变动量(现货总量) = 现货数量 - 期初现货数量 平安:采销定价净值今日变动",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "enumdicname": {
@@ -29730,11 +29710,7 @@ const docTemplate = `{
                 },
                 "ouruser": {
                     "description": "我方账号",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/erms3.CustomerInfo"
-                        }
-                    ]
+                    "$ref": "#/definitions/erms3.CustomerInfo"
                 },
                 "warehouseinfos": {
                     "description": "仓库信息列表",
@@ -30069,11 +30045,7 @@ const docTemplate = `{
                 },
                 "province": {
                     "description": "省",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.Division"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.Division"
                 }
             }
         },
@@ -32119,7 +32091,7 @@ const docTemplate = `{
                     "type": "number"
                 },
                 "curaverageprice": {
-                    "description": "期均价",
+                    "description": "期均价",
                     "type": "number"
                 },
                 "curbuyamount": {
@@ -32131,7 +32103,7 @@ const docTemplate = `{
                     "type": "number"
                 },
                 "curmarketvalue": {
-                    "description": "参考市值(期末市值)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "curqty": {
@@ -32155,7 +32127,7 @@ const docTemplate = `{
                     "type": "number"
                 },
                 "curspotprice": {
-                    "description": "参考市价(最新价)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "cycletime": {
@@ -32187,7 +32159,7 @@ const docTemplate = `{
                     "type": "string"
                 },
                 "floatpl": {
-                    "description": "浮动损益",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "goodsunitid": {
@@ -32235,7 +32207,7 @@ const docTemplate = `{
                     "type": "number"
                 },
                 "todaybuyaverageprice": {
-                    "description": "今日采购均价",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "todaybuyqty": {
@@ -32255,7 +32227,7 @@ const docTemplate = `{
                     "type": "number"
                 },
                 "todaysellaverageprice": {
-                    "description": "今日销售均价",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "todaysellqty": {
@@ -35187,7 +35159,7 @@ const docTemplate = `{
                     "type": "integer"
                 },
                 "convertratio": {
-                    "description": "折算系数",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "cycletime": {
@@ -35211,11 +35183,11 @@ const docTemplate = `{
                     "type": "string"
                 },
                 "diffprice": {
-                    "description": "现期价格差 = 今日点价登记均价(基价) - 今日期货成交均价",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "diffqty": {
-                    "description": "期现数量差 = 套保计划量 - 今日期货关联成交量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "enddate": {
@@ -35223,7 +35195,7 @@ const docTemplate = `{
                     "type": "string"
                 },
                 "hedgeplanqty": {
-                    "description": "套保计划量 = TodayPricedQty * 折算系数 * (1/(1+增值税率)) * 套保比例",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "matchname": {
@@ -35247,31 +35219,31 @@ const docTemplate = `{
                     "type": "string"
                 },
                 "middlegoodspricedqty": {
-                    "description": "已定价量(套保品种 - 税前) = PricedQty * 折算系数",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "middlegoodspricedqty2": {
-                    "description": "已定价量(套保品种- 税后) = MiddleGoodsPricedQty * (1/(1+增值税率))",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "middlegoodspricedqty3": {
-                    "description": "已定价量(套保品种应套保量) = MiddleGoodsPricedQty2 *  套保比率",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "needhedgeratio": {
-                    "description": "套保系数",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "pricedamount": {
-                    "description": "已定价额(现货)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "pricedamount2": {
-                    "description": "已定价额(现货-基价额)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "pricedqty": {
-                    "description": "已定价量(现货)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "reckondate": {
@@ -35279,11 +35251,11 @@ const docTemplate = `{
                     "type": "string"
                 },
                 "relatedmiddlegoodsamount": {
-                    "description": "已关联额(期货)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "relatedmiddlegoodsqty": {
-                    "description": "已关联量(套保品种)(期货)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "spotcontractid": {
@@ -35291,39 +35263,39 @@ const docTemplate = `{
                     "type": "string"
                 },
                 "todayavgfutuprice": {
-                    "description": "今日期货成交均价 = TodayRelatedMiddleGoodsAmount /todayrelatedfutureqty",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "todayavgprice": {
-                    "description": "今日定价均价 = TodayPricedAmount / TodayPricedQty",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "todayavgprice2": {
-                    "description": "今日点价登记均价(基价) = TodayPricedAmount2 / TodayPricedQty",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "todaypricedamount": {
-                    "description": "今日定价额(现货)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "todaypricedamount2": {
-                    "description": "今日定价额(现货-基价额)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "todaypricedqty": {
-                    "description": "今日定价量(现货)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "todayrelatedfutureqty": {
-                    "description": "今日关联量(期货)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "todayrelatedmiddlegoodsamount": {
-                    "description": "今日关联额(期货)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "todayrelatedmiddlegoodsqty": {
-                    "description": "今日关联量(套保品-期货)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "updatetime": {
@@ -35335,7 +35307,7 @@ const docTemplate = `{
                     "type": "integer"
                 },
                 "vatrate": {
-                    "description": "增值税率",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "wrstandardcode": {
@@ -35884,7 +35856,7 @@ const docTemplate = `{
                     "type": "number"
                 },
                 "closeavgprice": {
-                    "description": "平仓均价",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "closepl": {
@@ -35952,7 +35924,7 @@ const docTemplate = `{
                     "type": "number"
                 },
                 "holdqty": {
-                    "description": "期末持仓量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "lastholdamount": {
@@ -35984,7 +35956,7 @@ const docTemplate = `{
                     "type": "number"
                 },
                 "openavgprice": {
-                    "description": "开仓均价",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "oriholdamount": {
@@ -35992,7 +35964,7 @@ const docTemplate = `{
                     "type": "number"
                 },
                 "oriholdqty": {
-                    "description": "期初持仓量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "oriopenamount": {
@@ -36036,7 +36008,7 @@ const docTemplate = `{
                     "type": "number"
                 },
                 "todaycloseqty": {
-                    "description": "今平仓量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "todaygoodsgroupspotqty": {
@@ -36052,7 +36024,7 @@ const docTemplate = `{
                     "type": "number"
                 },
                 "todayopenqty": {
-                    "description": "今开仓量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "userid": {
@@ -37806,11 +37778,7 @@ const docTemplate = `{
             "properties": {
                 "menu": {
                     "description": "父级菜单",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.ErmcpRoleMenu"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.ErmcpRoleMenu"
                 },
                 "subMenu": {
                     "description": "子级菜单",
@@ -38116,11 +38084,7 @@ const docTemplate = `{
             "properties": {
                 "mainAcc": {
                     "description": "主账号",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.ErmcpTaAccountM"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.ErmcpTaAccountM"
                 },
                 "subacclist": {
                     "description": "子账号列表",
@@ -40290,11 +40254,7 @@ const docTemplate = `{
             "properties": {
                 "riskRatioType": {
                     "description": "风险率类型表",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.Riskratiotype"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.Riskratiotype"
                 },
                 "todayAccountMargins": {
                     "description": "今日账户保证金表",
@@ -54083,11 +54043,7 @@ const docTemplate = `{
                 },
                 "tHDetailEx": {
                     "description": "交易持仓扩展表记录",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.TradeHolderDetailEx"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.TradeHolderDetailEx"
                 },
                 "thumurls": {
                     "description": "缩略图片(1:1)(逗号分隔)",
@@ -56127,11 +56083,7 @@ const docTemplate = `{
             "properties": {
                 "goodsinfo": {
                     "description": "商品信息",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.THJWrstandardDetail_GoodsInfo"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.THJWrstandardDetail_GoodsInfo"
                 },
                 "spotgoodspricelogs": {
                     "description": "历史价格走势",
@@ -56265,11 +56217,7 @@ const docTemplate = `{
                 },
                 "goodsinfo": {
                     "description": "商品信息",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.THJPurchaseTradeDetail_Goodsinfo"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.THJPurchaseTradeDetail_Goodsinfo"
                 },
                 "spotgoodspricelogs": {
                     "description": "历史价格走势",
@@ -56566,11 +56514,7 @@ const docTemplate = `{
                 },
                 "goodsinfo": {
                     "description": "商品信息",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.THJWrstandardDetail_GoodsInfo"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.THJWrstandardDetail_GoodsInfo"
                 },
                 "presaleapplydeposits": {
                     "description": "支付方式",
@@ -58009,11 +57953,7 @@ const docTemplate = `{
                 },
                 "infoc": {
                     "description": "配置参数",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/pb.GoodsMarginCfgStruct"
-                        }
-                    ]
+                    "$ref": "#/definitions/pb.GoodsMarginCfgStruct"
                 },
                 "marketid": {
                     "description": "市场ID",
@@ -58045,7 +57985,7 @@ const docTemplate = `{
                     "type": "string"
                 },
                 "orderprice": {
-                    "description": "委托价格",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "orderqty": {
@@ -58114,7 +58054,7 @@ const docTemplate = `{
                     "type": "integer"
                 },
                 "qty": {
-                    "description": "转让数量(数量)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "tradeid": {
@@ -58585,7 +58525,7 @@ const docTemplate = `{
                     "type": "integer"
                 },
                 "freezeqty": {
-                    "description": "冻结数量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "goodscode": {
@@ -58621,7 +58561,7 @@ const docTemplate = `{
                     "type": "number"
                 },
                 "holderqty": {
-                    "description": "持仓数量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "isconfirmexercise": {
@@ -58645,7 +58585,7 @@ const docTemplate = `{
                     "type": "number"
                 },
                 "openqty": {
-                    "description": "建仓数量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "optiontype": {
@@ -58729,6 +58669,14 @@ const docTemplate = `{
         "models.TradeHolderDetailEx": {
             "type": "object",
             "properties": {
+                "TPFlag": {
+                    "description": "止盈标识:0-未设置 1-设置",
+                    "type": "integer"
+                },
+                "TPRatio": {
+                    "description": "止盈比例",
+                    "type": "number"
+                },
                 "accountID": {
                     "description": "账号ID",
                     "type": "integer"
@@ -58865,6 +58813,30 @@ const docTemplate = `{
                     "description": "补充定金",
                     "type": "number"
                 },
+                "sLFlag": {
+                    "description": "止损标识:0-未设置 1-设置",
+                    "type": "integer"
+                },
+                "sLLossValue": {
+                    "description": "止损亏损值(负) = 占用*止损比例*-1",
+                    "type": "number"
+                },
+                "sLPrice": {
+                    "description": "止损价格",
+                    "type": "number"
+                },
+                "sLRatio": {
+                    "description": "止损比例",
+                    "type": "number"
+                },
+                "tPPrice": {
+                    "description": "止盈价格",
+                    "type": "number"
+                },
+                "tPProfitValue": {
+                    "description": "止盈盈利(正) = 占用*止盈比例",
+                    "type": "number"
+                },
                 "tradeAmount": {
                     "description": "成交金额",
                     "type": "number"
@@ -60316,7 +60288,7 @@ const docTemplate = `{
                     "type": "string"
                 },
                 "fixedprice": {
-                    "description": "挂牌价格",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "handlestatus": {
@@ -60324,7 +60296,7 @@ const docTemplate = `{
                     "type": "integer"
                 },
                 "marginvalue": {
-                    "description": "履约保证金比例",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "marketid": {
@@ -60506,7 +60478,7 @@ const docTemplate = `{
             "type": "object",
             "properties": {
                 "averageprice": {
-                    "description": "成交均价",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "tradedate": {
@@ -60764,7 +60736,7 @@ const docTemplate = `{
                     "type": "integer"
                 },
                 "averageprice": {
-                    "description": "交割均价 = 交割金额 / 交割数量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "begindate": {
@@ -60888,7 +60860,7 @@ const docTemplate = `{
                     "type": "number"
                 },
                 "xgoodsamount": {
-                    "description": "合约金额 = 货款金额(DELIVERYAMOUNT) - 点价货款(P1GOODSREMAINAMOUNT)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "xgoodscode": {
@@ -61776,7 +61748,7 @@ const docTemplate = `{
                     "type": "string"
                 },
                 "stepvalue": {
-                    "description": "步骤值",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "templateid": {
@@ -62087,7 +62059,7 @@ const docTemplate = `{
                     "type": "integer"
                 },
                 "amount": {
-                    "description": "挂牌金额 = 委托数量 * 固定价或升贴水",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "bannerpicurl": {
@@ -62147,11 +62119,11 @@ const docTemplate = `{
                     "type": "number"
                 },
                 "freezecharge": {
-                    "description": "冻结手续费",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "freezemargin": {
-                    "description": "冻结保证金(保证金)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "futupricemove": {
@@ -62187,7 +62159,7 @@ const docTemplate = `{
                     "type": "string"
                 },
                 "marginvalue": {
-                    "description": "保证金设置值(履约保证金)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "marketid": {
@@ -62429,7 +62401,7 @@ const docTemplate = `{
                     "type": "integer"
                 },
                 "delistminqty": {
-                    "description": "起摘数量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "deliverymonth": {
@@ -62850,7 +62822,7 @@ const docTemplate = `{
                     "type": "string"
                 },
                 "unpaidamount": {
-                    "description": "剩余款(待支付金额)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "userid": {
@@ -63397,7 +63369,7 @@ const docTemplate = `{
                     "type": "integer"
                 },
                 "delistminqty": {
-                    "description": "起摘数量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "deliverygoodscode": {
@@ -63534,11 +63506,11 @@ const docTemplate = `{
                     "type": "string"
                 },
                 "tradeamount": {
-                    "description": "日成交金额(当日单方向成交金额)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "tradeqty": {
-                    "description": "日成交数量(当日单方向成交数量)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "wrstandardid": {
@@ -63707,7 +63679,7 @@ const docTemplate = `{
                     "type": "number"
                 },
                 "unpaidinterest": {
-                    "description": "未结费用",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "updatetime": {
@@ -64343,7 +64315,7 @@ const docTemplate = `{
                     "type": "string"
                 },
                 "orderprice": {
-                    "description": "委托价格",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "orderqty": {
@@ -67641,19 +67613,11 @@ const docTemplate = `{
             "properties": {
                 "organizationInfo": {
                     "description": "签署企业信息,用户类型为企业时必填",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/tencent.OrganizationInfo"
-                        }
-                    ]
+                    "$ref": "#/definitions/tencent.OrganizationInfo"
                 },
                 "personInfo": {
                     "description": "签署人信息,用户类型为个人时必填",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/tencent.PersonInfo"
-                        }
-                    ]
+                    "$ref": "#/definitions/tencent.PersonInfo"
                 },
                 "userESignRecordID": {
                     "description": "用户电子签记录表ID 只有当前状态是1和4的电子签记录才能发起合同签署",
@@ -67823,11 +67787,7 @@ const docTemplate = `{
                 },
                 "loginAccount": {
                     "description": "登录账号",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.Loginaccount"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.Loginaccount"
                 },
                 "markets": {
                     "description": "市场",
@@ -67845,19 +67805,11 @@ const docTemplate = `{
                 },
                 "userAccount": {
                     "description": "用户账号",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.Useraccount"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.Useraccount"
                 },
                 "userInfo": {
                     "description": "用户信息",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.Userinfo"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.Userinfo"
                 },
                 "username": {
                     "description": "用户姓名",

+ 119 - 167
docs/swagger.json

@@ -24720,11 +24720,7 @@
                 },
                 "fillData": {
                     "description": "单行文本、多行文本、日期、身份证类型参数填充。",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/asign.APIFillData"
-                        }
-                    ]
+                    "$ref": "#/definitions/asign.APIFillData"
                 },
                 "tableDatas": {
                     "description": "表格填充数据",
@@ -24768,19 +24764,11 @@
             "properties": {
                 "company": {
                     "description": "企业法人银行卡四要素,实体类型为企业时必填",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/asign.CompanyBankCard4"
-                        }
-                    ]
+                    "$ref": "#/definitions/asign.CompanyBankCard4"
                 },
                 "person": {
                     "description": "个人银行卡四要素,实体类型为个人时必填",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/asign.PersonBankCard4"
-                        }
-                    ]
+                    "$ref": "#/definitions/asign.PersonBankCard4"
                 },
                 "type": {
                     "description": "实体类型 1:个人 2:企业",
@@ -25284,11 +25272,7 @@
                 },
                 "province": {
                     "description": "省",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.Division"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.Division"
                 }
             }
         },
@@ -26690,7 +26674,7 @@
             "type": "object",
             "properties": {
                 "amount": {
-                    "description": "点价金额=(点价价格+升贴水)*点价数量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "applyid": {
@@ -27274,7 +27258,7 @@
                     "type": "integer"
                 },
                 "deductamount": {
-                    "description": "退款(非必填)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "deliverygoodscode": {
@@ -27314,7 +27298,7 @@
                     "type": "integer"
                 },
                 "payamount": {
-                    "description": "收付款(非必填)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "pricemove": {
@@ -27481,11 +27465,7 @@
                 },
                 "mg": {
                     "description": "套保品种基本信息",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.ErmcpMiddleGoodsModel"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.ErmcpMiddleGoodsModel"
                 },
                 "wrcList": {
                     "description": "现货品种列表(现货商品折算配置)",
@@ -28082,31 +28062,31 @@
                     "type": "number"
                 },
                 "diffArbitrageQty": {
-                    "description": "套利变动量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "diffExposoureQty": {
-                    "description": "变动量(套保敞口)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "diffFutuQty": {
-                    "description": "变动量(期货总量) 平安:保值净持仓量今日变动",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "diffHedgeQty": {
-                    "description": "套保变动量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "diffQty": {
-                    "description": "变动量(总敞口) 平安:净敞口今日变动",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "diffSpotHedgeQty": {
-                    "description": "变动量(现货应套保总量) 平安:应套保量今日变动",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "diffSpotQty": {
-                    "description": "变动量(现货总量) = 现货数量 - 期初现货数量 平安:采销定价净值今日变动",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "enumdicname": {
@@ -29721,11 +29701,7 @@
                 },
                 "ouruser": {
                     "description": "我方账号",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/erms3.CustomerInfo"
-                        }
-                    ]
+                    "$ref": "#/definitions/erms3.CustomerInfo"
                 },
                 "warehouseinfos": {
                     "description": "仓库信息列表",
@@ -30060,11 +30036,7 @@
                 },
                 "province": {
                     "description": "省",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.Division"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.Division"
                 }
             }
         },
@@ -32110,7 +32082,7 @@
                     "type": "number"
                 },
                 "curaverageprice": {
-                    "description": "期均价",
+                    "description": "期均价",
                     "type": "number"
                 },
                 "curbuyamount": {
@@ -32122,7 +32094,7 @@
                     "type": "number"
                 },
                 "curmarketvalue": {
-                    "description": "参考市值(期末市值)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "curqty": {
@@ -32146,7 +32118,7 @@
                     "type": "number"
                 },
                 "curspotprice": {
-                    "description": "参考市价(最新价)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "cycletime": {
@@ -32178,7 +32150,7 @@
                     "type": "string"
                 },
                 "floatpl": {
-                    "description": "浮动损益",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "goodsunitid": {
@@ -32226,7 +32198,7 @@
                     "type": "number"
                 },
                 "todaybuyaverageprice": {
-                    "description": "今日采购均价",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "todaybuyqty": {
@@ -32246,7 +32218,7 @@
                     "type": "number"
                 },
                 "todaysellaverageprice": {
-                    "description": "今日销售均价",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "todaysellqty": {
@@ -35178,7 +35150,7 @@
                     "type": "integer"
                 },
                 "convertratio": {
-                    "description": "折算系数",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "cycletime": {
@@ -35202,11 +35174,11 @@
                     "type": "string"
                 },
                 "diffprice": {
-                    "description": "现期价格差 = 今日点价登记均价(基价) - 今日期货成交均价",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "diffqty": {
-                    "description": "期现数量差 = 套保计划量 - 今日期货关联成交量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "enddate": {
@@ -35214,7 +35186,7 @@
                     "type": "string"
                 },
                 "hedgeplanqty": {
-                    "description": "套保计划量 = TodayPricedQty * 折算系数 * (1/(1+增值税率)) * 套保比例",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "matchname": {
@@ -35238,31 +35210,31 @@
                     "type": "string"
                 },
                 "middlegoodspricedqty": {
-                    "description": "已定价量(套保品种 - 税前) = PricedQty * 折算系数",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "middlegoodspricedqty2": {
-                    "description": "已定价量(套保品种- 税后) = MiddleGoodsPricedQty * (1/(1+增值税率))",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "middlegoodspricedqty3": {
-                    "description": "已定价量(套保品种应套保量) = MiddleGoodsPricedQty2 *  套保比率",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "needhedgeratio": {
-                    "description": "套保系数",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "pricedamount": {
-                    "description": "已定价额(现货)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "pricedamount2": {
-                    "description": "已定价额(现货-基价额)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "pricedqty": {
-                    "description": "已定价量(现货)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "reckondate": {
@@ -35270,11 +35242,11 @@
                     "type": "string"
                 },
                 "relatedmiddlegoodsamount": {
-                    "description": "已关联额(期货)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "relatedmiddlegoodsqty": {
-                    "description": "已关联量(套保品种)(期货)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "spotcontractid": {
@@ -35282,39 +35254,39 @@
                     "type": "string"
                 },
                 "todayavgfutuprice": {
-                    "description": "今日期货成交均价 = TodayRelatedMiddleGoodsAmount /todayrelatedfutureqty",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "todayavgprice": {
-                    "description": "今日定价均价 = TodayPricedAmount / TodayPricedQty",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "todayavgprice2": {
-                    "description": "今日点价登记均价(基价) = TodayPricedAmount2 / TodayPricedQty",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "todaypricedamount": {
-                    "description": "今日定价额(现货)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "todaypricedamount2": {
-                    "description": "今日定价额(现货-基价额)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "todaypricedqty": {
-                    "description": "今日定价量(现货)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "todayrelatedfutureqty": {
-                    "description": "今日关联量(期货)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "todayrelatedmiddlegoodsamount": {
-                    "description": "今日关联额(期货)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "todayrelatedmiddlegoodsqty": {
-                    "description": "今日关联量(套保品-期货)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "updatetime": {
@@ -35326,7 +35298,7 @@
                     "type": "integer"
                 },
                 "vatrate": {
-                    "description": "增值税率",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "wrstandardcode": {
@@ -35875,7 +35847,7 @@
                     "type": "number"
                 },
                 "closeavgprice": {
-                    "description": "平仓均价",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "closepl": {
@@ -35943,7 +35915,7 @@
                     "type": "number"
                 },
                 "holdqty": {
-                    "description": "期末持仓量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "lastholdamount": {
@@ -35975,7 +35947,7 @@
                     "type": "number"
                 },
                 "openavgprice": {
-                    "description": "开仓均价",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "oriholdamount": {
@@ -35983,7 +35955,7 @@
                     "type": "number"
                 },
                 "oriholdqty": {
-                    "description": "期初持仓量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "oriopenamount": {
@@ -36027,7 +35999,7 @@
                     "type": "number"
                 },
                 "todaycloseqty": {
-                    "description": "今平仓量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "todaygoodsgroupspotqty": {
@@ -36043,7 +36015,7 @@
                     "type": "number"
                 },
                 "todayopenqty": {
-                    "description": "今开仓量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "userid": {
@@ -37797,11 +37769,7 @@
             "properties": {
                 "menu": {
                     "description": "父级菜单",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.ErmcpRoleMenu"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.ErmcpRoleMenu"
                 },
                 "subMenu": {
                     "description": "子级菜单",
@@ -38107,11 +38075,7 @@
             "properties": {
                 "mainAcc": {
                     "description": "主账号",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.ErmcpTaAccountM"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.ErmcpTaAccountM"
                 },
                 "subacclist": {
                     "description": "子账号列表",
@@ -40281,11 +40245,7 @@
             "properties": {
                 "riskRatioType": {
                     "description": "风险率类型表",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.Riskratiotype"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.Riskratiotype"
                 },
                 "todayAccountMargins": {
                     "description": "今日账户保证金表",
@@ -54074,11 +54034,7 @@
                 },
                 "tHDetailEx": {
                     "description": "交易持仓扩展表记录",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.TradeHolderDetailEx"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.TradeHolderDetailEx"
                 },
                 "thumurls": {
                     "description": "缩略图片(1:1)(逗号分隔)",
@@ -56118,11 +56074,7 @@
             "properties": {
                 "goodsinfo": {
                     "description": "商品信息",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.THJWrstandardDetail_GoodsInfo"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.THJWrstandardDetail_GoodsInfo"
                 },
                 "spotgoodspricelogs": {
                     "description": "历史价格走势",
@@ -56256,11 +56208,7 @@
                 },
                 "goodsinfo": {
                     "description": "商品信息",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.THJPurchaseTradeDetail_Goodsinfo"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.THJPurchaseTradeDetail_Goodsinfo"
                 },
                 "spotgoodspricelogs": {
                     "description": "历史价格走势",
@@ -56557,11 +56505,7 @@
                 },
                 "goodsinfo": {
                     "description": "商品信息",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.THJWrstandardDetail_GoodsInfo"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.THJWrstandardDetail_GoodsInfo"
                 },
                 "presaleapplydeposits": {
                     "description": "支付方式",
@@ -58000,11 +57944,7 @@
                 },
                 "infoc": {
                     "description": "配置参数",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/pb.GoodsMarginCfgStruct"
-                        }
-                    ]
+                    "$ref": "#/definitions/pb.GoodsMarginCfgStruct"
                 },
                 "marketid": {
                     "description": "市场ID",
@@ -58036,7 +57976,7 @@
                     "type": "string"
                 },
                 "orderprice": {
-                    "description": "委托价格",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "orderqty": {
@@ -58105,7 +58045,7 @@
                     "type": "integer"
                 },
                 "qty": {
-                    "description": "转让数量(数量)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "tradeid": {
@@ -58576,7 +58516,7 @@
                     "type": "integer"
                 },
                 "freezeqty": {
-                    "description": "冻结数量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "goodscode": {
@@ -58612,7 +58552,7 @@
                     "type": "number"
                 },
                 "holderqty": {
-                    "description": "持仓数量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "isconfirmexercise": {
@@ -58636,7 +58576,7 @@
                     "type": "number"
                 },
                 "openqty": {
-                    "description": "建仓数量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "optiontype": {
@@ -58720,6 +58660,14 @@
         "models.TradeHolderDetailEx": {
             "type": "object",
             "properties": {
+                "TPFlag": {
+                    "description": "止盈标识:0-未设置 1-设置",
+                    "type": "integer"
+                },
+                "TPRatio": {
+                    "description": "止盈比例",
+                    "type": "number"
+                },
                 "accountID": {
                     "description": "账号ID",
                     "type": "integer"
@@ -58856,6 +58804,30 @@
                     "description": "补充定金",
                     "type": "number"
                 },
+                "sLFlag": {
+                    "description": "止损标识:0-未设置 1-设置",
+                    "type": "integer"
+                },
+                "sLLossValue": {
+                    "description": "止损亏损值(负) = 占用*止损比例*-1",
+                    "type": "number"
+                },
+                "sLPrice": {
+                    "description": "止损价格",
+                    "type": "number"
+                },
+                "sLRatio": {
+                    "description": "止损比例",
+                    "type": "number"
+                },
+                "tPPrice": {
+                    "description": "止盈价格",
+                    "type": "number"
+                },
+                "tPProfitValue": {
+                    "description": "止盈盈利(正) = 占用*止盈比例",
+                    "type": "number"
+                },
                 "tradeAmount": {
                     "description": "成交金额",
                     "type": "number"
@@ -60307,7 +60279,7 @@
                     "type": "string"
                 },
                 "fixedprice": {
-                    "description": "挂牌价格",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "handlestatus": {
@@ -60315,7 +60287,7 @@
                     "type": "integer"
                 },
                 "marginvalue": {
-                    "description": "履约保证金比例",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "marketid": {
@@ -60497,7 +60469,7 @@
             "type": "object",
             "properties": {
                 "averageprice": {
-                    "description": "成交均价",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "tradedate": {
@@ -60755,7 +60727,7 @@
                     "type": "integer"
                 },
                 "averageprice": {
-                    "description": "交割均价 = 交割金额 / 交割数量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "begindate": {
@@ -60879,7 +60851,7 @@
                     "type": "number"
                 },
                 "xgoodsamount": {
-                    "description": "合约金额 = 货款金额(DELIVERYAMOUNT) - 点价货款(P1GOODSREMAINAMOUNT)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "xgoodscode": {
@@ -61767,7 +61739,7 @@
                     "type": "string"
                 },
                 "stepvalue": {
-                    "description": "步骤值",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "templateid": {
@@ -62078,7 +62050,7 @@
                     "type": "integer"
                 },
                 "amount": {
-                    "description": "挂牌金额 = 委托数量 * 固定价或升贴水",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "bannerpicurl": {
@@ -62138,11 +62110,11 @@
                     "type": "number"
                 },
                 "freezecharge": {
-                    "description": "冻结手续费",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "freezemargin": {
-                    "description": "冻结保证金(保证金)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "futupricemove": {
@@ -62178,7 +62150,7 @@
                     "type": "string"
                 },
                 "marginvalue": {
-                    "description": "保证金设置值(履约保证金)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "marketid": {
@@ -62420,7 +62392,7 @@
                     "type": "integer"
                 },
                 "delistminqty": {
-                    "description": "起摘数量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "deliverymonth": {
@@ -62841,7 +62813,7 @@
                     "type": "string"
                 },
                 "unpaidamount": {
-                    "description": "剩余款(待支付金额)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "userid": {
@@ -63388,7 +63360,7 @@
                     "type": "integer"
                 },
                 "delistminqty": {
-                    "description": "起摘数量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "deliverygoodscode": {
@@ -63525,11 +63497,11 @@
                     "type": "string"
                 },
                 "tradeamount": {
-                    "description": "日成交金额(当日单方向成交金额)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "tradeqty": {
-                    "description": "日成交数量(当日单方向成交数量)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "wrstandardid": {
@@ -63698,7 +63670,7 @@
                     "type": "number"
                 },
                 "unpaidinterest": {
-                    "description": "未结费用",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "updatetime": {
@@ -64334,7 +64306,7 @@
                     "type": "string"
                 },
                 "orderprice": {
-                    "description": "委托价格",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "orderqty": {
@@ -67632,19 +67604,11 @@
             "properties": {
                 "organizationInfo": {
                     "description": "签署企业信息,用户类型为企业时必填",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/tencent.OrganizationInfo"
-                        }
-                    ]
+                    "$ref": "#/definitions/tencent.OrganizationInfo"
                 },
                 "personInfo": {
                     "description": "签署人信息,用户类型为个人时必填",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/tencent.PersonInfo"
-                        }
-                    ]
+                    "$ref": "#/definitions/tencent.PersonInfo"
                 },
                 "userESignRecordID": {
                     "description": "用户电子签记录表ID 只有当前状态是1和4的电子签记录才能发起合同签署",
@@ -67814,11 +67778,7 @@
                 },
                 "loginAccount": {
                     "description": "登录账号",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.Loginaccount"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.Loginaccount"
                 },
                 "markets": {
                     "description": "市场",
@@ -67836,19 +67796,11 @@
                 },
                 "userAccount": {
                     "description": "用户账号",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.Useraccount"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.Useraccount"
                 },
                 "userInfo": {
                     "description": "用户信息",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.Userinfo"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.Userinfo"
                 },
                 "username": {
                     "description": "用户姓名",

+ 111 - 107
docs/swagger.yaml

@@ -333,8 +333,7 @@ definitions:
         description: 合同编号(此处可传已完成签署的合同编号,实现追加签章的场景)
         type: string
       fillData:
-        allOf:
-        - $ref: '#/definitions/asign.APIFillData'
+        $ref: '#/definitions/asign.APIFillData'
         description: 单行文本、多行文本、日期、身份证类型参数填充。
       tableDatas:
         description: 表格填充数据
@@ -364,12 +363,10 @@ definitions:
   asign.BankCard4Req:
     properties:
       company:
-        allOf:
-        - $ref: '#/definitions/asign.CompanyBankCard4'
+        $ref: '#/definitions/asign.CompanyBankCard4'
         description: 企业法人银行卡四要素,实体类型为企业时必填
       person:
-        allOf:
-        - $ref: '#/definitions/asign.PersonBankCard4'
+        $ref: '#/definitions/asign.PersonBankCard4'
         description: 个人银行卡四要素,实体类型为个人时必填
       type:
         description: 实体类型 1:个人 2:企业
@@ -735,8 +732,7 @@ definitions:
           $ref: '#/definitions/models.Division'
         type: array
       province:
-        allOf:
-        - $ref: '#/definitions/models.Division'
+        $ref: '#/definitions/models.Division'
         description: 省
     type: object
   common.QueryTableDefineRsp:
@@ -1784,7 +1780,7 @@ definitions:
   ermcp.QryBusinessDjRsp:
     properties:
       amount:
-        description: 点价金额=(点价价格+升贴水)*点价数量
+        description: 期初均价
         type: number
       applyid:
         description: 申请人
@@ -2219,7 +2215,7 @@ definitions:
         description: 现货合同类型 - 1:采购 -1:销售
         type: integer
       deductamount:
-        description: 退款(非必填)
+        description: 期初均价
         type: number
       deliverygoodscode:
         description: 现货品种代码
@@ -2249,7 +2245,7 @@ definitions:
         description: 操作申请类型 - 1:点价 2:结算登记 3:款项登记 4:发票登记
         type: integer
       payamount:
-        description: 收付款(非必填)
+        description: 期初均价
         type: number
       pricemove:
         description: 升贴水
@@ -2371,8 +2367,7 @@ definitions:
           $ref: '#/definitions/models.ErmcpGGConvertCfg'
         type: array
       mg:
-        allOf:
-        - $ref: '#/definitions/models.ErmcpMiddleGoodsModel'
+        $ref: '#/definitions/models.ErmcpMiddleGoodsModel'
         description: 套保品种基本信息
       wrcList:
         description: 现货品种列表(现货商品折算配置)
@@ -2817,25 +2812,25 @@ definitions:
         description: 套利量
         type: number
       diffArbitrageQty:
-        description: 套利变动量
+        description: 期初均价
         type: number
       diffExposoureQty:
-        description: 变动量(套保敞口)
+        description: 期初均价
         type: number
       diffFutuQty:
-        description: 变动量(期货总量) 平安:保值净持仓量今日变动
+        description: 期初均价
         type: number
       diffHedgeQty:
-        description: 套保变动量
+        description: 期初均价
         type: number
       diffQty:
-        description: 变动量(总敞口) 平安:净敞口今日变动
+        description: 期初均价
         type: number
       diffSpotHedgeQty:
-        description: 变动量(现货应套保总量) 平安:应套保量今日变动
+        description: 期初均价
         type: number
       diffSpotQty:
-        description: 变动量(现货总量) = 现货数量 - 期初现货数量 平安:采销定价净值今日变动
+        description: 期初均价
         type: number
       enumdicname:
         description: 单位名称
@@ -4037,8 +4032,7 @@ definitions:
           $ref: '#/definitions/erms3.CustomerInfo'
         type: array
       ouruser:
-        allOf:
-        - $ref: '#/definitions/erms3.CustomerInfo'
+        $ref: '#/definitions/erms3.CustomerInfo'
         description: 我方账号
       warehouseinfos:
         description: 仓库信息列表
@@ -4283,8 +4277,7 @@ definitions:
           $ref: '#/definitions/models.Division'
         type: array
       province:
-        allOf:
-        - $ref: '#/definitions/models.Division'
+        $ref: '#/definitions/models.Division'
         description: 省
     type: object
   models.Arearole:
@@ -5799,7 +5792,7 @@ definitions:
         description: 期末额
         type: number
       curaverageprice:
-        description: 期均价
+        description: 期均价
         type: number
       curbuyamount:
         description: 期末采购总额
@@ -5808,7 +5801,7 @@ definitions:
         description: 期末采购总量
         type: number
       curmarketvalue:
-        description: 参考市值(期末市值)
+        description: 期初均价
         type: number
       curqty:
         description: 期末量
@@ -5826,7 +5819,7 @@ definitions:
         description: 期末销售总量
         type: number
       curspotprice:
-        description: 参考市价(最新价)
+        description: 期初均价
         type: number
       cycletime:
         description: 周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】
@@ -5850,7 +5843,7 @@ definitions:
         description: 现货品种单位名称(作废)
         type: string
       floatpl:
-        description: 浮动损益
+        description: 期初均价
         type: number
       goodsunitid:
         description: 现货品种单位id(作废)
@@ -5886,7 +5879,7 @@ definitions:
         description: 今日采购额(今采购额)
         type: number
       todaybuyaverageprice:
-        description: 今日采购均价
+        description: 期初均价
         type: number
       todaybuyqty:
         description: 今日采购量(今采购量)
@@ -5901,7 +5894,7 @@ definitions:
         description: 今日销售额(今销售额)
         type: number
       todaysellaverageprice:
-        description: 今日销售均价
+        description: 期初均价
         type: number
       todaysellqty:
         description: 今日销售量(今销售量)
@@ -8081,7 +8074,7 @@ definitions:
         description: 合同类型 1:采购 -1:销售
         type: integer
       convertratio:
-        description: 折算系数
+        description: 期初均价
         type: number
       cycletime:
         description: 周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】
@@ -8099,16 +8092,16 @@ definitions:
         description: 品种名称
         type: string
       diffprice:
-        description: 现期价格差 = 今日点价登记均价(基价) - 今日期货成交均价
+        description: 期初均价
         type: number
       diffqty:
-        description: 期现数量差 = 套保计划量 - 今日期货关联成交量
+        description: 期初均价
         type: number
       enddate:
         description: 结束交易日
         type: string
       hedgeplanqty:
-        description: 套保计划量 = TodayPricedQty * 折算系数 * (1/(1+增值税率)) * 套保比例
+        description: 期初均价
         type: number
       matchname:
         description: 交易对手方(个人:用户名称 企业:简称)
@@ -8126,64 +8119,64 @@ definitions:
         description: 套保品种名称
         type: string
       middlegoodspricedqty:
-        description: 已定价量(套保品种 - 税前) = PricedQty * 折算系数
+        description: 期初均价
         type: number
       middlegoodspricedqty2:
-        description: 已定价量(套保品种- 税后) = MiddleGoodsPricedQty * (1/(1+增值税率))
+        description: 期初均价
         type: number
       middlegoodspricedqty3:
-        description: 已定价量(套保品种应套保量) = MiddleGoodsPricedQty2 *  套保比率
+        description: 期初均价
         type: number
       needhedgeratio:
-        description: 套保系数
+        description: 期初均价
         type: number
       pricedamount:
-        description: 已定价额(现货)
+        description: 期初均价
         type: number
       pricedamount2:
-        description: 已定价额(现货-基价额)
+        description: 期初均价
         type: number
       pricedqty:
-        description: 已定价量(现货)
+        description: 期初均价
         type: number
       reckondate:
         description: 日照时期(yyyyMMdd)
         type: string
       relatedmiddlegoodsamount:
-        description: 已关联额(期货)
+        description: 期初均价
         type: number
       relatedmiddlegoodsqty:
-        description: 已关联量(套保品种)(期货)
+        description: 期初均价
         type: number
       spotcontractid:
         description: 现货合同ID(602+Unix秒时间戳(10位)+xxxxxx)
         type: string
       todayavgfutuprice:
-        description: 今日期货成交均价 = TodayRelatedMiddleGoodsAmount /todayrelatedfutureqty
+        description: 期初均价
         type: number
       todayavgprice:
-        description: 今日定价均价 = TodayPricedAmount / TodayPricedQty
+        description: 期初均价
         type: number
       todayavgprice2:
-        description: 今日点价登记均价(基价) = TodayPricedAmount2 / TodayPricedQty
+        description: 期初均价
         type: number
       todaypricedamount:
-        description: 今日定价额(现货)
+        description: 期初均价
         type: number
       todaypricedamount2:
-        description: 今日定价额(现货-基价额)
+        description: 期初均价
         type: number
       todaypricedqty:
-        description: 今日定价量(现货)
+        description: 期初均价
         type: number
       todayrelatedfutureqty:
-        description: 今日关联量(期货)
+        description: 期初均价
         type: number
       todayrelatedmiddlegoodsamount:
-        description: 今日关联额(期货)
+        description: 期初均价
         type: number
       todayrelatedmiddlegoodsqty:
-        description: 今日关联量(套保品-期货)
+        description: 期初均价
         type: number
       updatetime:
         description: 更新时间
@@ -8192,7 +8185,7 @@ definitions:
         description: 合同所属用户id
         type: integer
       vatrate:
-        description: 增值税率
+        description: 期初均价
         type: number
       wrstandardcode:
         description: 商品(品类) 代码
@@ -8600,7 +8593,7 @@ definitions:
         description: 手续费
         type: number
       closeavgprice:
-        description: 平仓均价
+        description: 期初均价
         type: number
       closepl:
         description: 平仓损益
@@ -8651,7 +8644,7 @@ definitions:
         description: 期末持仓额
         type: number
       holdqty:
-        description: 期末持仓量
+        description: 期初均价
         type: number
       lastholdamount:
         description: 当前持仓额
@@ -8675,13 +8668,13 @@ definitions:
         description: 期末开仓额
         type: number
       openavgprice:
-        description: 开仓均价
+        description: 期初均价
         type: number
       oriholdamount:
         description: 期初持仓额
         type: number
       oriholdqty:
-        description: 期初持仓量
+        description: 期初均价
         type: number
       oriopenamount:
         description: 期初开仓额
@@ -8714,7 +8707,7 @@ definitions:
         description: 今平仓额
         type: number
       todaycloseqty:
-        description: 今平仓量
+        description: 期初均价
         type: number
       todaygoodsgroupspotqty:
         description: 交易品种变化量 (=(期末持仓量 - 期初持仓量)* 合约乘数)
@@ -8726,7 +8719,7 @@ definitions:
         description: 今开仓额
         type: number
       todayopenqty:
-        description: 今开仓量
+        description: 期初均价
         type: number
       userid:
         description: 账户所属用户ID
@@ -10001,8 +9994,7 @@ definitions:
   models.ErmcpRoleMenuEx:
     properties:
       menu:
-        allOf:
-        - $ref: '#/definitions/models.ErmcpRoleMenu'
+        $ref: '#/definitions/models.ErmcpRoleMenu'
         description: 父级菜单
       subMenu:
         description: 子级菜单
@@ -10229,8 +10221,7 @@ definitions:
   models.ErmcpTaAccountEx:
     properties:
       mainAcc:
-        allOf:
-        - $ref: '#/definitions/models.ErmcpTaAccountM'
+        $ref: '#/definitions/models.ErmcpTaAccountM'
         description: 主账号
       subacclist:
         description: 子账号列表
@@ -11831,8 +11822,7 @@ definitions:
   models.GetTodayAccountConfigInfoRsp:
     properties:
       riskRatioType:
-        allOf:
-        - $ref: '#/definitions/models.Riskratiotype'
+        $ref: '#/definitions/models.Riskratiotype'
         description: 风险率类型表
       todayAccountMargins:
         description: 今日账户保证金表
@@ -22096,8 +22086,7 @@ definitions:
         description: 可退定金
         type: number
       tHDetailEx:
-        allOf:
-        - $ref: '#/definitions/models.TradeHolderDetailEx'
+        $ref: '#/definitions/models.TradeHolderDetailEx'
         description: 交易持仓扩展表记录
       thumurls:
         description: 缩略图片(1:1)(逗号分隔)
@@ -23605,8 +23594,7 @@ definitions:
   models.THJGoodsDetailRsp:
     properties:
       goodsinfo:
-        allOf:
-        - $ref: '#/definitions/models.THJWrstandardDetail_GoodsInfo'
+        $ref: '#/definitions/models.THJWrstandardDetail_GoodsInfo'
         description: 商品信息
       spotgoodspricelogs:
         description: 历史价格走势
@@ -23763,8 +23751,7 @@ definitions:
           $ref: '#/definitions/models.THJPurchaseTradeDetail_Date'
         type: array
       goodsinfo:
-        allOf:
-        - $ref: '#/definitions/models.THJPurchaseTradeDetail_Goodsinfo'
+        $ref: '#/definitions/models.THJPurchaseTradeDetail_Goodsinfo'
         description: 商品信息
       spotgoodspricelogs:
         description: 历史价格走势
@@ -23943,8 +23930,7 @@ definitions:
           $ref: '#/definitions/models.THJDeliveryMonth'
         type: array
       goodsinfo:
-        allOf:
-        - $ref: '#/definitions/models.THJWrstandardDetail_GoodsInfo'
+        $ref: '#/definitions/models.THJWrstandardDetail_GoodsInfo'
         description: 商品信息
       presaleapplydeposits:
         description: 支付方式
@@ -24991,8 +24977,7 @@ definitions:
         description: 商品ID
         type: integer
       infoc:
-        allOf:
-        - $ref: '#/definitions/pb.GoodsMarginCfgStruct'
+        $ref: '#/definitions/pb.GoodsMarginCfgStruct'
         description: 配置参数
       marketid:
         description: 市场ID
@@ -25016,7 +25001,7 @@ definitions:
         description: 委托单号
         type: string
       orderprice:
-        description: 委托价格
+        description: 期初均价
         type: number
       orderqty:
         description: 委托数量
@@ -25067,7 +25052,7 @@ definitions:
         description: 市场ID
         type: integer
       qty:
-        description: 转让数量(数量)
+        description: 期初均价
         type: number
       tradeid:
         description: 成交单号(关联持仓)
@@ -25417,7 +25402,7 @@ definitions:
         description: 行权日类型 - 1:滚动行权 2:固定日行权
         type: integer
       freezeqty:
-        description: 冻结数量
+        description: 期初均价
         type: number
       goodscode:
         description: 商品代码
@@ -25444,7 +25429,7 @@ definitions:
         description: 持仓价格
         type: number
       holderqty:
-        description: 持仓数量
+        description: 期初均价
         type: number
       isconfirmexercise:
         description: 是否确认行权- 0:否 1:是
@@ -25462,7 +25447,7 @@ definitions:
         description: 建仓价格
         type: number
       openqty:
-        description: 建仓数量
+        description: 期初均价
         type: number
       optiontype:
         description: 期权类型 - 1:认购(看涨) 2:认沽(看跌)
@@ -25525,6 +25510,12 @@ definitions:
     type: object
   models.TradeHolderDetailEx:
     properties:
+      TPFlag:
+        description: 止盈标识:0-未设置 1-设置
+        type: integer
+      TPRatio:
+        description: 止盈比例
+        type: number
       accountID:
         description: 账号ID
         type: integer
@@ -25627,6 +25618,24 @@ definitions:
       restockDeposit:
         description: 补充定金
         type: number
+      sLFlag:
+        description: 止损标识:0-未设置 1-设置
+        type: integer
+      sLLossValue:
+        description: 止损亏损值(负) = 占用*止损比例*-1
+        type: number
+      sLPrice:
+        description: 止损价格
+        type: number
+      sLRatio:
+        description: 止损比例
+        type: number
+      tPPrice:
+        description: 止盈价格
+        type: number
+      tPProfitValue:
+        description: 止盈盈利(正) = 占用*止盈比例
+        type: number
       tradeAmount:
         description: 成交金额
         type: number
@@ -26706,13 +26715,13 @@ definitions:
         description: 单位名称
         type: string
       fixedprice:
-        description: 挂牌价格
+        description: 期初均价
         type: number
       handlestatus:
         description: 处理状态
         type: integer
       marginvalue:
-        description: 履约保证金比例
+        description: 期初均价
         type: number
       marketid:
         description: 市场ID
@@ -26847,7 +26856,7 @@ definitions:
   models.WrAverageTradePrice:
     properties:
       averageprice:
-        description: 成交均价
+        description: 期初均价
         type: number
       tradedate:
         description: 交易日yyyymm
@@ -27035,7 +27044,7 @@ definitions:
         description: 账号ID
         type: integer
       averageprice:
-        description: 交割均价 = 交割金额 / 交割数量
+        description: 期初均价
         type: number
       begindate:
         description: 开始交易日(yyyymmdd)
@@ -27128,7 +27137,7 @@ definitions:
         description: 交易合约交割价
         type: number
       xgoodsamount:
-        description: 合约金额 = 货款金额(DELIVERYAMOUNT) - 点价货款(P1GOODSREMAINAMOUNT)
+        description: 期初均价
         type: number
       xgoodscode:
         description: 商品代码
@@ -27787,7 +27796,7 @@ definitions:
         description: 步骤名称
         type: string
       stepvalue:
-        description: 步骤值
+        description: 期初均价
         type: number
       templateid:
         description: 履约计划模板ID
@@ -28022,7 +28031,7 @@ definitions:
         description: 是否全好友可见 - 0:否 1:是
         type: integer
       amount:
-        description: 挂牌金额 = 委托数量 * 固定价或升贴水
+        description: 期初均价
         type: number
       bannerpicurl:
         description: Banner图
@@ -28067,10 +28076,10 @@ definitions:
         description: 固定价格    -   [挂牌]
         type: number
       freezecharge:
-        description: 冻结手续费
+        description: 期初均价
         type: number
       freezemargin:
-        description: 冻结保证金(保证金)
+        description: 期初均价
         type: number
       futupricemove:
         description: 期货升贴水
@@ -28097,7 +28106,7 @@ definitions:
         description: 提单ID(208+Unix秒时间戳(10位)+xxxxxx)
         type: string
       marginvalue:
-        description: 保证金设置值(履约保证金)
+        description: 期初均价
         type: number
       marketid:
         description: 市场ID
@@ -28278,7 +28287,7 @@ definitions:
         description: 买卖 - 0:买 1:卖
         type: integer
       delistminqty:
-        description: 起摘数量
+        description: 期初均价
         type: number
       deliverymonth:
         description: 交收月
@@ -28596,7 +28605,7 @@ definitions:
         description: 履约类型 名称
         type: string
       unpaidamount:
-        description: 剩余款(待支付金额)
+        description: 期初均价
         type: number
       userid:
         description: 用户id
@@ -29008,7 +29017,7 @@ definitions:
         description: 是否允许部份摘牌 - 0:不允许 1:允许
         type: integer
       delistminqty:
-        description: 起摘数量
+        description: 期初均价
         type: number
       deliverygoodscode:
         description: 品种代码
@@ -29110,10 +29119,10 @@ definitions:
         description: 日期 格式 yyyymmdd
         type: string
       tradeamount:
-        description: 日成交金额(当日单方向成交金额)
+        description: 期初均价
         type: number
       tradeqty:
-        description: 日成交数量(当日单方向成交数量)
+        description: 期初均价
         type: number
       wrstandardid:
         description: 现货商品ID
@@ -29240,7 +29249,7 @@ definitions:
         description: 已计利息 -> 已计费用
         type: number
       unpaidinterest:
-        description: 未结费用
+        description: 期初均价
         type: number
       updatetime:
         description: 更新时间
@@ -29709,7 +29718,7 @@ definitions:
         description: 委托单号
         type: string
       orderprice:
-        description: 委托价格
+        description: 期初均价
         type: number
       orderqty:
         description: 委托数量
@@ -32203,12 +32212,10 @@ definitions:
   tencent.CreateFlowByTemplateDirectlyReq:
     properties:
       organizationInfo:
-        allOf:
-        - $ref: '#/definitions/tencent.OrganizationInfo'
+        $ref: '#/definitions/tencent.OrganizationInfo'
         description: 签署企业信息,用户类型为企业时必填
       personInfo:
-        allOf:
-        - $ref: '#/definitions/tencent.PersonInfo'
+        $ref: '#/definitions/tencent.PersonInfo'
         description: 签署人信息,用户类型为个人时必填
       userESignRecordID:
         description: 用户电子签记录表ID 只有当前状态是1和4的电子签记录才能发起合同签署
@@ -32332,8 +32339,7 @@ definitions:
           $ref: '#/definitions/models.Goodsgroup'
         type: array
       loginAccount:
-        allOf:
-        - $ref: '#/definitions/models.Loginaccount'
+        $ref: '#/definitions/models.Loginaccount'
         description: 登录账号
       markets:
         description: 市场
@@ -32346,12 +32352,10 @@ definitions:
           $ref: '#/definitions/models.Systemparam'
         type: array
       userAccount:
-        allOf:
-        - $ref: '#/definitions/models.Useraccount'
+        $ref: '#/definitions/models.Useraccount'
         description: 用户账号
       userInfo:
-        allOf:
-        - $ref: '#/definitions/models.Userinfo'
+        $ref: '#/definitions/models.Userinfo'
         description: 用户信息
       username:
         description: 用户姓名

+ 16 - 0
models/sbyj.go

@@ -131,6 +131,14 @@ type TradeHolderDetailEx struct {
 	AddDepositRate       float64 `json:"adddepositrate"`       // 自动追加定金率(52) - 允许时显示
 	CanAutoRefundDeposit uint64  `json:"canautorefunddeposit"` // 是否允许自动退还定金: 0-否 1-是(52)
 	ClosedDays           int64   `json:"closeddays"`           // 剩余平仓天数(52) -1为不强平
+	TPFlag               uint64  `json:"TPFlag"`               // 止盈标识:0-未设置 1-设置
+	TPRatio              float64 `json:"TPRatio"`              // 止盈比例
+	TPProfitValue        float64 `json:"tPProfitValue"`        // 止盈盈利(正) = 占用*止盈比例
+	TPPrice              float64 `json:"tPPrice"`              // 止盈价格
+	SLFlag               uint64  `json:"sLFlag"`               // 止损标识:0-未设置 1-设置
+	SLRatio              float64 `json:"sLRatio"`              // 止损比例
+	SLLossValue          float64 `json:"sLLossValue"`          // 止损亏损值(负) = 占用*止损比例*-1
+	SLPrice              float64 `json:"sLPrice"`              // 止损价格
 }
 
 // RedisTradeHolderDetailEx redis存储交易持仓扩展表
@@ -260,6 +268,14 @@ func (r *RedisTradeHolderDetailEx) ParseFromProto(p *pb.RedisTradeHolderDetailEx
 		AddDepositRate:       p.GetTHDetailEx().GetAddDepositRate(),
 		CanAutoRefundDeposit: p.GetTHDetailEx().GetCanAutoRefundDeposit(),
 		ClosedDays:           p.GetTHDetailEx().GetClosedDays(),
+		TPFlag:               p.GetTHDetailEx().GetTPFlag(),
+		TPRatio:              p.GetTHDetailEx().GetTPRatio(),
+		TPProfitValue:        p.GetTHDetailEx().GetTPProfitValue(),
+		TPPrice:              p.GetTHDetailEx().GetTPPrice(),
+		SLFlag:               p.GetTHDetailEx().GetSLFlag(),
+		SLRatio:              p.GetTHDetailEx().GetSLRatio(),
+		SLLossValue:          p.GetTHDetailEx().GetSLLossValue(),
+		SLPrice:              p.GetTHDetailEx().GetSLPrice(),
 	}
 
 	// 单位

+ 80 - 2
pb/mtp2.pb.go

@@ -2104,6 +2104,14 @@ type TradeHolderDetailEx struct {
 	AddDepositRate       *float64 `protobuf:"fixed64,39,opt,name=AddDepositRate" json:"AddDepositRate,omitempty"`            // 自动追加定金率(52) - 允许时显示
 	CanAutoRefundDeposit *uint64  `protobuf:"varint,40,opt,name=CanAutoRefundDeposit" json:"CanAutoRefundDeposit,omitempty"` // 是否允许自动退还定金: 0-否 1-是(52)
 	ClosedDays           *int64   `protobuf:"varint,41,opt,name=ClosedDays" json:"ClosedDays,omitempty"`                     // 剩余平仓天数(52) -1为不强平
+	TPFlag               *uint64  `protobuf:"varint,42,opt,name=TPFlag" json:"TPFlag,omitempty"`                             // 止盈标识:0-未设置 1-设置
+	TPRatio              *float64 `protobuf:"fixed64,43,opt,name=TPRatio" json:"TPRatio,omitempty"`                          // 止盈比例
+	TPProfitValue        *float64 `protobuf:"fixed64,44,opt,name=TPProfitValue" json:"TPProfitValue,omitempty"`              // 止盈盈利(正) = 占用*止盈比例
+	TPPrice              *float64 `protobuf:"fixed64,45,opt,name=TPPrice" json:"TPPrice,omitempty"`                          // 止盈价格
+	SLFlag               *uint64  `protobuf:"varint,46,opt,name=SLFlag" json:"SLFlag,omitempty"`                             // 止损标识:0-未设置 1-设置
+	SLRatio              *float64 `protobuf:"fixed64,47,opt,name=SLRatio" json:"SLRatio,omitempty"`                          // 止损比例
+	SLLossValue          *float64 `protobuf:"fixed64,48,opt,name=SLLossValue" json:"SLLossValue,omitempty"`                  // 止损亏损值(负) = 占用*止损比例*-1
+	SLPrice              *float64 `protobuf:"fixed64,49,opt,name=SLPrice" json:"SLPrice,omitempty"`                          // 止损价格
 }
 
 func (x *TradeHolderDetailEx) Reset() {
@@ -2425,6 +2433,62 @@ func (x *TradeHolderDetailEx) GetClosedDays() int64 {
 	return 0
 }
 
+func (x *TradeHolderDetailEx) GetTPFlag() uint64 {
+	if x != nil && x.TPFlag != nil {
+		return *x.TPFlag
+	}
+	return 0
+}
+
+func (x *TradeHolderDetailEx) GetTPRatio() float64 {
+	if x != nil && x.TPRatio != nil {
+		return *x.TPRatio
+	}
+	return 0
+}
+
+func (x *TradeHolderDetailEx) GetTPProfitValue() float64 {
+	if x != nil && x.TPProfitValue != nil {
+		return *x.TPProfitValue
+	}
+	return 0
+}
+
+func (x *TradeHolderDetailEx) GetTPPrice() float64 {
+	if x != nil && x.TPPrice != nil {
+		return *x.TPPrice
+	}
+	return 0
+}
+
+func (x *TradeHolderDetailEx) GetSLFlag() uint64 {
+	if x != nil && x.SLFlag != nil {
+		return *x.SLFlag
+	}
+	return 0
+}
+
+func (x *TradeHolderDetailEx) GetSLRatio() float64 {
+	if x != nil && x.SLRatio != nil {
+		return *x.SLRatio
+	}
+	return 0
+}
+
+func (x *TradeHolderDetailEx) GetSLLossValue() float64 {
+	if x != nil && x.SLLossValue != nil {
+		return *x.SLLossValue
+	}
+	return 0
+}
+
+func (x *TradeHolderDetailEx) GetSLPrice() float64 {
+	if x != nil && x.SLPrice != nil {
+		return *x.SLPrice
+	}
+	return 0
+}
+
 // RedisTradeHolderDetailEx redis存储交易持仓扩展表
 type RedisTradeHolderDetailEx struct {
 	state         protoimpl.MessageState
@@ -3099,7 +3163,7 @@ var file_mtp2_proto_rawDesc = []byte{
 	0x61, 0x6d, 0x65, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x4d, 0x69, 0x64, 0x64, 0x6c,
 	0x65, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x47, 0x6f,
 	0x6f, 0x64, 0x73, 0x55, 0x6e, 0x69, 0x74, 0x49, 0x44, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0d, 0x52,
-	0x0b, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x55, 0x6e, 0x69, 0x74, 0x49, 0x44, 0x22, 0x99, 0x0b, 0x0a,
+	0x0b, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x55, 0x6e, 0x69, 0x74, 0x49, 0x44, 0x22, 0xf9, 0x0c, 0x0a,
 	0x13, 0x54, 0x72, 0x61, 0x64, 0x65, 0x48, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61,
 	0x69, 0x6c, 0x45, 0x78, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x72, 0x61, 0x64, 0x65, 0x49, 0x44, 0x18,
 	0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x54, 0x72, 0x61, 0x64, 0x65, 0x49, 0x44, 0x12, 0x1c,
@@ -3189,7 +3253,21 @@ var file_mtp2_proto_rawDesc = []byte{
 	0x28, 0x04, 0x52, 0x14, 0x43, 0x61, 0x6e, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x66, 0x75, 0x6e,
 	0x64, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x43, 0x6c, 0x6f, 0x73,
 	0x65, 0x64, 0x44, 0x61, 0x79, 0x73, 0x18, 0x29, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x43, 0x6c,
-	0x6f, 0x73, 0x65, 0x64, 0x44, 0x61, 0x79, 0x73, 0x22, 0x81, 0x03, 0x0a, 0x18, 0x52, 0x65, 0x64,
+	0x6f, 0x73, 0x65, 0x64, 0x44, 0x61, 0x79, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x54, 0x50, 0x46, 0x6c,
+	0x61, 0x67, 0x18, 0x2a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x54, 0x50, 0x46, 0x6c, 0x61, 0x67,
+	0x12, 0x18, 0x0a, 0x07, 0x54, 0x50, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x2b, 0x20, 0x01, 0x28,
+	0x01, 0x52, 0x07, 0x54, 0x50, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x24, 0x0a, 0x0d, 0x54, 0x50,
+	0x50, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x2c, 0x20, 0x01, 0x28,
+	0x01, 0x52, 0x0d, 0x54, 0x50, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65,
+	0x12, 0x18, 0x0a, 0x07, 0x54, 0x50, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x2d, 0x20, 0x01, 0x28,
+	0x01, 0x52, 0x07, 0x54, 0x50, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x4c,
+	0x46, 0x6c, 0x61, 0x67, 0x18, 0x2e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x53, 0x4c, 0x46, 0x6c,
+	0x61, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x53, 0x4c, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x2f, 0x20,
+	0x01, 0x28, 0x01, 0x52, 0x07, 0x53, 0x4c, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x20, 0x0a, 0x0b,
+	0x53, 0x4c, 0x4c, 0x6f, 0x73, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x30, 0x20, 0x01, 0x28,
+	0x01, 0x52, 0x0b, 0x53, 0x4c, 0x4c, 0x6f, 0x73, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x18,
+	0x0a, 0x07, 0x53, 0x4c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x31, 0x20, 0x01, 0x28, 0x01, 0x52,
+	0x07, 0x53, 0x4c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x22, 0x81, 0x03, 0x0a, 0x18, 0x52, 0x65, 0x64,
 	0x69, 0x73, 0x54, 0x72, 0x61, 0x64, 0x65, 0x48, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x44, 0x65, 0x74,
 	0x61, 0x69, 0x6c, 0x45, 0x78, 0x12, 0x37, 0x0a, 0x0a, 0x54, 0x48, 0x44, 0x65, 0x74, 0x61, 0x69,
 	0x6c, 0x45, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x54,

+ 8 - 1
pb/mtp2.proto

@@ -304,7 +304,14 @@ message TradeHolderDetailEx
   optional double AddDepositRate = 39;    // 自动追加定金率(52) - 允许时显示
   optional uint64 CanAutoRefundDeposit = 40;    // 是否允许自动退还定金: 0-否 1-是(52)
   optional int64 ClosedDays = 41;    // 剩余平仓天数(52) -1为不强平
-  
+  optional uint64 TPFlag = 42;    // 止盈标识:0-未设置 1-设置
+  optional double TPRatio = 43;    // 止盈比例
+  optional double TPProfitValue = 44;    // 止盈盈利(正) = 占用*止盈比例
+  optional double TPPrice = 45;    // 止盈价格
+  optional uint64 SLFlag = 46;    // 止损标识:0-未设置 1-设置
+  optional double SLRatio = 47;    // 止损比例
+  optional double SLLossValue = 48;    // 止损亏损值(负) = 占用*止损比例*-1
+  optional double SLPrice = 49;    // 止损价格
 }
 
 // RedisTradeHolderDetailEx redis存储交易持仓扩展表