Explorar o código

任务 #6410 对应增加接口 /Goods/GetTCEGoodsCollections
任务 #6409 任务 #6418

zhouxnsz hai 1 ano
pai
achega
a4992a8521
Modificáronse 10 ficheiros con 744 adicións e 28 borrados
  1. 33 0
      controllers/goods/goods.go
  2. 4 4
      controllers/guangzuan/tradeService.go
  3. 209 0
      docs/docs.go
  4. 209 0
      docs/swagger.json
  5. 152 0
      docs/swagger.yaml
  6. 34 4
      models/ermcpGoods.go
  7. 28 0
      models/goods.go
  8. 26 20
      models/mine.go
  9. 41 0
      models/ori.go
  10. 8 0
      routers/router.go

+ 33 - 0
controllers/goods/goods.go

@@ -0,0 +1,33 @@
+package goods
+
+import (
+	"mtp2_if/global/app"
+	"mtp2_if/global/e"
+	"mtp2_if/logger"
+	"mtp2_if/models"
+	"net/http"
+
+	"github.com/gin-gonic/gin"
+)
+
+// GetTCEGoodsCollections 获取TCE商品集合表
+// @Summary 获取TCE商品集合表
+// @Produce json
+// @Success 200 {array}  models.TCEGoodsCollect
+// @Failure 500 {object} app.Response
+// @Router  /Goods/GetTCEGoodsCollections [get]
+// @Tags    商品服务
+func GetTCEGoodsCollections(c *gin.Context) {
+	appG := app.Gin{C: c}
+
+	rst, err := models.GetTCEGoodsCollections()
+	if err != nil {
+		// 查询失败
+		logger.GetLogger().Errorf("GetTCEGoodsCollections failed: %s", err.Error())
+		appG.Response(http.StatusBadRequest, e.ERROR_QUERY_FAIL, nil)
+		return
+	}
+
+	// 查询成功
+	appG.Response(http.StatusOK, e.SUCCESS, rst)
+}

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

+ 209 - 0
docs/docs.go

@@ -10167,6 +10167,34 @@ const docTemplate = `{
                 }
             }
         },
+        "/Goods/GetTCEGoodsCollections": {
+            "get": {
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "商品服务"
+                ],
+                "summary": "获取TCE商品集合表",
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.TCEGoodsCollect"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Guangzuan/GZBSFWOrderOperate": {
             "get": {
                 "security": [
@@ -36534,6 +36562,30 @@ const docTemplate = `{
                     "description": "审核时间",
                     "type": "string"
                 },
+                "buyotherfeealgorithm": {
+                    "description": "买交收其它费用算法",
+                    "type": "integer"
+                },
+                "buyotherfeevalue": {
+                    "description": "买交收其它费用值",
+                    "type": "number"
+                },
+                "buypricemovealgorithm": {
+                    "description": "买交收升贴水算法",
+                    "type": "integer"
+                },
+                "buypricemovevalue": {
+                    "description": "买交收升贴水值",
+                    "type": "number"
+                },
+                "buyshippingfeealgorithm": {
+                    "description": "买交收运费算法",
+                    "type": "integer"
+                },
+                "buyshippingfeevalue": {
+                    "description": "买交收运费值",
+                    "type": "number"
+                },
                 "canautoadddeposit": {
                     "description": "是否允许自动追加定金: 0-否 1-是(52)",
                     "type": "integer"
@@ -36622,6 +36674,18 @@ const docTemplate = `{
                     "description": "商品名称",
                     "type": "string"
                 },
+                "goodsnameen": {
+                    "description": "期货合约名称(英文)",
+                    "type": "string"
+                },
+                "goodsnameth": {
+                    "description": "期货合约名称泰文)",
+                    "type": "string"
+                },
+                "goodsnametw": {
+                    "description": "期货合约名称(繁体)",
+                    "type": "string"
+                },
                 "goodsorder": {
                     "description": "商品显示顺序(99)",
                     "type": "string"
@@ -36754,6 +36818,30 @@ const docTemplate = `{
                     "description": "备注",
                     "type": "string"
                 },
+                "sellotherfeealgorithm": {
+                    "description": "卖交收其它费用算法",
+                    "type": "integer"
+                },
+                "sellotherfeevalue": {
+                    "description": "卖交收其它费用值",
+                    "type": "number"
+                },
+                "sellpricemovealgorithm": {
+                    "description": "卖交收升贴水算法",
+                    "type": "integer"
+                },
+                "sellpricemovevalue": {
+                    "description": "卖交收升贴水值",
+                    "type": "number"
+                },
+                "sellshippingfeealgorithm": {
+                    "description": "卖交收运费算法",
+                    "type": "integer"
+                },
+                "sellshippingfeevalue": {
+                    "description": "卖交收运费值",
+                    "type": "number"
+                },
                 "thumurls": {
                     "description": "缩略图片(1:1)(逗号分隔)",
                     "type": "string"
@@ -44188,6 +44276,18 @@ const docTemplate = `{
                     "description": "缩略图片(1:1)(逗号分隔)",
                     "type": "string"
                 },
+                "totalotherfee": {
+                    "description": "总其它费用(10-线下交收)",
+                    "type": "number"
+                },
+                "totalpricemove": {
+                    "description": "总升贴水(10-线下交收)",
+                    "type": "number"
+                },
+                "totalshippingfee": {
+                    "description": "总运费(10-线下交收)",
+                    "type": "number"
+                },
                 "tradeid": {
                     "description": "成交单号(10-线下交收)",
                     "type": "string"
@@ -54797,6 +54897,94 @@ const docTemplate = `{
                 }
             }
         },
