Kaynağa Gözat

增加接口:
/Hnsh/QueryPresaleGoods [get] 查询定金预售商品

zhou.xiaoning 2 yıl önce
ebeveyn
işleme
3eacec0f1d

+ 0 - 8
.gitignore

@@ -1,11 +1,3 @@
-/*
- * @Author: deng.yinping deng.yinping@muchinfo.cn
- * @Date: 2022-11-22 09:48:31
- * @LastEditors: deng.yinping deng.yinping@muchinfo.cn
- * @LastEditTime: 2022-11-25 17:17:00
- * @FilePath: \MTP20_IF\.gitignore
- * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
- */
 __debug_bin
 .vscode/launch.json
 /log

+ 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]

+ 25 - 0
controllers/hnsh/hnsh.go

@@ -0,0 +1,25 @@
+package hnsh
+
+import (
+	"mtp2_if/global/app"
+	"mtp2_if/models"
+
+	"github.com/gin-gonic/gin"
+)
+
+// QueryTHJFriends
+// @Summary  查询定金预售商品
+// @Produce  json
+// @Security ApiKeyAuth
+// @Param    page     query    int false "页码"
+// @Param    pagesize query    int false "每页条数"
+// @Success  200      {array}  models.PresaleGoods
+// @Failure  500      {object} app.Response
+// @Router   /Hnsh/QueryPresaleGoods [get]
+// @Tags     华南石化
+func QueryPresaleGoods(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	m := models.PresaleGoods{}
+	a.DoBindReq(&m)
+	a.DoGetDataByPage(&m)
+}

+ 1 - 1
controllers/wrTrade2/qryWrTrade.go

@@ -32,7 +32,7 @@ import (
 // @Param       wrstandardid    query    int    false "品类id"
 // @Param       brandid         query    int    false "品牌id(dgfactoryitemid)"
 // @Param       yearsid         query    int    false "年份id(dgfactoryitemid)"
-// @Param       wrfactortypeid  query    string    false "仓单要素id"
+// @Param       wrfactortypeid  query    string false "仓单要素id"
 // @Param       deliverymonth   query    string false "交收月(yyyy-mm) 仓单预售填写"
 // @Success     200             {array}  models.WrOrderQuote
 // @Failure     500             {object} app.Response

+ 272 - 132
docs/docs.go

@@ -12632,6 +12632,53 @@ const docTemplate = `{
                 }
             }
         },
+        "/Hnsh/QueryPresaleGoods": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "铁合金"
+                ],
+                "summary": "查询定金预售商品",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "页码",
+                        "name": "page",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "每页条数",
+                        "name": "pagesize",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.PresaleGoods"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Market/GetAllExExchanges": {
             "get": {
                 "security": [
@@ -20414,11 +20461,7 @@ const docTemplate = `{
                 },
                 "province": {
                     "description": "省",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.Division"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.Division"
                 }
             }
         },
@@ -21820,7 +21863,7 @@ const docTemplate = `{
             "type": "object",
             "properties": {
                 "amount": {
-                    "description": "点价金额=(点价价格+升贴水)*点价数量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "applyid": {
@@ -22404,7 +22447,7 @@ const docTemplate = `{
                     "type": "integer"
                 },
                 "deductamount": {
-                    "description": "退款(非必填)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "deliverygoodscode": {
@@ -22444,7 +22487,7 @@ const docTemplate = `{
                     "type": "integer"
                 },
                 "payamount": {
-                    "description": "收付款(非必填)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "pricemove": {
@@ -22611,11 +22654,7 @@ const docTemplate = `{
                 },
                 "mg": {
                     "description": "套保品种基本信息",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.ErmcpMiddleGoodsModel"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.ErmcpMiddleGoodsModel"
                 },
                 "wrcList": {
                     "description": "现货品种列表(现货商品折算配置)",
@@ -23212,31 +23251,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": {
@@ -24851,11 +24890,7 @@ const docTemplate = `{
                 },
                 "ouruser": {
                     "description": "我方账号",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/erms3.CustomerInfo"
-                        }
-                    ]
+                    "$ref": "#/definitions/erms3.CustomerInfo"
                 },
                 "warehouseinfos": {
                     "description": "仓库信息列表",
@@ -25190,11 +25225,7 @@ const docTemplate = `{
                 },
                 "province": {
                     "description": "省",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.Division"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.Division"
                 }
             }
         },