+        "models.TCEGoodsCollect": {
+            "type": "object",
+            "properties": {
+                "bannerurls": {
+                    "description": "Banner图(多张)(2:1)(逗号分隔)",
+                    "type": "string"
+                },
+                "collectiondesc": {
+                    "description": "商品集合描述(富文本)(简体)",
+                    "type": "string"
+                },
+                "collectiondescen": {
+                    "description": "商品集合描述(富文本)(英文)",
+                    "type": "string"
+                },
+                "collectiondescth": {
+                    "description": "商品集合描述(富文本)(泰文)",
+                    "type": "string"
+                },
+                "collectiondesctw": {
+                    "description": "商品集合描述(富文本)(繁体)",
+                    "type": "string"
+                },
+                "collectionid": {
+                    "description": "商品集合ID(SEQ_TCE_GOODSCOLLECTION)",
+                    "type": "integer"
+                },
+                "collectionname": {
+                    "description": "商品集合名称(简体)",
+                    "type": "string"
+                },
+                "collectionnameen": {
+                    "description": "商品集合名称(英文)",
+                    "type": "string"
+                },
+                "collectionnameth": {
+                    "description": "商品集合名称(泰文)",
+                    "type": "string"
+                },
+                "collectionnametw": {
+                    "description": "商品集合名称(繁体)",
+                    "type": "string"
+                },
+                "collectionstatus": {
+                    "description": "状态 - 1:正常 2:注销(枚举:status)",
+                    "type": "integer"
+                },
+                "configs": {
+                    "description": "商品集合商品列表",
+                    "type": "array",
+                    "items": {
+                        "$ref": "#/definitions/models.Tcegcgoodsconfig"
+                    }
+                },
+                "createtime": {
+                    "description": "创建时间",
+                    "type": "string"
+                },
+                "creatorid": {
+                    "description": "建仓人",
+                    "type": "integer"
+                },
+                "defaultgoodsid": {
+                    "description": "默认商品ID",
+                    "type": "integer"
+                },
+                "modifierid": {
+                    "description": "修改人",
+                    "type": "integer"
+                },
+                "modifytime": {
+                    "description": "修改时间",
+                    "type": "string"
+                },
+                "orderindex": {
+                    "description": "显示顺序",
+                    "type": "integer"
+                },
+                "pictureurl": {
+                    "description": "详情图(1张)",
+                    "type": "string"
+                },
+                "thumurls": {
+                    "description": "缩略图片(1:1)(1张)",
+                    "type": "string"
+                }
+            }
+        },
         "models.THJDeliveryMode": {
             "type": "object",
             "properties": {
@@ -55656,6 +55844,27 @@ const docTemplate = `{
                 }
             }
         },
+        "models.Tcegcgoodsconfig": {
+            "type": "object",
+            "properties": {
+                "collectionid": {
+                    "description": "商品集合ID(SEQ_TCE_GOODSCOLLECTION)",
+                    "type": "integer"
+                },
+                "configid": {
+                    "description": "商品配置ID(SEQ_TCE_GCGoodsConfig)",
+                    "type": "integer"
+                },
+                "createtime": {
+                    "description": "创建时间",
+                    "type": "string"
+                },
+                "goodsid": {
+                    "description": "商品ID",
+                    "type": "integer"
+                }
+            }
+        },
         "models.ThjSpotQuote": {
             "type": "object",
             "properties": {

+ 209 - 0
docs/swagger.json

@@ -10158,6 +10158,34 @@
                 }
             }
         },
+        "/Goods/GetTCEGoodsCollections": {
+            "get": {
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "商品服务"
+                ],
+                "summary": "获取TCE商品集合表",
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.TCEGoodsCollect"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Guangzuan/GZBSFWOrderOperate": {
             "get": {
                 "security": [
@@ -36525,6 +36553,30 @@
                     "description": "审核时间",
                     "type": "string"
                 },
+                "buyotherfeealgorithm": {
+                    "description": "买交收其它费用算法",
+                    "type": "integer"
+                },
+                "buyotherfeevalue": {
+                    "description": "买交收其它费用值",
+                    "type": "number"
+                },
+                "buypricemovealgorithm": {
+                    "description": "买交收升贴水算法",
+                    "type": "integer"
+                },
+                "buypricemovevalue": {
+                    "description": "买交收升贴水值",
+                    "type": "number"
+                },
+                "buyshippingfeealgorithm": {
+                    "description": "买交收运费算法",
+                    "type": "integer"
+                },
+                "buyshippingfeevalue": {
+                    "description": "买交收运费值",
+                    "type": "number"
+                },
                 "canautoadddeposit": {
                     "description": "是否允许自动追加定金: 0-否 1-是(52)",
                     "type": "integer"
@@ -36613,6 +36665,18 @@
                     "description": "商品名称",
                     "type": "string"
                 },
+                "goodsnameen": {
+                    "description": "期货合约名称(英文)",
+                    "type": "string"
+                },
+                "goodsnameth": {
+                    "description": "期货合约名称泰文)",
+                    "type": "string"
+                },
+                "goodsnametw": {
+                    "description": "期货合约名称(繁体)",
+                    "type": "string"
+                },
                 "goodsorder": {
                     "description": "商品显示顺序(99)",
                     "type": "string"
@@ -36745,6 +36809,30 @@
                     "description": "备注",
                     "type": "string"
                 },
+                "sellotherfeealgorithm": {
+                    "description": "卖交收其它费用算法",
+                    "type": "integer"
+                },
+                "sellotherfeevalue": {
+                    "description": "卖交收其它费用值",
+                    "type": "number"
+                },
+                "sellpricemovealgorithm": {
+                    "description": "卖交收升贴水算法",
+                    "type": "integer"
+                },
+                "sellpricemovevalue": {
+                    "description": "卖交收升贴水值",
+                    "type": "number"
+                },
+                "sellshippingfeealgorithm": {
+                    "description": "卖交收运费算法",
+                    "type": "integer"
+                },
+                "sellshippingfeevalue": {
+                    "description": "卖交收运费值",
+                    "type": "number"
+                },
                 "thumurls": {
                     "description": "缩略图片(1:1)(逗号分隔)",
                     "type": "string"
@@ -44179,6 +44267,18 @@
                     "description": "缩略图片(1:1)(逗号分隔)",
                     "type": "string"
                 },
+                "totalotherfee": {
+                    "description": "总其它费用(10-线下交收)",
+                    "type": "number"
+                },
+                "totalpricemove": {
+                    "description": "总升贴水(10-线下交收)",
+                    "type": "number"
+                },
+                "totalshippingfee": {
+                    "description": "总运费(10-线下交收)",
+                    "type": "number"
+                },
                 "tradeid": {
                     "description": "成交单号(10-线下交收)",
                     "type": "string"
@@ -54788,6 +54888,94 @@
                 }
             }
         },
+        "models.TCEGoodsCollect": {
+            "type": "object",
+            "properties": {
+                "bannerurls": {
+                    "description": "Banner图(多张)(2:1)(逗号分隔)",
+                    "type": "string"
+                },
+                "collectiondesc": {
+                    "description": "商品集合描述(富文本)(简体)",
+                    "type": "string"
+                },
+                "collectiondescen": {
+                    "description": "商品集合描述(富文本)(英文)",
+                    "type": "string"
+                },
+                "collectiondescth": {
+                    "description": "商品集合描述(富文本)(泰文)",
+                    "type": "string"
+                },
+                "collectiondesctw": {
+                    "description": "商品集合描述(富文本)(繁体)",
+                    "type": "string"
+                },
+                "collectionid": {
+                    "description": "商品集合ID(SEQ_TCE_GOODSCOLLECTION)",
+                    "type": "integer"
+                },
+                "collectionname": {
+                    "description": "商品集合名称(简体)",
+                    "type": "string"
+                },
+                "collectionnameen": {
+                    "description": "商品集合名称(英文)",
+                    "type": "string"
+                },
+                "collectionnameth": {
+                    "description": "商品集合名称(泰文)",
+                    "type": "string"
+                },
+                "collectionnametw": {
+                    "description": "商品集合名称(繁体)",
+                    "type": "string"
+                },
+                "collectionstatus": {
+                    "description": "状态 - 1:正常 2:注销(枚举:status)",
+                    "type": "integer"
+                },
+                "configs": {
+                    "description": "商品集合商品列表",
+                    "type": "array",
+                    "items": {
+                        "$ref": "#/definitions/models.Tcegcgoodsconfig"
+                    }
+                },
+                "createtime": {
+                    "description": "创建时间",
+                    "type": "string"
+                },
+                "creatorid": {
+                    "description": "建仓人",
+                    "type": "integer"
+                },
+                "defaultgoodsid": {
+                    "description": "默认商品ID",
+                    "type": "integer"
+                },
+                "modifierid": {
+                    "description": "修改人",
+                    "type": "integer"
+                },
+                "modifytime": {
+                    "description": "修改时间",
+                    "type": "string"
+                },
+                "orderindex": {
+                    "description": "显示顺序",
+                    "type": "integer"
+                },
+                "pictureurl": {
+                    "description": "详情图(1张)",
+                    "type": "string"
+                },
+                "thumurls": {
+                    "description": "缩略图片(1:1)(1张)",
+                    "type": "string"
+                }
+            }
+        },
         "models.THJDeliveryMode": {
             "type": "object",
             "properties": {
@@ -55647,6 +55835,27 @@
                 }
             }
         },
+        "models.Tcegcgoodsconfig": {
+            "type": "object",
+            "properties": {
+                "collectionid": {
+                    "description": "商品集合ID(SEQ_TCE_GOODSCOLLECTION)",
+                    "type": "integer"
+                },
+                "configid": {
+                    "description": "商品配置ID(SEQ_TCE_GCGoodsConfig)",
+                    "type": "integer"
+                },
+                "createtime": {
+                    "description": "创建时间",
+                    "type": "string"
+                },
+                "goodsid": {
+                    "description": "商品ID",
+                    "type": "integer"
+                }
+            }
+        },
         "models.ThjSpotQuote": {
             "type": "object",
             "properties": {

+ 152 - 0
docs/swagger.yaml

@@ -9447,6 +9447,24 @@ definitions:
       audittime:
         description: 审核时间
         type: string
+      buyotherfeealgorithm:
+        description: 买交收其它费用算法
+        type: integer
+      buyotherfeevalue:
+        description: 买交收其它费用值
+        type: number
+      buypricemovealgorithm:
+        description: 买交收升贴水算法
+        type: integer
+      buypricemovevalue:
+        description: 买交收升贴水值
+        type: number
+      buyshippingfeealgorithm:
+        description: 买交收运费算法
+        type: integer
+      buyshippingfeevalue:
+        description: 买交收运费值
+        type: number
       canautoadddeposit:
         description: '是否允许自动追加定金: 0-否 1-是(52)'
         type: integer
@@ -9513,6 +9531,15 @@ definitions:
       goodsname:
         description: 商品名称
         type: string
+      goodsnameen:
+        description: 期货合约名称(英文)
+        type: string
+      goodsnameth:
+        description: 期货合约名称泰文)
+        type: string
+      goodsnametw:
+        description: 期货合约名称(繁体)
+        type: string
       goodsorder:
         description: 商品显示顺序(99)
         type: string
@@ -9612,6 +9639,24 @@ definitions:
       remark:
         description: 备注
         type: string
+      sellotherfeealgorithm:
+        description: 卖交收其它费用算法
+        type: integer
+      sellotherfeevalue:
+        description: 卖交收其它费用值
+        type: number
+      sellpricemovealgorithm:
+        description: 卖交收升贴水算法
+        type: integer
+      sellpricemovevalue:
+        description: 卖交收升贴水值
+        type: number
+      sellshippingfeealgorithm:
+        description: 卖交收运费算法
+        type: integer
+      sellshippingfeevalue:
+        description: 卖交收运费值
+        type: number
       thumurls:
         description: 缩略图片(1:1)(逗号分隔)
         type: string
@@ -15165,6 +15210,15 @@ definitions:
       thumurls:
         description: 缩略图片(1:1)(逗号分隔)
         type: string
+      totalotherfee:
+        description: 总其它费用(10-线下交收)
+        type: number
+      totalpricemove:
+        description: 总升贴水(10-线下交收)
+        type: number
+      totalshippingfee:
+        description: 总运费(10-线下交收)
+        type: number
       tradeid:
         description: 成交单号(10-线下交收)
         type: string
@@ -23025,6 +23079,71 @@ definitions:
         description: 现货商品名称
         type: string
     type: object
+  models.TCEGoodsCollect:
+    properties:
+      bannerurls:
+        description: Banner图(多张)(2:1)(逗号分隔)
+        type: string
+      collectiondesc:
+        description: 商品集合描述(富文本)(简体)
+        type: string
+      collectiondescen:
+        description: 商品集合描述(富文本)(英文)
+        type: string
+      collectiondescth:
+        description: 商品集合描述(富文本)(泰文)
+        type: string
+      collectiondesctw:
+        description: 商品集合描述(富文本)(繁体)
+        type: string
+      collectionid:
+        description: 商品集合ID(SEQ_TCE_GOODSCOLLECTION)
+        type: integer
+      collectionname:
+        description: 商品集合名称(简体)
+        type: string
+      collectionnameen:
+        description: 商品集合名称(英文)
+        type: string
+      collectionnameth:
+        description: 商品集合名称(泰文)
+        type: string
+      collectionnametw:
+        description: 商品集合名称(繁体)
+        type: string
+      collectionstatus:
+        description: 状态 - 1:正常 2:注销(枚举:status)
+        type: integer
+      configs:
+        description: 商品集合商品列表
+        items:
+          $ref: '#/definitions/models.Tcegcgoodsconfig'
+        type: array
+      createtime:
+        description: 创建时间
+        type: string
+      creatorid:
+        description: 建仓人
+        type: integer
+      defaultgoodsid:
+        description: 默认商品ID
+        type: integer
+      modifierid:
+        description: 修改人
+        type: integer
+      modifytime:
+        description: 修改时间
+        type: string
+      orderindex:
+        description: 显示顺序
+        type: integer
+      pictureurl:
+        description: 详情图(1张)
+        type: string
+      thumurls:
+        description: 缩略图片(1:1)(1张)
+        type: string
+    type: object
   models.THJDeliveryMode:
     properties:
       enumdicname:
@@ -23652,6 +23771,21 @@ definitions:
     required:
     - autoid
     type: object
+  models.Tcegcgoodsconfig:
+    properties:
+      collectionid:
+        description: 商品集合ID(SEQ_TCE_GOODSCOLLECTION)
+        type: integer
+      configid:
+        description: 商品配置ID(SEQ_TCE_GCGoodsConfig)
+        type: integer
+      createtime:
+        description: 创建时间
+        type: string
+      goodsid:
+        description: 商品ID
+        type: integer
+    type: object
   models.ThjSpotQuote:
     properties:
       spotname:
@@ -38153,6 +38287,24 @@ paths:
       summary: 用户签到
       tags:
       - 铁合金
+  /Goods/GetTCEGoodsCollections:
+    get:
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.TCEGoodsCollect'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      summary: 获取TCE商品集合表
+      tags:
+      - 商品服务
   /Guangzuan/GZBSFWOrderOperate:
     get:
       parameters:

+ 34 - 4
models/ermcpGoods.go

@@ -86,9 +86,24 @@ type ErmcpGoods struct {
 	TRADEPROPERTY int32  `json:"tradeproperty" xorm:"TRADEPROPERTY"` // 交易属性 -  1:收益权(可做空) 2:所有权(不可做空) 3:期权 4:现货 5:参考行情 6:通道交易 7:币交易 8:场外期权
 	ENUMDICNAME   string `json:"enumdicname"`                        // 单位名称
 
-	MINSPREAD  float64 `json:"minspread" xorm:"MINSPREAD"`   // 点差下限(46)
-	MAXSPREAD  float64 `json:"maxspread" xorm:"MAXSPREAD"`   // 点差上限(46)
-	GOODSORDER string  `json:"goodsorder" xorm:"GOODSORDER"` // 商品显示顺序(99)
+	MINSPREAD                float64 `json:"minspread" xorm:"MINSPREAD"`                               // 点差下限(46)
+	MAXSPREAD                float64 `json:"maxspread" xorm:"MAXSPREAD"`                               // 点差上限(46)
+	GOODSORDER               string  `json:"goodsorder" xorm:"GOODSORDER"`                             // 商品显示顺序(99)
+	GOODSNAMETH              string  `json:"goodsnameth" xorm:"GOODSNAMETH"`                           // 期货合约名称泰文)
+	GOODSNAMEEN              string  `json:"goodsnameen" xorm:"GOODSNAMEEN"`                           // 期货合约名称(英文)
+	GOODSNAMETW              string  `json:"goodsnametw" xorm:"GOODSNAMETW"`                           // 期货合约名称(繁体)
+	BUYPRICEMOVEALGORITHM    int32   `json:"buypricemovealgorithm" xorm:"BUYPRICEMOVEALGORITHM"`       // 买交收升贴水算法
+	BUYPRICEMOVEVALUE        float64 `json:"buypricemovevalue" xorm:"BUYPRICEMOVEVALUE"`               // 买交收升贴水值
+	BUYSHIPPINGFEEALGORITHM  int32   `json:"buyshippingfeealgorithm" xorm:"BUYSHIPPINGFEEALGORITHM"`   // 买交收运费算法
+	BUYSHIPPINGFEEVALUE      float64 `json:"buyshippingfeevalue" xorm:"BUYSHIPPINGFEEVALUE"`           // 买交收运费值
+	BUYOTHERFEEALGORITHM     int32   `json:"buyotherfeealgorithm" xorm:"BUYOTHERFEEALGORITHM"`         // 买交收其它费用算法
+	BUYOTHERFEEVALUE         float64 `json:"buyotherfeevalue" xorm:"BUYOTHERFEEVALUE"`                 // 买交收其它费用值
+	SELLPRICEMOVEALGORITHM   int32   `json:"sellpricemovealgorithm" xorm:"SELLPRICEMOVEALGORITHM"`     // 卖交收升贴水算法
+	SELLPRICEMOVEVALUE       float64 `json:"sellpricemovevalue" xorm:"SELLPRICEMOVEVALUE"`             // 卖交收升贴水值
+	SELLSHIPPINGFEEALGORITHM int32   `json:"sellshippingfeealgorithm" xorm:"SELLSHIPPINGFEEALGORITHM"` // 卖交收运费算法
+	SELLSHIPPINGFEEVALUE     float64 `json:"sellshippingfeevalue" xorm:"SELLSHIPPINGFEEVALUE"`         // 卖交收运费值
+	SELLOTHERFEEALGORITHM    int32   `json:"sellotherfeealgorithm" xorm:"SELLOTHERFEEALGORITHM"`       // 卖交收其它费用算法
+	SELLOTHERFEEVALUE        float64 `json:"sellotherfeevalue" xorm:"SELLOTHERFEEVALUE"`               // 卖交收其它费用值
 
 	CANAUTOADDDEPOSIT    int32 `json:"canautoadddeposit" xorm:"CANAUTOADDDEPOSIT"`       // 是否允许自动追加定金: 0-否 1-是(52)
 	CANAUTOREFUNDDEPOSIT int32 `json:"canautorefunddeposit" xorm:"CANAUTOREFUNDDEPOSIT"` // 是否允许自动退还定金: 0-否 1-是(52)
@@ -133,7 +148,22 @@ func GetErmcpGoodses(userid int64, lastUpdateTime string, loginID int64) ([]Ermc
 			EX.MAXSPREAD,
 			EX.GOODSORDER,
 			EX.CANAUTOADDDEPOSIT,
-			Ex.CANAUTOREFUNDDEPOSIT
+			Ex.CANAUTOREFUNDDEPOSIT,
+			EX.GOODSNAMETH             ,
+			EX.GOODSNAMEEN             ,
+			EX.GOODSNAMETW             ,
+			EX.BUYPRICEMOVEALGORITHM   ,
+			EX.BUYPRICEMOVEVALUE       ,
+			EX.BUYSHIPPINGFEEALGORITHM ,
+			EX.BUYSHIPPINGFEEVALUE     ,
+			EX.BUYOTHERFEEALGORITHM    ,
+			EX.BUYOTHERFEEVALUE        ,
+			EX.SELLPRICEMOVEALGORITHM  ,
+			EX.SELLPRICEMOVEVALUE      ,
+			EX.SELLSHIPPINGFEEALGORITHM,
+			EX.SELLSHIPPINGFEEVALUE    ,
+			EX.SELLOTHERFEEALGORITHM   ,
+			EX.SELLOTHERFEEVALUE       
 			`).
 		Join("LEFT", "MARKET M", "M.MARKETID = G.MARKETID").
 		Join("LEFT", "GOODSMARGINCONFIG GM", "GM.GOODSID = G.GOODSID AND GM.ISDEFAULT = 1").

+ 28 - 0
models/goods.go

@@ -206,3 +206,31 @@ func GetGoodsByLoginID(loginID int, marketIDs string) ([]Goods, error) {
 
 	return goodses, nil
 }
+
+type TCEGoodsCollect struct {
+	Tcegoodscollection
+	Configs []Tcegcgoodsconfig `json:"configs"` // 商品集合商品列表
+}
+
+func GetTCEGoodsCollections() (collections []TCEGoodsCollect, err error) {
+	collections = make([]TCEGoodsCollect, 0)
+
+	items := make([]Tcegoodscollection, 0)
+	if err = db.GetEngine().Where("COLLECTIONSTATUS = ?", 1).OrderBy("ORDERINDEX").Find(&items); err != nil {
+		return
+	}
+
+	for _, item := range items {
+		configs := make([]Tcegcgoodsconfig, 0)
+		if err = db.GetEngine().Where("COLLECTIONID = ?", item.COLLECTIONID).Find(&configs); err != nil {
+			return
+		}
+
+		collections = append(collections, TCEGoodsCollect{
+			Tcegoodscollection: item,
+			Configs:            configs,
+		})
+	}
+
+	return
+}

+ 26 - 20
models/mine.go

@@ -958,25 +958,28 @@ func (r *MineTradeTradeDetail) GetDataByPage() (interface{}, error, int, int, in
 
 // MineTradeGoodsDeliveryOffline 交收提货-线下交收单
 type MineTradeGoodsDeliveryOffline struct {
-	DELIVERYORDERID string    `json:"deliveryorderid" xorm:"DELIVERYORDERID"`                // 交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
-	USERID          int64     `json:"userid" xorm:"USERID" form:"userid" binding:"required"` // 申请用户ID
-	ACCOUNTID       int64     `json:"accountid" xorm:"ACCOUNTID"`                            // 账户ID
-	GOODSID         int64     `json:"goodsid" xorm:"GOODSID"`                                // 商品ID
-	MARKETID        int32     `json:"marketid" xorm:"MARKETID"`                              // 市场ID
-	BUYORSELL       *int32    `json:"buyorsell" xorm:"BUYORSELL" form:"buyorsell"`           // 交收方向 - 0:买 1:卖
-	DELIVERYLOT     int64     `json:"deliverylot" xorm:"DELIVERYLOT"`                        // 交收手数
-	DELIVERYQTY     int64     `json:"deliveryqty" xorm:"DELIVERYQTY"`                        // 交收数量 (手数*合约乘数)
-	DELIVERYINFO    string    `json:"deliveryinfo" xorm:"DELIVERYINFO"`                      // 交收信息
-	MATCHUSERID     int64     `json:"matchuserid" xorm:"MATCHUSERID"`                        // 对手方UserID
-	MATCHACCOUNTID  int64     `json:"matchaccountid" xorm:"MATCHACCOUNTID"`                  // 对手方AccountID
-	REQTIME         string    `json:"reqtime" xorm:"REQTIME"`                                // 申请时间
-	REQTRADEDATE    string    `json:"reqtradedate" xorm:"REQTRADEDATE"`                      // 申请交易日
-	ORDERSTATUS     int32     `json:"orderstatus" xorm:"ORDERSTATUS"`                        // 单据状态 - 1:待处理 2:交收中 3:已完成
-	DELIVERYPRICE   float64   `json:"deliveryprice" xorm:"DELIVERYPRICE"`                    // 交收价格
-	DELIVERYAMOUNT  float64   `json:"deliveryamount" xorm:"DELIVERYAMOUNT"`                  // 交收货款
-	CLOSETIME       time.Time `json:"closetime" xorm:"CLOSETIME"`                            // 完成时间
-	CLOSETRADEDATE  string    `json:"closetradedate" xorm:"CLOSETRADEDATE"`                  // 完成交易日
-	TRADEID         string    `json:"tradeid" xorm:"TRADEID"`                                // 成交单号(10-线下交收)
+	DELIVERYORDERID  string    `json:"deliveryorderid" xorm:"DELIVERYORDERID"`                // 交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
+	USERID           int64     `json:"userid" xorm:"USERID" form:"userid" binding:"required"` // 申请用户ID
+	ACCOUNTID        int64     `json:"accountid" xorm:"ACCOUNTID"`                            // 账户ID
+	GOODSID          int64     `json:"goodsid" xorm:"GOODSID"`                                // 商品ID
+	MARKETID         int32     `json:"marketid" xorm:"MARKETID"`                              // 市场ID
+	BUYORSELL        *int32    `json:"buyorsell" xorm:"BUYORSELL" form:"buyorsell"`           // 交收方向 - 0:买 1:卖
+	DELIVERYLOT      int64     `json:"deliverylot" xorm:"DELIVERYLOT"`                        // 交收手数
+	DELIVERYQTY      int64     `json:"deliveryqty" xorm:"DELIVERYQTY"`                        // 交收数量 (手数*合约乘数)
+	DELIVERYINFO     string    `json:"deliveryinfo" xorm:"DELIVERYINFO"`                      // 交收信息
+	MATCHUSERID      int64     `json:"matchuserid" xorm:"MATCHUSERID"`                        // 对手方UserID
+	MATCHACCOUNTID   int64     `json:"matchaccountid" xorm:"MATCHACCOUNTID"`                  // 对手方AccountID
+	REQTIME          string    `json:"reqtime" xorm:"REQTIME"`                                // 申请时间
+	REQTRADEDATE     string    `json:"reqtradedate" xorm:"REQTRADEDATE"`                      // 申请交易日
+	ORDERSTATUS      int32     `json:"orderstatus" xorm:"ORDERSTATUS"`                        // 单据状态 - 1:待处理 2:交收中 3:已完成
+	DELIVERYPRICE    float64   `json:"deliveryprice" xorm:"DELIVERYPRICE"`                    // 交收价格
+	DELIVERYAMOUNT   float64   `json:"deliveryamount" xorm:"DELIVERYAMOUNT"`                  // 交收货款
+	CLOSETIME        time.Time `json:"closetime" xorm:"CLOSETIME"`                            // 完成时间
+	CLOSETRADEDATE   string    `json:"closetradedate" xorm:"CLOSETRADEDATE"`                  // 完成交易日
+	TRADEID          string    `json:"tradeid" xorm:"TRADEID"`                                // 成交单号(10-线下交收)
+	TOTALPRICEMOVE   float64   `json:"totalpricemove" xorm:"TOTALPRICEMOVE"`                  // 总升贴水(10-线下交收)
+	TOTALSHIPPINGFEE float64   `json:"totalshippingfee" xorm:"TOTALSHIPPINGFEE"`              // 总运费(10-线下交收)
+	TOTALOTHERFEE    float64   `json:"totalotherfee" xorm:"TOTALOTHERFEE"`                    // 总其它费用(10-线下交收)
 
 	GOODSCODE        string `json:"goodscode" xorm:"GOODSCODE"`               // 期货合约代码(内部)
 	GOODSNAME        string `json:"goodsname" xorm:"GOODSNAME"`               // 期货合约名称
@@ -1028,7 +1031,10 @@ func (r *MineTradeGoodsDeliveryOffline) buildSql() string {
        t.deliveryamount,
        t.closetime,
        t.closetradedate,
-	   to_char(t.tradeid) TRADEID
+	   to_char(t.tradeid) TRADEID,
+	   t.totalpricemove,
+	   t.totalshippingfee,
+	   t.totalotherfee
 	   
   from Trade_GoodsDeliveryOffLine t
 

+ 41 - 0
models/ori.go

@@ -1161,3 +1161,44 @@ type Bankcusbankinfo struct {
 func (r *Bankcusbankinfo) TableName() string {
 	return "BANK_CUSBANKINFO"
 }
+
+// Tcegoodscollection 226.TCE商品集合表- 用于App端显示
+type Tcegoodscollection struct {
+	COLLECTIONID     int64     `json:"collectionid" xorm:"COLLECTIONID"`         // 商品集合ID(SEQ_TCE_GOODSCOLLECTION)
+	COLLECTIONNAME   string    `json:"collectionname" xorm:"COLLECTIONNAME"`     // 商品集合名称(简体)
+	COLLECTIONNAMEEN string    `json:"collectionnameen" xorm:"COLLECTIONNAMEEN"` // 商品集合名称(英文)
+	COLLECTIONNAMETH string    `json:"collectionnameth" xorm:"COLLECTIONNAMETH"` // 商品集合名称(泰文)
+	COLLECTIONNAMETW string    `json:"collectionnametw" xorm:"COLLECTIONNAMETW"` // 商品集合名称(繁体)
+	COLLECTIONDESC   string    `json:"collectiondesc" xorm:"COLLECTIONDESC"`     // 商品集合描述(富文本)(简体)
+	COLLECTIONDESCEN string    `json:"collectiondescen" xorm:"COLLECTIONDESCEN"` // 商品集合描述(富文本)(英文)
+	COLLECTIONDESCTH string    `json:"collectiondescth" xorm:"COLLECTIONDESCTH"` // 商品集合描述(富文本)(泰文)
+	COLLECTIONDESCTW string    `json:"collectiondesctw" xorm:"COLLECTIONDESCTW"` // 商品集合描述(富文本)(繁体)
+	ORDERINDEX       int32     `json:"orderindex" xorm:"ORDERINDEX"`             // 显示顺序
+	DEFAULTGOODSID   int64     `json:"defaultgoodsid" xorm:"DEFAULTGOODSID"`     // 默认商品ID
+	THUMURLS         string    `json:"thumurls" xorm:"THUMURLS"`                 // 缩略图片(1:1)(1张)
+	BANNERURLS       string    `json:"bannerurls" xorm:"BANNERURLS"`             // Banner图(多张)(2:1)(逗号分隔)
+	PICTUREURL       string    `json:"pictureurl" xorm:"PICTUREURL"`             // 详情图(1张)
+	COLLECTIONSTATUS int32     `json:"collectionstatus" xorm:"COLLECTIONSTATUS"` // 状态 - 1:正常 2:注销(枚举:status)
+	CREATORID        int64     `json:"creatorid" xorm:"CREATORID"`               // 建仓人
+	CREATETIME       time.Time `json:"createtime" xorm:"CREATETIME"`             // 创建时间
+	MODIFIERID       int64     `json:"modifierid" xorm:"MODIFIERID"`             // 修改人
+	MODIFYTIME       time.Time `json:"modifytime" xorm:"MODIFYTIME"`             // 修改时间
+}
+
+// TableName is TCE_GOODSCOLLECTION
+func (r *Tcegoodscollection) TableName() string {
+	return "TCE_GOODSCOLLECTION"
+}
+
+// Tcegcgoodsconfig 226.TCE商品集合商品表- 用于App端显示
+type Tcegcgoodsconfig struct {
+	CONFIGID     int64     `json:"configid" xorm:"CONFIGID"`         // 商品配置ID(SEQ_TCE_GCGoodsConfig)
+	COLLECTIONID int64     `json:"collectionid" xorm:"COLLECTIONID"` // 商品集合ID(SEQ_TCE_GOODSCOLLECTION)
+	GOODSID      int64     `json:"goodsid" xorm:"GOODSID"`           // 商品ID
+	CREATETIME   time.Time `json:"createtime" xorm:"CREATETIME"`     // 创建时间
+}
+
+// TableName is TCE_GCGOODSCONFIG
+func (r *Tcegcgoodsconfig) TableName() string {
+	return "TCE_GCGOODSCONFIG"
+}

+ 8 - 0
routers/router.go

@@ -14,6 +14,7 @@ import (
 	"mtp2_if/controllers/erms2"
 	"mtp2_if/controllers/erms3"
 	"mtp2_if/controllers/ferroalloy"
+	"mtp2_if/controllers/goods"
 	"mtp2_if/controllers/guangzuan"
 	"mtp2_if/controllers/hsby"
 	"mtp2_if/controllers/market"
@@ -195,6 +196,13 @@ func InitRouter() *gin.Engine {
 		// 获取所有外部交易所信息
 		marketR.Use(token.Auth()).GET("/GetAllExExchanges", market.GetAllExExchanges)
 	}
+
+	goodsR := apiR.Group("Goods")
+	goodsR.Use()
+	{
+		goodsR.GET("GetTCEGoodsCollections", goods.GetTCEGoodsCollections)
+	}
+
 	// ************************ 通用单据 ************************
 	orderR := apiR.Group("Order")
 	orderR.Use(token.Auth())