@@ -27028,7 +27059,7 @@ const docTemplate = `{
                     "type": "number"
                 },
                 "curaverageprice": {
-                    "description": "期均价",
+                    "description": "期均价",
                     "type": "number"
                 },
                 "curbuyamount": {
@@ -27040,7 +27071,7 @@ const docTemplate = `{
                     "type": "number"
                 },
                 "curmarketvalue": {
-                    "description": "参考市值(期末市值)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "curqty": {
@@ -27064,7 +27095,7 @@ const docTemplate = `{
                     "type": "number"
                 },
                 "curspotprice": {
-                    "description": "参考市价(最新价)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "cycletime": {
@@ -27096,7 +27127,7 @@ const docTemplate = `{
                     "type": "string"
                 },
                 "floatpl": {
-                    "description": "浮动损益",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "goodsunitid": {
@@ -27144,7 +27175,7 @@ const docTemplate = `{
                     "type": "number"
                 },
                 "todaybuyaverageprice": {
-                    "description": "今日采购均价",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "todaybuyqty": {
@@ -27164,7 +27195,7 @@ const docTemplate = `{
                     "type": "number"
                 },
                 "todaysellaverageprice": {
-                    "description": "今日销售均价",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "todaysellqty": {
@@ -30096,7 +30127,7 @@ const docTemplate = `{
                     "type": "integer"
                 },
                 "convertratio": {
-                    "description": "折算系数",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "cycletime": {
@@ -30120,11 +30151,11 @@ const docTemplate = `{
                     "type": "string"
                 },
                 "diffprice": {
-                    "description": "现期价格差 = 今日点价登记均价(基价) - 今日期货成交均价",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "diffqty": {
-                    "description": "期现数量差 = 套保计划量 - 今日期货关联成交量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "enddate": {
@@ -30132,7 +30163,7 @@ const docTemplate = `{
                     "type": "string"
                 },
                 "hedgeplanqty": {
-                    "description": "套保计划量 = TodayPricedQty * 折算系数 * (1/(1+增值税率)) * 套保比例",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "matchname": {
@@ -30156,31 +30187,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": {
@@ -30188,11 +30219,11 @@ const docTemplate = `{
                     "type": "string"
                 },
                 "relatedmiddlegoodsamount": {
-                    "description": "已关联额(期货)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "relatedmiddlegoodsqty": {
-                    "description": "已关联量(套保品种)(期货)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "spotcontractid": {
@@ -30200,39 +30231,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": {
@@ -30244,7 +30275,7 @@ const docTemplate = `{
                     "type": "integer"
                 },
                 "vatrate": {
-                    "description": "增值税率",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "wrstandardcode": {
@@ -30793,7 +30824,7 @@ const docTemplate = `{
                     "type": "number"
                 },
                 "closeavgprice": {
-                    "description": "平仓均价",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "closepl": {
@@ -30861,7 +30892,7 @@ const docTemplate = `{
                     "type": "number"
                 },
                 "holdqty": {
-                    "description": "期末持仓量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "lastholdamount": {
@@ -30893,7 +30924,7 @@ const docTemplate = `{
                     "type": "number"
                 },
                 "openavgprice": {
-                    "description": "开仓均价",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "oriholdamount": {
@@ -30901,7 +30932,7 @@ const docTemplate = `{
                     "type": "number"
                 },
                 "oriholdqty": {
-                    "description": "期初持仓量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "oriopenamount": {
@@ -30945,7 +30976,7 @@ const docTemplate = `{
                     "type": "number"
                 },
                 "todaycloseqty": {
-                    "description": "今平仓量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "todaygoodsgroupspotqty": {
@@ -30961,7 +30992,7 @@ const docTemplate = `{
                     "type": "number"
                 },
                 "todayopenqty": {
-                    "description": "今开仓量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "userid": {
@@ -32627,11 +32658,7 @@ const docTemplate = `{
             "properties": {
                 "menu": {
                     "description": "父级菜单",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.ErmcpRoleMenu"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.ErmcpRoleMenu"
                 },
                 "subMenu": {
                     "description": "子级菜单",
@@ -32937,11 +32964,7 @@ const docTemplate = `{
             "properties": {
                 "mainAcc": {
                     "description": "主账号",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.ErmcpTaAccountM"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.ErmcpTaAccountM"
                 },
                 "subacclist": {
                     "description": "子账号列表",
@@ -40333,6 +40356,151 @@ const docTemplate = `{
                 }
             }
         },
+        "models.PresaleGoods": {
+            "type": "object",
+            "properties": {
+                "accountid": {
+                    "description": "卖方账户ID",
+                    "type": "integer"
+                },
+                "applyid": {
+                    "description": "关联申请ID",
+                    "type": "integer"
+                },
+                "attachmenturl": {
+                    "description": "缩略图片(1:1)",
+                    "type": "string"
+                },
+                "bannerpicurl": {
+                    "description": "Banner图(逗号分隔)(2:1)",
+                    "type": "string"
+                },
+                "buymaxqty": {
+                    "description": "购买上限 [71] - 0为不限",
+                    "type": "integer"
+                },
+                "createtime": {
+                    "description": "创建时间",
+                    "type": "string"
+                },
+                "endtime": {
+                    "description": "预售结束时间",
+                    "type": "string"
+                },
+                "floorprice": {
+                    "description": "底价[大宗式竞拍]",
+                    "type": "number"
+                },
+                "goodscode": {
+                    "description": "期货合约代码(内部)",
+                    "type": "string"
+                },
+                "goodsdetail": {
+                    "description": "详情[大宗]",
+                    "type": "string"
+                },
+                "goodsid": {
+                    "description": "商品ID",
+                    "type": "integer"
+                },
+                "goodsname": {
+                    "description": "期货合约名称",
+                    "type": "string"
+                },
+                "marketid": {
+                    "description": "预售市场ID - 根据预售模式选择市场",
+                    "type": "integer"
+                },
+                "pictureurls": {
+                    "description": "详情图片(逗号分隔)(宽:1125)",
+                    "type": "string"
+                },
+                "presaledamount": {
+                    "description": "已预售总金额(预售结束时更新)71-委托时更新",
+                    "type": "number"
+                },
+                "presaledepositalgorithm": {
+                    "description": "预售定金方式(48) - 1:比率  2:固定",
+                    "type": "integer"
+                },
+                "presaledepositvalue": {
+                    "description": "预售定金设置值(48)",
+                    "type": "number"
+                },
+                "presaledqty": {
+                    "description": "已预售量(预售结束时更新) 71-委托时更新",
+                    "type": "integer"
+                },
+                "presalemode": {
+                    "description": "预售模式 - 1:一口价 2:大宗式竞拍 3:挂牌预售(HSBY)",
+                    "type": "integer"
+                },
+                "presalemodestr": {
+                    "description": "预售模式",
+                    "type": "string"
+                },
+                "presaleprice": {
+                    "description": "发售价(49)",
+                    "type": "number"
+                },
+                "presaleqty": {
+                    "description": "预售数量",
+                    "type": "integer"
+                },
+                "presalestatus": {
+                    "description": "预售状态 - 1:未开始 2:预售中 3:已结束",
+                    "type": "integer"
+                },
+                "provideruserid": {
+                    "description": "发售方用户ID(49)",
+                    "type": "integer"
+                },
+                "refprice": {
+                    "description": "参考价格[一口价]",
+                    "type": "number"
+                },
+                "relatedgoodsid": {
+                    "description": "关联交易合约ID",
+                    "type": "integer"
+                },
+                "relatedmarketid": {
+                    "description": "关联交易合约市场ID",
+                    "type": "integer"
+                },
+                "sellname": {
+                    "description": "发售方",
+                    "type": "string"
+                },
+                "sellstatus": {
+                    "description": "卖方处理状态 - 1:卖方头寸未处理 2:卖方头寸已处理",
+                    "type": "integer"
+                },
+                "startprice": {
+                    "description": "起拍价[大宗式竞拍]",
+                    "type": "number"
+                },
+                "starttime": {
+                    "description": "预售开始时间",
+                    "type": "string"
+                },
+                "tradedate": {
+                    "description": "交易日(yyyyMMdd)",
+                    "type": "string"
+                },
+                "tradeprice": {
+                    "description": "成交价[大宗]",
+                    "type": "number"
+                },
+                "transferdepositratio": {
+                    "description": "转让定金比例(49)",
+                    "type": "number"
+                },
+                "userid": {
+                    "description": "卖方用户ID",
+                    "type": "integer"
+                }
+            }
+        },
         "models.PromotionIncome": {
             "type": "object",
             "properties": {
@@ -45926,11 +46094,7 @@ const docTemplate = `{
             "properties": {
                 "goodsinfo": {
                     "description": "商品信息",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.THJWrstandardDetail_GoodsInfo"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.THJWrstandardDetail_GoodsInfo"
                 },
                 "spotgoodspricelogs": {
                     "description": "历史价格走势",
@@ -46064,11 +46228,7 @@ const docTemplate = `{
                 },
                 "goodsinfo": {
                     "description": "商品信息",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.THJPurchaseTradeDetail_Goodsinfo"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.THJPurchaseTradeDetail_Goodsinfo"
                 },
                 "spotgoodspricelogs": {
                     "description": "历史价格走势",
@@ -46365,11 +46525,7 @@ const docTemplate = `{
                 },
                 "goodsinfo": {
                     "description": "商品信息",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.THJWrstandardDetail_GoodsInfo"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.THJWrstandardDetail_GoodsInfo"
                 },
                 "presaleapplydeposits": {
                     "description": "支付方式",
@@ -47726,11 +47882,7 @@ const docTemplate = `{
                 },
                 "infoc": {
                     "description": "配置参数",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/pb.GoodsMarginCfgStruct"
-                        }
-                    ]
+                    "$ref": "#/definitions/pb.GoodsMarginCfgStruct"
                 },
                 "marketid": {
                     "description": "市场ID",
@@ -47758,7 +47910,7 @@ const docTemplate = `{
                     "type": "string"
                 },
                 "orderprice": {
-                    "description": "委托价格",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "orderqty": {
@@ -47827,7 +47979,7 @@ const docTemplate = `{
                     "type": "integer"
                 },
                 "qty": {
-                    "description": "转让数量(数量)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "tradeid": {
@@ -47888,7 +48040,7 @@ const docTemplate = `{
                     "type": "integer"
                 },
                 "freezeqty": {
-                    "description": "冻结数量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "goodscode": {
@@ -47924,7 +48076,7 @@ const docTemplate = `{
                     "type": "number"
                 },
                 "holderqty": {
-                    "description": "持仓数量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "isconfirmexercise": {
@@ -47948,7 +48100,7 @@ const docTemplate = `{
                     "type": "number"
                 },
                 "openqty": {
-                    "description": "建仓数量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "optiontype": {
@@ -49030,7 +49182,7 @@ const docTemplate = `{
                     "type": "string"
                 },
                 "fixedprice": {
-                    "description": "挂牌价格",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "handlestatus": {
@@ -49038,7 +49190,7 @@ const docTemplate = `{
                     "type": "integer"
                 },
                 "marginvalue": {
-                    "description": "履约保证金比例",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "marketid": {
@@ -49220,7 +49372,7 @@ const docTemplate = `{
             "type": "object",
             "properties": {
                 "averageprice": {
-                    "description": "成交均价",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "tradedate": {
@@ -49478,7 +49630,7 @@ const docTemplate = `{
                     "type": "integer"
                 },
                 "averageprice": {
-                    "description": "交割均价 = 交割金额 / 交割数量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "begindate": {
@@ -49594,7 +49746,7 @@ const docTemplate = `{
                     "type": "number"
                 },
                 "xgoodsamount": {
-                    "description": "合约金额 = 货款金额(DELIVERYAMOUNT) - 点价货款(P1GOODSREMAINAMOUNT)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "xgoodscode": {
@@ -50474,7 +50626,7 @@ const docTemplate = `{
                     "type": "string"
                 },
                 "stepvalue": {
-                    "description": "步骤值",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "templateid": {
@@ -50785,7 +50937,7 @@ const docTemplate = `{
                     "type": "integer"
                 },
                 "amount": {
-                    "description": "挂牌金额 = 委托数量 * 固定价或升贴水",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "bannerpicurl": {
@@ -50845,11 +50997,11 @@ const docTemplate = `{
                     "type": "number"
                 },
                 "freezecharge": {
-                    "description": "冻结手续费",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "freezemargin": {
-                    "description": "冻结保证金(保证金)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "futupricemove": {
@@ -50885,7 +51037,7 @@ const docTemplate = `{
                     "type": "string"
                 },
                 "marginvalue": {
-                    "description": "保证金设置值(履约保证金)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "marketid": {
@@ -51127,7 +51279,7 @@ const docTemplate = `{
                     "type": "integer"
                 },
                 "delistminqty": {
-                    "description": "起摘数量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "deliverymonth": {
@@ -51500,7 +51652,7 @@ const docTemplate = `{
                     "type": "string"
                 },
                 "unpaidamount": {
-                    "description": "剩余款(待支付金额)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "userid": {
@@ -52047,7 +52199,7 @@ const docTemplate = `{
                     "type": "integer"
                 },
                 "delistminqty": {
-                    "description": "起摘数量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "deliverygoodscode": {
@@ -52184,11 +52336,11 @@ const docTemplate = `{
                     "type": "string"
                 },
                 "tradeamount": {
-                    "description": "日成交金额(当日单方向成交金额)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "tradeqty": {
-                    "description": "日成交数量(当日单方向成交数量)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "wrstandardid": {
@@ -52357,7 +52509,7 @@ const docTemplate = `{
                     "type": "number"
                 },
                 "unpaidinterest": {
-                    "description": "未结费用",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "updatetime": {
@@ -52949,7 +53101,7 @@ const docTemplate = `{
                     "type": "string"
                 },
                 "orderprice": {
-                    "description": "委托价格",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "orderqty": {
@@ -56021,11 +56173,7 @@ const docTemplate = `{
                 },
                 "loginAccount": {
                     "description": "登录账号",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.Loginaccount"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.Loginaccount"
                 },
                 "markets": {
                     "description": "市场",
@@ -56043,19 +56191,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": "用户姓名",

+ 272 - 132
docs/swagger.json

@@ -12623,6 +12623,53 @@
                 }
             }
         },
+        "/Hnsh/QueryPresaleGoods": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "铁合金"
+                ],
+                "summary": "查询定金预售商品",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "页码",
+                        "name": "page",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "每页条数",
+                        "name": "pagesize",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.PresaleGoods"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Market/GetAllExExchanges": {
             "get": {
                 "security": [
@@ -20405,11 +20452,7 @@
                 },
                 "province": {
                     "description": "省",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.Division"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.Division"
                 }
             }
         },
@@ -21811,7 +21854,7 @@
             "type": "object",
             "properties": {
                 "amount": {
-                    "description": "点价金额=(点价价格+升贴水)*点价数量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "applyid": {
@@ -22395,7 +22438,7 @@
                     "type": "integer"
                 },
                 "deductamount": {
-                    "description": "退款(非必填)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "deliverygoodscode": {
@@ -22435,7 +22478,7 @@
                     "type": "integer"
                 },
                 "payamount": {
-                    "description": "收付款(非必填)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "pricemove": {
@@ -22602,11 +22645,7 @@
                 },
                 "mg": {
                     "description": "套保品种基本信息",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.ErmcpMiddleGoodsModel"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.ErmcpMiddleGoodsModel"
                 },
                 "wrcList": {
                     "description": "现货品种列表(现货商品折算配置)",
@@ -23203,31 +23242,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": {
@@ -24842,11 +24881,7 @@
                 },
                 "ouruser": {
                     "description": "我方账号",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/erms3.CustomerInfo"
-                        }
-                    ]
+                    "$ref": "#/definitions/erms3.CustomerInfo"
                 },
                 "warehouseinfos": {
                     "description": "仓库信息列表",
@@ -25181,11 +25216,7 @@
                 },
                 "province": {
                     "description": "省",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.Division"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.Division"
                 }
             }
         },
@@ -27019,7 +27050,7 @@
                     "type": "number"
                 },
                 "curaverageprice": {
-                    "description": "期均价",
+                    "description": "期均价",
                     "type": "number"
                 },
                 "curbuyamount": {
@@ -27031,7 +27062,7 @@
                     "type": "number"
                 },
                 "curmarketvalue": {
-                    "description": "参考市值(期末市值)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "curqty": {
@@ -27055,7 +27086,7 @@
                     "type": "number"
                 },
                 "curspotprice": {
-                    "description": "参考市价(最新价)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "cycletime": {
@@ -27087,7 +27118,7 @@
                     "type": "string"
                 },
                 "floatpl": {
-                    "description": "浮动损益",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "goodsunitid": {
@@ -27135,7 +27166,7 @@
                     "type": "number"
                 },
                 "todaybuyaverageprice": {
-                    "description": "今日采购均价",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "todaybuyqty": {
@@ -27155,7 +27186,7 @@
                     "type": "number"
                 },
                 "todaysellaverageprice": {
-                    "description": "今日销售均价",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "todaysellqty": {
@@ -30087,7 +30118,7 @@
                     "type": "integer"
                 },
                 "convertratio": {
-                    "description": "折算系数",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "cycletime": {
@@ -30111,11 +30142,11 @@
                     "type": "string"
                 },
                 "diffprice": {
-                    "description": "现期价格差 = 今日点价登记均价(基价) - 今日期货成交均价",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "diffqty": {
-                    "description": "期现数量差 = 套保计划量 - 今日期货关联成交量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "enddate": {
@@ -30123,7 +30154,7 @@
                     "type": "string"
                 },
                 "hedgeplanqty": {
-                    "description": "套保计划量 = TodayPricedQty * 折算系数 * (1/(1+增值税率)) * 套保比例",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "matchname": {
@@ -30147,31 +30178,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": {
@@ -30179,11 +30210,11 @@
                     "type": "string"
                 },
                 "relatedmiddlegoodsamount": {
-                    "description": "已关联额(期货)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "relatedmiddlegoodsqty": {
-                    "description": "已关联量(套保品种)(期货)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "spotcontractid": {
@@ -30191,39 +30222,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": {
@@ -30235,7 +30266,7 @@
                     "type": "integer"
                 },
                 "vatrate": {
-                    "description": "增值税率",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "wrstandardcode": {
@@ -30784,7 +30815,7 @@
                     "type": "number"
                 },
                 "closeavgprice": {
-                    "description": "平仓均价",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "closepl": {
@@ -30852,7 +30883,7 @@
                     "type": "number"
                 },
                 "holdqty": {
-                    "description": "期末持仓量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "lastholdamount": {
@@ -30884,7 +30915,7 @@
                     "type": "number"
                 },
                 "openavgprice": {
-                    "description": "开仓均价",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "oriholdamount": {
@@ -30892,7 +30923,7 @@
                     "type": "number"
                 },
                 "oriholdqty": {
-                    "description": "期初持仓量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "oriopenamount": {
@@ -30936,7 +30967,7 @@
                     "type": "number"
                 },
                 "todaycloseqty": {
-                    "description": "今平仓量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "todaygoodsgroupspotqty": {
@@ -30952,7 +30983,7 @@
                     "type": "number"
                 },
                 "todayopenqty": {
-                    "description": "今开仓量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "userid": {
@@ -32618,11 +32649,7 @@
             "properties": {
                 "menu": {
                     "description": "父级菜单",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.ErmcpRoleMenu"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.ErmcpRoleMenu"
                 },
                 "subMenu": {
                     "description": "子级菜单",
@@ -32928,11 +32955,7 @@
             "properties": {
                 "mainAcc": {
                     "description": "主账号",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.ErmcpTaAccountM"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.ErmcpTaAccountM"
                 },
                 "subacclist": {
                     "description": "子账号列表",
@@ -40324,6 +40347,151 @@
                 }
             }
         },
+        "models.PresaleGoods": {
+            "type": "object",
+            "properties": {
+                "accountid": {
+                    "description": "卖方账户ID",
+                    "type": "integer"
+                },
+                "applyid": {
+                    "description": "关联申请ID",
+                    "type": "integer"
+                },
+                "attachmenturl": {
+                    "description": "缩略图片(1:1)",
+                    "type": "string"
+                },
+                "bannerpicurl": {
+                    "description": "Banner图(逗号分隔)(2:1)",
+                    "type": "string"
+                },
+                "buymaxqty": {
+                    "description": "购买上限 [71] - 0为不限",
+                    "type": "integer"
+                },
+                "createtime": {
+                    "description": "创建时间",
+                    "type": "string"
+                },
+                "endtime": {
+                    "description": "预售结束时间",
+                    "type": "string"
+                },
+                "floorprice": {
+                    "description": "底价[大宗式竞拍]",
+                    "type": "number"
+                },
+                "goodscode": {
+                    "description": "期货合约代码(内部)",
+                    "type": "string"
+                },
+                "goodsdetail": {
+                    "description": "详情[大宗]",
+                    "type": "string"
+                },
+                "goodsid": {
+                    "description": "商品ID",
+                    "type": "integer"
+                },
+                "goodsname": {
+                    "description": "期货合约名称",
+                    "type": "string"
+                },
+                "marketid": {
+                    "description": "预售市场ID - 根据预售模式选择市场",
+                    "type": "integer"
+                },
+                "pictureurls": {
+                    "description": "详情图片(逗号分隔)(宽:1125)",
+                    "type": "string"
+                },
+                "presaledamount": {
+                    "description": "已预售总金额(预售结束时更新)71-委托时更新",
+                    "type": "number"
+                },
+                "presaledepositalgorithm": {
+                    "description": "预售定金方式(48) - 1:比率  2:固定",
+                    "type": "integer"
+                },
+                "presaledepositvalue": {
+                    "description": "预售定金设置值(48)",
+                    "type": "number"
+                },
+                "presaledqty": {
+                    "description": "已预售量(预售结束时更新) 71-委托时更新",
+                    "type": "integer"
+                },
+                "presalemode": {
+                    "description": "预售模式 - 1:一口价 2:大宗式竞拍 3:挂牌预售(HSBY)",
+                    "type": "integer"
+                },
+                "presalemodestr": {
+                    "description": "预售模式",
+                    "type": "string"
+                },
+                "presaleprice": {
+                    "description": "发售价(49)",
+                    "type": "number"
+                },
+                "presaleqty": {
+                    "description": "预售数量",
+                    "type": "integer"
+                },
+                "presalestatus": {
+                    "description": "预售状态 - 1:未开始 2:预售中 3:已结束",
+                    "type": "integer"
+                },
+                "provideruserid": {
+                    "description": "发售方用户ID(49)",
+                    "type": "integer"
+                },
+                "refprice": {
+                    "description": "参考价格[一口价]",
+                    "type": "number"
+                },
+                "relatedgoodsid": {
+                    "description": "关联交易合约ID",
+                    "type": "integer"
+                },
+                "relatedmarketid": {
+                    "description": "关联交易合约市场ID",
+                    "type": "integer"
+                },
+                "sellname": {
+                    "description": "发售方",
+                    "type": "string"
+                },
+                "sellstatus": {
+                    "description": "卖方处理状态 - 1:卖方头寸未处理 2:卖方头寸已处理",
+                    "type": "integer"
+                },
+                "startprice": {
+                    "description": "起拍价[大宗式竞拍]",
+                    "type": "number"
+                },
+                "starttime": {
+                    "description": "预售开始时间",
+                    "type": "string"
+                },
+                "tradedate": {
+                    "description": "交易日(yyyyMMdd)",
+                    "type": "string"
+                },
+                "tradeprice": {
+                    "description": "成交价[大宗]",
+                    "type": "number"
+                },
+                "transferdepositratio": {
+                    "description": "转让定金比例(49)",
+                    "type": "number"
+                },
+                "userid": {
+                    "description": "卖方用户ID",
+                    "type": "integer"
+                }
+            }
+        },
         "models.PromotionIncome": {
             "type": "object",
             "properties": {
@@ -45917,11 +46085,7 @@
             "properties": {
                 "goodsinfo": {
                     "description": "商品信息",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.THJWrstandardDetail_GoodsInfo"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.THJWrstandardDetail_GoodsInfo"
                 },
                 "spotgoodspricelogs": {
                     "description": "历史价格走势",
@@ -46055,11 +46219,7 @@
                 },
                 "goodsinfo": {
                     "description": "商品信息",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.THJPurchaseTradeDetail_Goodsinfo"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.THJPurchaseTradeDetail_Goodsinfo"
                 },
                 "spotgoodspricelogs": {
                     "description": "历史价格走势",
@@ -46356,11 +46516,7 @@
                 },
                 "goodsinfo": {
                     "description": "商品信息",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.THJWrstandardDetail_GoodsInfo"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.THJWrstandardDetail_GoodsInfo"
                 },
                 "presaleapplydeposits": {
                     "description": "支付方式",
@@ -47717,11 +47873,7 @@
                 },
                 "infoc": {
                     "description": "配置参数",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/pb.GoodsMarginCfgStruct"
-                        }
-                    ]
+                    "$ref": "#/definitions/pb.GoodsMarginCfgStruct"
                 },
                 "marketid": {
                     "description": "市场ID",
@@ -47749,7 +47901,7 @@
                     "type": "string"
                 },
                 "orderprice": {
-                    "description": "委托价格",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "orderqty": {
@@ -47818,7 +47970,7 @@
                     "type": "integer"
                 },
                 "qty": {
-                    "description": "转让数量(数量)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "tradeid": {
@@ -47879,7 +48031,7 @@
                     "type": "integer"
                 },
                 "freezeqty": {
-                    "description": "冻结数量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "goodscode": {
@@ -47915,7 +48067,7 @@
                     "type": "number"
                 },
                 "holderqty": {
-                    "description": "持仓数量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "isconfirmexercise": {
@@ -47939,7 +48091,7 @@
                     "type": "number"
                 },
                 "openqty": {
-                    "description": "建仓数量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "optiontype": {
@@ -49021,7 +49173,7 @@
                     "type": "string"
                 },
                 "fixedprice": {
-                    "description": "挂牌价格",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "handlestatus": {
@@ -49029,7 +49181,7 @@
                     "type": "integer"
                 },
                 "marginvalue": {
-                    "description": "履约保证金比例",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "marketid": {
@@ -49211,7 +49363,7 @@
             "type": "object",
             "properties": {
                 "averageprice": {
-                    "description": "成交均价",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "tradedate": {
@@ -49469,7 +49621,7 @@
                     "type": "integer"
                 },
                 "averageprice": {
-                    "description": "交割均价 = 交割金额 / 交割数量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "begindate": {
@@ -49585,7 +49737,7 @@
                     "type": "number"
                 },
                 "xgoodsamount": {
-                    "description": "合约金额 = 货款金额(DELIVERYAMOUNT) - 点价货款(P1GOODSREMAINAMOUNT)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "xgoodscode": {
@@ -50465,7 +50617,7 @@
                     "type": "string"
                 },
                 "stepvalue": {
-                    "description": "步骤值",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "templateid": {
@@ -50776,7 +50928,7 @@
                     "type": "integer"
                 },
                 "amount": {
-                    "description": "挂牌金额 = 委托数量 * 固定价或升贴水",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "bannerpicurl": {
@@ -50836,11 +50988,11 @@
                     "type": "number"
                 },
                 "freezecharge": {
-                    "description": "冻结手续费",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "freezemargin": {
-                    "description": "冻结保证金(保证金)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "futupricemove": {
@@ -50876,7 +51028,7 @@
                     "type": "string"
                 },
                 "marginvalue": {
-                    "description": "保证金设置值(履约保证金)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "marketid": {
@@ -51118,7 +51270,7 @@
                     "type": "integer"
                 },
                 "delistminqty": {
-                    "description": "起摘数量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "deliverymonth": {
@@ -51491,7 +51643,7 @@
                     "type": "string"
                 },
                 "unpaidamount": {
-                    "description": "剩余款(待支付金额)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "userid": {
@@ -52038,7 +52190,7 @@
                     "type": "integer"
                 },
                 "delistminqty": {
-                    "description": "起摘数量",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "deliverygoodscode": {
@@ -52175,11 +52327,11 @@
                     "type": "string"
                 },
                 "tradeamount": {
-                    "description": "日成交金额(当日单方向成交金额)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "tradeqty": {
-                    "description": "日成交数量(当日单方向成交数量)",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "wrstandardid": {
@@ -52348,7 +52500,7 @@
                     "type": "number"
                 },
                 "unpaidinterest": {
-                    "description": "未结费用",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "updatetime": {
@@ -52940,7 +53092,7 @@
                     "type": "string"
                 },
                 "orderprice": {
-                    "description": "委托价格",
+                    "description": "期初均价",
                     "type": "number"
                 },
                 "orderqty": {
@@ -56012,11 +56164,7 @@
                 },
                 "loginAccount": {
                     "description": "登录账号",
-                    "allOf": [
-                        {
-                            "$ref": "#/definitions/models.Loginaccount"
-                        }
-                    ]
+                    "$ref": "#/definitions/models.Loginaccount"
                 },
                 "markets": {
                     "description": "市场",
@@ -56034,19 +56182,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": "用户姓名",

+ 217 - 93
docs/swagger.yaml

@@ -226,8 +226,7 @@ definitions:
           $ref: '#/definitions/models.Division'
         type: array
       province:
-        allOf:
-        - $ref: '#/definitions/models.Division'
+        $ref: '#/definitions/models.Division'
         description: 省
     type: object
   common.QueryTableDefineRsp:
@@ -1275,7 +1274,7 @@ definitions:
   ermcp.QryBusinessDjRsp:
     properties:
       amount:
-        description: 点价金额=(点价价格+升贴水)*点价数量
+        description: 期初均价
         type: number
       applyid:
         description: 申请人
@@ -1710,7 +1709,7 @@ definitions:
         description: 现货合同类型 - 1:采购 -1:销售
         type: integer
       deductamount:
-        description: 退款(非必填)
+        description: 期初均价
         type: number
       deliverygoodscode:
         description: 现货品种代码
@@ -1740,7 +1739,7 @@ definitions:
         description: 操作申请类型 - 1:点价 2:结算登记 3:款项登记 4:发票登记
         type: integer
       payamount:
-        description: 收付款(非必填)
+        description: 期初均价
         type: number
       pricemove:
         description: 升贴水
@@ -1862,8 +1861,7 @@ definitions:
           $ref: '#/definitions/models.ErmcpGGConvertCfg'
         type: array
       mg:
-        allOf:
-        - $ref: '#/definitions/models.ErmcpMiddleGoodsModel'
+        $ref: '#/definitions/models.ErmcpMiddleGoodsModel'
         description: 套保品种基本信息
       wrcList:
         description: 现货品种列表(现货商品折算配置)
@@ -2308,25 +2306,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: 单位名称
@@ -3528,8 +3526,7 @@ definitions:
           $ref: '#/definitions/erms3.CustomerInfo'
         type: array
       ouruser:
-        allOf:
-        - $ref: '#/definitions/erms3.CustomerInfo'
+        $ref: '#/definitions/erms3.CustomerInfo'
         description: 我方账号
       warehouseinfos:
         description: 仓库信息列表
@@ -3774,8 +3771,7 @@ definitions:
           $ref: '#/definitions/models.Division'
         type: array
       province:
-        allOf:
-        - $ref: '#/definitions/models.Division'
+        $ref: '#/definitions/models.Division'
         description: 省
     type: object
   models.Arearole:
@@ -5135,7 +5131,7 @@ definitions:
         description: 期末额
         type: number
       curaverageprice:
-        description: 期均价
+        description: 期均价
         type: number
       curbuyamount:
         description: 期末采购总额
@@ -5144,7 +5140,7 @@ definitions:
         description: 期末采购总量
         type: number
       curmarketvalue:
-        description: 参考市值(期末市值)
+        description: 期初均价
         type: number
       curqty:
         description: 期末量
@@ -5162,7 +5158,7 @@ definitions:
         description: 期末销售总量
         type: number
       curspotprice:
-        description: 参考市价(最新价)
+        description: 期初均价
         type: number
       cycletime:
         description: 周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】
@@ -5186,7 +5182,7 @@ definitions:
         description: 现货品种单位名称(作废)
         type: string
       floatpl:
-        description: 浮动损益
+        description: 期初均价
         type: number
       goodsunitid:
         description: 现货品种单位id(作废)
@@ -5222,7 +5218,7 @@ definitions:
         description: 今日采购额(今采购额)
         type: number
       todaybuyaverageprice:
-        description: 今日采购均价
+        description: 期初均价
         type: number
       todaybuyqty:
         description: 今日采购量(今采购量)
@@ -5237,7 +5233,7 @@ definitions:
         description: 今日销售额(今销售额)
         type: number
       todaysellaverageprice:
-        description: 今日销售均价
+        description: 期初均价
         type: number
       todaysellqty:
         description: 今日销售量(今销售量)
@@ -7417,7 +7413,7 @@ definitions:
         description: 合同类型 1:采购 -1:销售
         type: integer
       convertratio:
-        description: 折算系数
+        description: 期初均价
         type: number
       cycletime:
         description: 周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】
@@ -7435,16 +7431,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: 交易对手方(个人:用户名称 企业:简称)
@@ -7462,64 +7458,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: 更新时间
@@ -7528,7 +7524,7 @@ definitions:
         description: 合同所属用户id
         type: integer
       vatrate:
-        description: 增值税率
+        description: 期初均价
         type: number
       wrstandardcode:
         description: 商品(品类) 代码
@@ -7936,7 +7932,7 @@ definitions:
         description: 手续费
         type: number
       closeavgprice:
-        description: 平仓均价
+        description: 期初均价
         type: number
       closepl:
         description: 平仓损益
@@ -7987,7 +7983,7 @@ definitions:
         description: 期末持仓额
         type: number
       holdqty:
-        description: 期末持仓量
+        description: 期初均价
         type: number
       lastholdamount:
         description: 当前持仓额
@@ -8011,13 +8007,13 @@ definitions:
         description: 期末开仓额
         type: number
       openavgprice:
-        description: 开仓均价
+        description: 期初均价
         type: number
       oriholdamount:
         description: 期初持仓额
         type: number
       oriholdqty:
-        description: 期初持仓量
+        description: 期初均价
         type: number
       oriopenamount:
         description: 期初开仓额
@@ -8050,7 +8046,7 @@ definitions:
         description: 今平仓额
         type: number
       todaycloseqty:
-        description: 今平仓量
+        description: 期初均价
         type: number
       todaygoodsgroupspotqty:
         description: 交易品种变化量 (=(期末持仓量 - 期初持仓量)* 合约乘数)
@@ -8062,7 +8058,7 @@ definitions:
         description: 今开仓额
         type: number
       todayopenqty:
-        description: 今开仓量
+        description: 期初均价
         type: number
       userid:
         description: 账户所属用户ID
@@ -9294,8 +9290,7 @@ definitions:
   models.ErmcpRoleMenuEx:
     properties:
       menu:
-        allOf:
-        - $ref: '#/definitions/models.ErmcpRoleMenu'
+        $ref: '#/definitions/models.ErmcpRoleMenu'
         description: 父级菜单
       subMenu:
         description: 子级菜单
@@ -9522,8 +9517,7 @@ definitions:
   models.ErmcpTaAccountEx:
     properties:
       mainAcc:
-        allOf:
-        - $ref: '#/definitions/models.ErmcpTaAccountM'
+        $ref: '#/definitions/models.ErmcpTaAccountM'
         description: 主账号
       subacclist:
         description: 子账号列表
@@ -15012,6 +15006,114 @@ definitions:
         description: 成交交易日(yyyyMMdd)
         type: string
     type: object
+  models.PresaleGoods:
+    properties:
+      accountid:
+        description: 卖方账户ID
+        type: integer
+      applyid:
+        description: 关联申请ID
+        type: integer
+      attachmenturl:
+        description: 缩略图片(1:1)
+        type: string
+      bannerpicurl:
+        description: Banner图(逗号分隔)(2:1)
+        type: string
+      buymaxqty:
+        description: 购买上限 [71] - 0为不限
+        type: integer
+      createtime:
+        description: 创建时间
+        type: string
+      endtime:
+        description: 预售结束时间
+        type: string
+      floorprice:
+        description: 底价[大宗式竞拍]
+        type: number
+      goodscode:
+        description: 期货合约代码(内部)
+        type: string
+      goodsdetail:
+        description: 详情[大宗]
+        type: string
+      goodsid:
+        description: 商品ID
+        type: integer
+      goodsname:
+        description: 期货合约名称
+        type: string
+      marketid:
+        description: 预售市场ID - 根据预售模式选择市场
+        type: integer
+      pictureurls:
+        description: 详情图片(逗号分隔)(宽:1125)
+        type: string
+      presaledamount:
+        description: 已预售总金额(预售结束时更新)71-委托时更新
+        type: number
+      presaledepositalgorithm:
+        description: 预售定金方式(48) - 1:比率  2:固定
+        type: integer
+      presaledepositvalue:
+        description: 预售定金设置值(48)
+        type: number
+      presaledqty:
+        description: 已预售量(预售结束时更新) 71-委托时更新
+        type: integer
+      presalemode:
+        description: 预售模式 - 1:一口价 2:大宗式竞拍 3:挂牌预售(HSBY)
+        type: integer
+      presalemodestr:
+        description: 预售模式
+        type: string
+      presaleprice:
+        description: 发售价(49)
+        type: number
+      presaleqty:
+        description: 预售数量
+        type: integer
+      presalestatus:
+        description: 预售状态 - 1:未开始 2:预售中 3:已结束
+        type: integer
+      provideruserid:
+        description: 发售方用户ID(49)
+        type: integer
+      refprice:
+        description: 参考价格[一口价]
+        type: number
+      relatedgoodsid:
+        description: 关联交易合约ID
+        type: integer
+      relatedmarketid:
+        description: 关联交易合约市场ID
+        type: integer
+      sellname:
+        description: 发售方
+        type: string
+      sellstatus:
+        description: 卖方处理状态 - 1:卖方头寸未处理 2:卖方头寸已处理
+        type: integer
+      startprice:
+        description: 起拍价[大宗式竞拍]
+        type: number
+      starttime:
+        description: 预售开始时间
+        type: string
+      tradedate:
+        description: 交易日(yyyyMMdd)
+        type: string
+      tradeprice:
+        description: 成交价[大宗]
+        type: number
+      transferdepositratio:
+        description: 转让定金比例(49)
+        type: number
+      userid:
+        description: 卖方用户ID
+        type: integer
+    type: object
   models.PromotionIncome:
     properties:
       profitmonth:
@@ -19161,8 +19263,7 @@ definitions:
   models.THJGoodsDetailRsp:
     properties:
       goodsinfo:
-        allOf:
-        - $ref: '#/definitions/models.THJWrstandardDetail_GoodsInfo'
+        $ref: '#/definitions/models.THJWrstandardDetail_GoodsInfo'
         description: 商品信息
       spotgoodspricelogs:
         description: 历史价格走势
@@ -19319,8 +19420,7 @@ definitions:
           $ref: '#/definitions/models.THJPurchaseTradeDetail_Date'
         type: array
       goodsinfo:
-        allOf:
-        - $ref: '#/definitions/models.THJPurchaseTradeDetail_Goodsinfo'
+        $ref: '#/definitions/models.THJPurchaseTradeDetail_Goodsinfo'
         description: 商品信息
       spotgoodspricelogs:
         description: 历史价格走势
@@ -19499,8 +19599,7 @@ definitions:
           $ref: '#/definitions/models.THJDeliveryMonth'
         type: array
       goodsinfo:
-        allOf:
-        - $ref: '#/definitions/models.THJWrstandardDetail_GoodsInfo'
+        $ref: '#/definitions/models.THJWrstandardDetail_GoodsInfo'
         description: 商品信息
       presaleapplydeposits:
         description: 支付方式
@@ -20487,8 +20586,7 @@ definitions:
         description: 商品ID
         type: integer
       infoc:
-        allOf:
-        - $ref: '#/definitions/pb.GoodsMarginCfgStruct'
+        $ref: '#/definitions/pb.GoodsMarginCfgStruct'
         description: 配置参数
       marketid:
         description: 市场ID
@@ -20509,7 +20607,7 @@ definitions:
         description: 委托单号
         type: string
       orderprice:
-        description: 委托价格
+        description: 期初均价
         type: number
       orderqty:
         description: 委托数量
@@ -20560,7 +20658,7 @@ definitions:
         description: 市场ID
         type: integer
       qty:
-        description: 转让数量(数量)
+        description: 期初均价
         type: number
       tradeid:
         description: 成交单号(关联持仓)
@@ -20605,7 +20703,7 @@ definitions:
         description: 行权日类型 - 1:滚动行权 2:固定日行权
         type: integer
       freezeqty:
-        description: 冻结数量
+        description: 期初均价
         type: number
       goodscode:
         description: 商品代码
@@ -20632,7 +20730,7 @@ definitions:
         description: 持仓价格
         type: number
       holderqty:
-        description: 持仓数量
+        description: 期初均价
         type: number
       isconfirmexercise:
         description: 是否确认行权- 0:否 1:是
@@ -20650,7 +20748,7 @@ definitions:
         description: 建仓价格
         type: number
       openqty:
-        description: 建仓数量
+        description: 期初均价
         type: number
       optiontype:
         description: 期权类型 - 1:认购(看涨) 2:认沽(看跌)
@@ -21457,13 +21555,13 @@ definitions:
         description: 单位名称
         type: string
       fixedprice:
-        description: 挂牌价格
+        description: 期初均价
         type: number
       handlestatus:
         description: 处理状态
         type: integer
       marginvalue:
-        description: 履约保证金比例
+        description: 期初均价
         type: number
       marketid:
         description: 市场ID
@@ -21598,7 +21696,7 @@ definitions:
   models.WrAverageTradePrice:
     properties:
       averageprice:
-        description: 成交均价
+        description: 期初均价
         type: number
       tradedate:
         description: 交易日yyyymm
@@ -21786,7 +21884,7 @@ definitions:
         description: 账号ID
         type: integer
       averageprice:
-        description: 交割均价 = 交割金额 / 交割数量
+        description: 期初均价
         type: number
       begindate:
         description: 开始交易日(yyyymmdd)
@@ -21873,7 +21971,7 @@ definitions:
         description: 合约数量
         type: number
       xgoodsamount:
-        description: 合约金额 = 货款金额(DELIVERYAMOUNT) - 点价货款(P1GOODSREMAINAMOUNT)
+        description: 期初均价
         type: number
       xgoodscode:
         description: 商品代码
@@ -22526,7 +22624,7 @@ definitions:
         description: 步骤名称
         type: string
       stepvalue:
-        description: 步骤值
+        description: 期初均价
         type: number
       templateid:
         description: 履约计划模板ID
@@ -22761,7 +22859,7 @@ definitions:
         description: 是否全好友可见 - 0:否 1:是
         type: integer
       amount:
-        description: 挂牌金额 = 委托数量 * 固定价或升贴水
+        description: 期初均价
         type: number
       bannerpicurl:
         description: Banner图
@@ -22806,10 +22904,10 @@ definitions:
         description: 固定价格    -   [挂牌]
         type: number
       freezecharge:
-        description: 冻结手续费
+        description: 期初均价
         type: number
       freezemargin:
-        description: 冻结保证金(保证金)
+        description: 期初均价
         type: number
       futupricemove:
         description: 期货升贴水
@@ -22836,7 +22934,7 @@ definitions:
         description: 提单ID(208+Unix秒时间戳(10位)+xxxxxx)
         type: string
       marginvalue:
-        description: 保证金设置值(履约保证金)
+        description: 期初均价
         type: number
       marketid:
         description: 市场ID
@@ -23017,7 +23115,7 @@ definitions:
         description: 买卖 - 0:买 1:卖
         type: integer
       delistminqty:
-        description: 起摘数量
+        description: 期初均价
         type: number
       deliverymonth:
         description: 交收月
@@ -23297,7 +23395,7 @@ definitions:
         description: 履约类型 名称
         type: string
       unpaidamount:
-        description: 剩余款(待支付金额)
+        description: 期初均价
         type: number
       userid:
         description: 用户id
@@ -23709,7 +23807,7 @@ definitions:
         description: 是否允许部份摘牌 - 0:不允许 1:允许
         type: integer
       delistminqty:
-        description: 起摘数量
+        description: 期初均价
         type: number
       deliverygoodscode:
         description: 品种代码
@@ -23811,10 +23909,10 @@ definitions:
         description: 日期 格式 yyyymmdd
         type: string
       tradeamount:
-        description: 日成交金额(当日单方向成交金额)
+        description: 期初均价
         type: number
       tradeqty:
-        description: 日成交数量(当日单方向成交数量)
+        description: 期初均价
         type: number
       wrstandardid:
         description: 现货商品ID
@@ -23941,7 +24039,7 @@ definitions:
         description: 已计利息 -> 已计费用
         type: number
       unpaidinterest:
-        description: 未结费用
+        description: 期初均价
         type: number
       updatetime:
         description: 更新时间
@@ -24377,7 +24475,7 @@ definitions:
         description: 委托单号
         type: string
       orderprice:
-        description: 委托价格
+        description: 期初均价
         type: number
       orderqty:
         description: 委托数量
@@ -26704,8 +26802,7 @@ definitions:
           $ref: '#/definitions/models.Goodsgroup'
         type: array
       loginAccount:
-        allOf:
-        - $ref: '#/definitions/models.Loginaccount'
+        $ref: '#/definitions/models.Loginaccount'
         description: 登录账号
       markets:
         description: 市场
@@ -26718,12 +26815,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: 用户姓名
@@ -34686,6 +34781,35 @@ paths:
       summary: 设置我的包裹已收货状态
       tags:
       - 定制【海商报业】
+  /Hnsh/QueryPresaleGoods:
+    get:
+      parameters:
+      - description: 页码
+        in: query
+        name: page
+        type: integer
+      - description: 每页条数
+        in: query
+        name: pagesize
+        type: integer
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.PresaleGoods'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      summary: 查询定金预售商品
+      tags:
+      - 铁合金
   /Market/GetAllExExchanges:
     get:
       produces:

+ 104 - 0
models/hnsh.go

@@ -0,0 +1,104 @@
+package models
+
+import (
+	"fmt"
+	"mtp2_if/db"
+	"mtp2_if/utils"
+	"time"
+)
+
+type PresaleGoods struct {
+	GOODSID                 int64     `json:"goodsid" xorm:"GOODSID"`                                 // 商品ID
+	APPLYID                 int64     `json:"applyid" xorm:"APPLYID"`                                 // 关联申请ID
+	USERID                  int64     `json:"userid" xorm:"USERID"`                                   // 卖方用户ID
+	ACCOUNTID               int64     `json:"accountid" xorm:"ACCOUNTID"`                             // 卖方账户ID
+	RELATEDGOODSID          int64     `json:"relatedgoodsid" xorm:"RELATEDGOODSID"`                   // 关联交易合约ID
+	PRESALEQTY              int64     `json:"presaleqty" xorm:"PRESALEQTY"`                           // 预售数量
+	STARTTIME               time.Time `json:"starttime" xorm:"STARTTIME"`                             // 预售开始时间
+	ENDTIME                 time.Time `json:"endtime" xorm:"ENDTIME"`                                 // 预售结束时间
+	ATTACHMENTURL           string    `json:"attachmenturl" xorm:"ATTACHMENTURL"`                     // 缩略图片(1:1)
+	PRESALEMODE             int32     `json:"presalemode" xorm:"PRESALEMODE"`                         // 预售模式 - 1:一口价 2:大宗式竞拍 3:挂牌预售(HSBY)
+	MARKETID                int32     `json:"marketid" xorm:"MARKETID"`                               // 预售市场ID - 根据预售模式选择市场
+	REFPRICE                float64   `json:"refprice" xorm:"REFPRICE"`                               // 参考价格[一口价]
+	STARTPRICE              float64   `json:"startprice" xorm:"STARTPRICE"`                           // 起拍价[大宗式竞拍]
+	FLOORPRICE              float64   `json:"floorprice" xorm:"FLOORPRICE"`                           // 底价[大宗式竞拍]
+	CREATETIME              time.Time `json:"createtime" xorm:"CREATETIME"`                           // 创建时间
+	TRADEDATE               string    `json:"tradedate" xorm:"TRADEDATE"`                             // 交易日(yyyyMMdd)
+	RELATEDMARKETID         int64     `json:"relatedmarketid" xorm:"RELATEDMARKETID"`                 // 关联交易合约市场ID
+	PRESALEDQTY             int64     `json:"presaledqty" xorm:"PRESALEDQTY"`                         // 已预售量(预售结束时更新) 71-委托时更新
+	PRESALEDAMOUNT          float64   `json:"presaledamount" xorm:"PRESALEDAMOUNT"`                   // 已预售总金额(预售结束时更新)71-委托时更新
+	SELLSTATUS              int32     `json:"sellstatus" xorm:"SELLSTATUS"`                           // 卖方处理状态 - 1:卖方头寸未处理 2:卖方头寸已处理
+	GOODSDETAIL             string    `json:"goodsdetail" xorm:"GOODSDETAIL"`                         // 详情[大宗]
+	TRADEPRICE              float64   `json:"tradeprice" xorm:"TRADEPRICE"`                           // 成交价[大宗]
+	BUYMAXQTY               int64     `json:"buymaxqty" xorm:"BUYMAXQTY"`                             // 购买上限 [71] - 0为不限
+	PRESALEDEPOSITALGORITHM int32     `json:"presaledepositalgorithm" xorm:"PRESALEDEPOSITALGORITHM"` // 预售定金方式(48) - 1:比率  2:固定
+	PRESALEDEPOSITVALUE     float64   `json:"presaledepositvalue" xorm:"PRESALEDEPOSITVALUE"`         // 预售定金设置值(48)
+	PRESALESTATUS           int32     `json:"presalestatus" xorm:"PRESALESTATUS"`                     // 预售状态 - 1:未开始 2:预售中 3:已结束
+	PICTUREURLS             string    `json:"pictureurls" xorm:"PICTUREURLS"`                         // 详情图片(逗号分隔)(宽:1125)
+	BANNERPICURL            string    `json:"bannerpicurl" xorm:"BANNERPICURL"`                       // Banner图(逗号分隔)(2:1)
+
+	GOODSCODE            string  `json:"goodscode" xorm:"GOODSCODE"`                       // 期货合约代码(内部)
+	GOODSNAME            string  `json:"goodsname" xorm:"GOODSNAME"`                       // 期货合约名称
+	PRESALEPRICE         float64 `json:"presaleprice" xorm:"PRESALEPRICE"`                 // 发售价(49)
+	TRANSFERDEPOSITRATIO float64 `json:"transferdepositratio" xorm:"TRANSFERDEPOSITRATIO"` // 转让定金比例(49)
+	PROVIDERUSERID       int64   `json:"provideruserid" xorm:"PROVIDERUSERID"`             // 发售方用户ID(49)
+
+	SELLNAME string `json:"sellname" xorm:"SELLNAME"` // 发售方
+
+	PRESALEMODESTR string `json:"presalemodestr" xorm:"PRESALEMODESTR"` // 预售模式
+
+	PageEx `xorm:"extends"` // 页码信息
+}
+
+func (r *PresaleGoods) calc() {
+	if len(r.TRADEDATE) == 8 {
+		r.TRADEDATE = fmt.Sprintf("%v-%v-%v", r.TRADEDATE[0:4], r.TRADEDATE[4:6], r.TRADEDATE[6:8])
+	}
+}
+
+func (r *PresaleGoods) buildSql() string {
+	var sqlId utils.SQLVal = `
+		select 
+			g.GOODSCODE,
+			g.GOODSNAME,
+			t.ATTACHMENTURL,
+			t.PICTUREURLS,
+			t.BANNERPICURL,
+			t.STARTPRICE,
+			g.PRESALEPRICE,
+			t.PRESALEQTY,    
+			t.STARTTIME,
+			t.ENDTIME,
+			t.PRESALEDEPOSITALGORITHM,
+			t.PRESALEDEPOSITVALUE,
+			g.TRANSFERDEPOSITRATIO,
+			g.PROVIDERUSERID,
+			ui.CUSTOMERNAME SELLNAME,
+			en.ENUMDICNAME  PRESALEMODESTR,
+			t.PRESALESTATUS
+		from CPTrade_PresaleGoodsEx t
+		inner join Goods g
+		on t.relatedgoodsid = g.goodsid
+		inner join userinfo ui
+		on g.provideruserid = ui.userid
+		left join enumdicitem en
+		on en.enumdiccode = 'presalemode'
+		and t.PresaleMode = en.enumitemname
+		where t.marketid = 48201 
+		order by t.endtime
+	`
+
+	sqlId.Page(r.Page, r.PageSize)
+	return sqlId.String()
+}
+
+func (r *PresaleGoods) GetDataByPage() (interface{}, error, int, int, int) {
+	sData := make([]PresaleGoods, 0)
+	err := db.GetEngine().SQL(r.buildSql()).Find(&sData)
+	total := 0
+	for i := range sData {
+		sData[i].calc()
+		total = sData[i].Total
+	}
+	return sData, err, r.Page, r.PageSize, total
+}

+ 8 - 0
routers/router.go

@@ -13,6 +13,7 @@ import (
 	"mtp2_if/controllers/erms3"
 	"mtp2_if/controllers/ferroalloy"
 	"mtp2_if/controllers/guangzuan"
+	"mtp2_if/controllers/hnsh"
 	"mtp2_if/controllers/hsby"
 	"mtp2_if/controllers/market"
 	"mtp2_if/controllers/order"
@@ -733,6 +734,13 @@ func InitRouter() *gin.Engine {
 		ferroalloyR.Use(token.Auth()).GET("QueryTHJInvesotrDepositLog", ferroalloy.QueryTHJInvesotrDepositLog)
 	}
 
+	// **************************华南石化*************************
+	hnshR := apiR.Group("Hnsh")
+	hnshR.Use()
+	{
+		hnshR.Use(token.Auth()).GET("QueryPresaleGoods", hnsh.QueryPresaleGoods)
+	}
+
 	return r
 }