Bläddra i källkod

Merge branch 'master' of 192.168.30.132:MTP2.0/MTP20_IF

deng.yinping 2 år sedan
förälder
incheckning
93652023f9
6 ändrade filer med 745 tillägg och 0 borttagningar
  1. 34 0
      controllers/sbyj/goods.go
  2. 231 0
      docs/docs.go
  3. 231 0
      docs/swagger.json
  4. 171 0
      docs/swagger.yaml
  5. 70 0
      models/sbyj.go
  6. 8 0
      routers/router.go

+ 34 - 0
controllers/sbyj/goods.go

@@ -0,0 +1,34 @@
+package sbyj
+
+import (
+	"mtp2_if/global/app"
+	"mtp2_if/global/e"
+	"mtp2_if/logger"
+	"mtp2_if/models"
+	"net/http"
+
+	"github.com/gin-gonic/gin"
+)
+
+// GetTouristGoods 获取水贝亿爵游客商品列表
+// @Summary 获取水贝亿爵游客商品列表
+// @Produce json
+// @Success 200 {array}  models.TouristGoods
+// @Failure 500 {object} app.Response
+// @Router  /sbyj/GetTouristGoods [get]
+// @Tags    水贝亿爵
+func GetTouristGoods(c *gin.Context) {
+	appG := app.Gin{C: c}
+
+	// 获取数据
+	goodses, err := models.GetTouristGoods([]int{52, 99})
+	if err != nil {
+		// 查询失败
+		logger.GetLogger().Errorf("GetTouristGoods failed: %s", err.Error())
+		appG.Response(http.StatusBadRequest, e.ERROR_QUERY_FAIL, nil)
+		return
+	}
+
+	// 查询成功返回
+	appG.Response(http.StatusOK, e.SUCCESS, goodses)
+}

+ 231 - 0
docs/docs.go

@@ -21130,6 +21130,34 @@ const docTemplate = `{
                     }
                 }
             }
+        },
+        "/sbyj/GetTouristGoods": {
+            "get": {
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "水贝亿爵"
+                ],
+                "summary": "获取水贝亿爵游客商品列表",
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.TouristGoods"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
         }
     },
     "definitions": {
@@ -51078,6 +51106,209 @@ const docTemplate = `{
                 }
             }
         },
+        "models.TouristGoods": {
+            "type": "object",
+            "required": [
+                "goodscode",
+                "goodsid",
+                "goodsname",
+                "marketid"
+            ],
+            "properties": {
+                "agreeunit": {
+                    "description": "合约单位",
+                    "type": "number"
+                },
+                "areauserid": {
+                    "description": "所属机构",
+                    "type": "integer"
+                },
+                "auditaccountid": {
+                    "description": "审核操作员账号",
+                    "type": "integer"
+                },
+                "audittime": {
+                    "description": "审核时间",
+                    "type": "string"
+                },
+                "cancelaccountid": {
+                    "description": "注销操作员账号",
+                    "type": "integer"
+                },
+                "canceltime": {
+                    "description": "注销时间",
+                    "type": "string"
+                },
+                "closepricemode": {
+                    "description": "强平价格方式 - 1:市价 2:最新价 3:涨跌停(未实现)",
+                    "type": "integer"
+                },
+                "closepriceparam": {
+                    "description": "强平最新价浮动比例 - 方式为2时使用  (\u003c1)买 上浮 (1+x)*最新价卖 下浮 (1-x)*最新价",
+                    "type": "number"
+                },
+                "createtime": {
+                    "description": "创建时间",
+                    "type": "string"
+                },
+                "creatorid": {
+                    "description": "创建人",
+                    "type": "integer"
+                },
+                "currencyid": {
+                    "description": "报价货币ID",
+                    "type": "integer"
+                },
+                "cutmode": {
+                    "description": "斩仓方式 - 1:不斩仓 2:自动斩仓 3:半自动斩仓",
+                    "type": "integer"
+                },
+                "decimalplace": {
+                    "description": "报价小数位",
+                    "type": "integer"
+                },
+                "delistingdate": {
+                    "description": "商品退市时间(状态:退市) -- 已作废",
+                    "type": "string"
+                },
+                "delistingmode": {
+                    "description": "退市方式 - 1:退市平仓 2:退市交收 3:不处理(仅期权\\币币兑换)",
+                    "type": "integer"
+                },
+                "deliveryflag": {
+                    "description": "交割标志 - 0:不可交割  1:可交割",
+                    "type": "integer"
+                },
+                "forceclosemode": {
+                    "description": "定期强平方式 - 1:无 2:每日 3:每周 4:每月[收益权]",
+                    "type": "integer"
+                },
+                "forceclosevalue": {
+                    "description": "定期强平参数 [收益权]",
+                    "type": "integer"
+                },
+                "goodscode": {
+                    "description": "商品代码(内部)",
+                    "type": "string"
+                },
+                "goodscurrencyid": {
+                    "description": "合约货币ID",
+                    "type": "integer"
+                },
+                "goodsgroupid": {
+                    "description": "所属商品组ID",
+                    "type": "integer"
+                },
+                "goodsid": {
+                    "description": "商品ID(自增ID SEQ_GOODS)",
+                    "type": "integer"
+                },
+                "goodsname": {
+                    "description": "商品名称",
+                    "type": "string"
+                },
+                "goodsquotetype": {
+                    "description": "合约报价类型: 1-直接报价  2-间接报价",
+                    "type": "integer"
+                },
+                "goodsstatus": {
+                    "description": "商品状态- 1:待审核 2:未上市 3:上市 4:已注销 5:审核拒绝 6:退市 7:待退市",
+                    "type": "integer"
+                },
+                "goodstradetype": {
+                    "description": "商品交易权限类型 - 1:可建可平 3:不可建可平",
+                    "type": "integer"
+                },
+                "goodunitid": {
+                    "description": "报价单位ID",
+                    "type": "integer"
+                },
+                "hasquoter": {
+                    "description": "是否有报价商 - 0:无报价商 1:有报价商",
+                    "type": "integer"
+                },
+                "hqprotecttime": {
+                    "description": "行情保护时间(秒)",
+                    "type": "integer"
+                },
+                "innerdealmode": {
+                    "description": "内部成交方式[通道交易] - 1:净头寸 2:开平 3:平今",
+                    "type": "integer"
+                },
+                "isbuylimited": {
+                    "description": "是否限制建仓量 - 0:不限制 1:限制",
+                    "type": "integer"
+                },
+                "isvisible": {
+                    "description": "游客是否可见 - 0:不可见 1:可见",
+                    "type": "integer"
+                },
+                "lasttradedate": {
+                    "description": "最后交易日期(状态:待退市)",
+                    "type": "string"
+                },
+                "listingdate": {
+                    "description": "交易开始日期",
+                    "type": "string"
+                },
+                "marketid": {
+                    "description": "所属市场ID",
+                    "type": "integer"
+                },
+                "modifierid": {
+                    "description": "修改人",
+                    "type": "integer"
+                },
+                "modifystatus": {
+                    "description": "变更状态 - 1:未变更 2:变更中 3:待审核 4:已审核",
+                    "type": "integer"
+                },
+                "modifytime": {
+                    "description": "修改时间",
+                    "type": "string"
+                },
+                "outerdealmode": {
+                    "description": "外部成交方式[通道交易]- 1:净头寸 2:开平 3:平今",
+                    "type": "integer"
+                },
+                "outgoodscode": {
+                    "description": "商品代码(外部)",
+                    "type": "string"
+                },
+                "pictureurl": {
+                    "description": "商品图片",
+                    "type": "string"
+                },
+                "qtydecimalplace": {
+                    "description": "成交量小数位",
+                    "type": "integer"
+                },
+                "quotegear": {
+                    "description": "行情档位(1-10)",
+                    "type": "integer"
+                },
+                "quoteminunit": {
+                    "description": "行情最小变动单位 [整数,报价小数位一起使用]",
+                    "type": "integer"
+                },
+                "quoteshowtype": {
+                    "description": "行情报价类型: 1:成交价 2:买卖中间价 3:含买价 4:含卖价做市模式固定为3:含买价",
+                    "type": "integer"
+                },
+                "quoteshowtypeinterval": {
+                    "description": "行情报价间隔时间(秒)(成交价时为0)",
+                    "type": "integer"
+                },
+                "remark": {
+                    "description": "备注",
+                    "type": "string"
+                },
+                "trademode": {
+                    "description": "交易模式 - 10:做市 13:竞价 15:通道交易 16:挂牌点选 17:仓单贸易 18:期权 19:竞拍-降价式 20:竞拍-竞价式 21:竞拍-大宗式 22:受托竞价",
+                    "type": "integer"
+                }
+            }
+        },
         "models.TradeHolderDetail": {
             "type": "object",
             "properties": {

+ 231 - 0
docs/swagger.json

@@ -21121,6 +21121,34 @@
                     }
                 }
             }
+        },
+        "/sbyj/GetTouristGoods": {
+            "get": {
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "水贝亿爵"
+                ],
+                "summary": "获取水贝亿爵游客商品列表",
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.TouristGoods"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
         }
     },
     "definitions": {
@@ -51069,6 +51097,209 @@
                 }
             }
         },
+        "models.TouristGoods": {
+            "type": "object",
+            "required": [
+                "goodscode",
+                "goodsid",
+                "goodsname",
+                "marketid"
+            ],
+            "properties": {
+                "agreeunit": {
+                    "description": "合约单位",
+                    "type": "number"
+                },
+                "areauserid": {
+                    "description": "所属机构",
+                    "type": "integer"
+                },
+                "auditaccountid": {
+                    "description": "审核操作员账号",
+                    "type": "integer"
+                },
+                "audittime": {
+                    "description": "审核时间",
+                    "type": "string"
+                },
+                "cancelaccountid": {
+                    "description": "注销操作员账号",
+                    "type": "integer"
+                },
+                "canceltime": {
+                    "description": "注销时间",
+                    "type": "string"
+                },
+                "closepricemode": {
+                    "description": "强平价格方式 - 1:市价 2:最新价 3:涨跌停(未实现)",
+                    "type": "integer"
+                },
+                "closepriceparam": {
+                    "description": "强平最新价浮动比例 - 方式为2时使用  (\u003c1)买 上浮 (1+x)*最新价卖 下浮 (1-x)*最新价",
+                    "type": "number"
+                },
+                "createtime": {
+                    "description": "创建时间",
+                    "type": "string"
+                },
+                "creatorid": {
+                    "description": "创建人",
+                    "type": "integer"
+                },
+                "currencyid": {
+                    "description": "报价货币ID",
+                    "type": "integer"
+                },
+                "cutmode": {
+                    "description": "斩仓方式 - 1:不斩仓 2:自动斩仓 3:半自动斩仓",
+                    "type": "integer"
+                },
+                "decimalplace": {
+                    "description": "报价小数位",
+                    "type": "integer"
+                },
+                "delistingdate": {
+                    "description": "商品退市时间(状态:退市) -- 已作废",
+                    "type": "string"
+                },
+                "delistingmode": {
+                    "description": "退市方式 - 1:退市平仓 2:退市交收 3:不处理(仅期权\\币币兑换)",
+                    "type": "integer"
+                },
+                "deliveryflag": {
+                    "description": "交割标志 - 0:不可交割  1:可交割",
+                    "type": "integer"
+                },
+                "forceclosemode": {
+                    "description": "定期强平方式 - 1:无 2:每日 3:每周 4:每月[收益权]",
+                    "type": "integer"
+                },
+                "forceclosevalue": {
+                    "description": "定期强平参数 [收益权]",
+                    "type": "integer"
+                },
+                "goodscode": {
+                    "description": "商品代码(内部)",
+                    "type": "string"
+                },
+                "goodscurrencyid": {
+                    "description": "合约货币ID",
+                    "type": "integer"
+                },
+                "goodsgroupid": {
+                    "description": "所属商品组ID",
+                    "type": "integer"
+                },
+                "goodsid": {
+                    "description": "商品ID(自增ID SEQ_GOODS)",
+                    "type": "integer"
+                },
+                "goodsname": {
+                    "description": "商品名称",
+                    "type": "string"
+                },
+                "goodsquotetype": {
+                    "description": "合约报价类型: 1-直接报价  2-间接报价",
+                    "type": "integer"
+                },
+                "goodsstatus": {
+                    "description": "商品状态- 1:待审核 2:未上市 3:上市 4:已注销 5:审核拒绝 6:退市 7:待退市",
+                    "type": "integer"
+                },
+                "goodstradetype": {
+                    "description": "商品交易权限类型 - 1:可建可平 3:不可建可平",
+                    "type": "integer"
+                },
+                "goodunitid": {
+                    "description": "报价单位ID",
+                    "type": "integer"
+                },
+                "hasquoter": {
+                    "description": "是否有报价商 - 0:无报价商 1:有报价商",
+                    "type": "integer"
+                },
+                "hqprotecttime": {
+                    "description": "行情保护时间(秒)",
+                    "type": "integer"
+                },
+                "innerdealmode": {
+                    "description": "内部成交方式[通道交易] - 1:净头寸 2:开平 3:平今",
+                    "type": "integer"
+                },
+                "isbuylimited": {
+                    "description": "是否限制建仓量 - 0:不限制 1:限制",
+                    "type": "integer"
+                },
+                "isvisible": {
+                    "description": "游客是否可见 - 0:不可见 1:可见",
+                    "type": "integer"
+                },
+                "lasttradedate": {
+                    "description": "最后交易日期(状态:待退市)",
+                    "type": "string"
+                },
+                "listingdate": {
+                    "description": "交易开始日期",
+                    "type": "string"
+                },
+                "marketid": {
+                    "description": "所属市场ID",
+                    "type": "integer"
+                },
+                "modifierid": {
+                    "description": "修改人",
+                    "type": "integer"
+                },
+                "modifystatus": {
+                    "description": "变更状态 - 1:未变更 2:变更中 3:待审核 4:已审核",
+                    "type": "integer"
+                },
+                "modifytime": {
+                    "description": "修改时间",
+                    "type": "string"
+                },
+                "outerdealmode": {
+                    "description": "外部成交方式[通道交易]- 1:净头寸 2:开平 3:平今",
+                    "type": "integer"
+                },
+                "outgoodscode": {
+                    "description": "商品代码(外部)",
+                    "type": "string"
+                },
+                "pictureurl": {
+                    "description": "商品图片",
+                    "type": "string"
+                },
+                "qtydecimalplace": {
+                    "description": "成交量小数位",
+                    "type": "integer"
+                },
+                "quotegear": {
+                    "description": "行情档位(1-10)",
+                    "type": "integer"
+                },
+                "quoteminunit": {
+                    "description": "行情最小变动单位 [整数,报价小数位一起使用]",
+                    "type": "integer"
+                },
+                "quoteshowtype": {
+                    "description": "行情报价类型: 1:成交价 2:买卖中间价 3:含买价 4:含卖价做市模式固定为3:含买价",
+                    "type": "integer"
+                },
+                "quoteshowtypeinterval": {
+                    "description": "行情报价间隔时间(秒)(成交价时为0)",
+                    "type": "integer"
+                },
+                "remark": {
+                    "description": "备注",
+                    "type": "string"
+                },
+                "trademode": {
+                    "description": "交易模式 - 10:做市 13:竞价 15:通道交易 16:挂牌点选 17:仓单贸易 18:期权 19:竞拍-降价式 20:竞拍-竞价式 21:竞拍-大宗式 22:受托竞价",
+                    "type": "integer"
+                }
+            }
+        },
         "models.TradeHolderDetail": {
             "type": "object",
             "properties": {

+ 171 - 0
docs/swagger.yaml

@@ -22221,6 +22221,159 @@ definitions:
         description: 转让价格(协议价格)
         type: number
     type: object
+  models.TouristGoods:
+    properties:
+      agreeunit:
+        description: 合约单位
+        type: number
+      areauserid:
+        description: 所属机构
+        type: integer
+      auditaccountid:
+        description: 审核操作员账号
+        type: integer
+      audittime:
+        description: 审核时间
+        type: string
+      cancelaccountid:
+        description: 注销操作员账号
+        type: integer
+      canceltime:
+        description: 注销时间
+        type: string
+      closepricemode:
+        description: 强平价格方式 - 1:市价 2:最新价 3:涨跌停(未实现)
+        type: integer
+      closepriceparam:
+        description: 强平最新价浮动比例 - 方式为2时使用  (<1)买 上浮 (1+x)*最新价卖 下浮 (1-x)*最新价
+        type: number
+      createtime:
+        description: 创建时间
+        type: string
+      creatorid:
+        description: 创建人
+        type: integer
+      currencyid:
+        description: 报价货币ID
+        type: integer
+      cutmode:
+        description: 斩仓方式 - 1:不斩仓 2:自动斩仓 3:半自动斩仓
+        type: integer
+      decimalplace:
+        description: 报价小数位
+        type: integer
+      delistingdate:
+        description: 商品退市时间(状态:退市) -- 已作废
+        type: string
+      delistingmode:
+        description: 退市方式 - 1:退市平仓 2:退市交收 3:不处理(仅期权\币币兑换)
+        type: integer
+      deliveryflag:
+        description: 交割标志 - 0:不可交割  1:可交割
+        type: integer
+      forceclosemode:
+        description: 定期强平方式 - 1:无 2:每日 3:每周 4:每月[收益权]
+        type: integer
+      forceclosevalue:
+        description: 定期强平参数 [收益权]
+        type: integer
+      goodscode:
+        description: 商品代码(内部)
+        type: string
+      goodscurrencyid:
+        description: 合约货币ID
+        type: integer
+      goodsgroupid:
+        description: 所属商品组ID
+        type: integer
+      goodsid:
+        description: 商品ID(自增ID SEQ_GOODS)
+        type: integer
+      goodsname:
+        description: 商品名称
+        type: string
+      goodsquotetype:
+        description: '合约报价类型: 1-直接报价  2-间接报价'
+        type: integer
+      goodsstatus:
+        description: 商品状态- 1:待审核 2:未上市 3:上市 4:已注销 5:审核拒绝 6:退市 7:待退市
+        type: integer
+      goodstradetype:
+        description: 商品交易权限类型 - 1:可建可平 3:不可建可平
+        type: integer
+      goodunitid:
+        description: 报价单位ID
+        type: integer
+      hasquoter:
+        description: 是否有报价商 - 0:无报价商 1:有报价商
+        type: integer
+      hqprotecttime:
+        description: 行情保护时间(秒)
+        type: integer
+      innerdealmode:
+        description: 内部成交方式[通道交易] - 1:净头寸 2:开平 3:平今
+        type: integer
+      isbuylimited:
+        description: 是否限制建仓量 - 0:不限制 1:限制
+        type: integer
+      isvisible:
+        description: 游客是否可见 - 0:不可见 1:可见
+        type: integer
+      lasttradedate:
+        description: 最后交易日期(状态:待退市)
+        type: string
+      listingdate:
+        description: 交易开始日期
+        type: string
+      marketid:
+        description: 所属市场ID
+        type: integer
+      modifierid:
+        description: 修改人
+        type: integer
+      modifystatus:
+        description: 变更状态 - 1:未变更 2:变更中 3:待审核 4:已审核
+        type: integer
+      modifytime:
+        description: 修改时间
+        type: string
+      outerdealmode:
+        description: 外部成交方式[通道交易]- 1:净头寸 2:开平 3:平今
+        type: integer
+      outgoodscode:
+        description: 商品代码(外部)
+        type: string
+      pictureurl:
+        description: 商品图片
+        type: string
+      qtydecimalplace:
+        description: 成交量小数位
+        type: integer
+      quotegear:
+        description: 行情档位(1-10)
+        type: integer
+      quoteminunit:
+        description: 行情最小变动单位 [整数,报价小数位一起使用]
+        type: integer
+      quoteshowtype:
+        description: '行情报价类型: 1:成交价 2:买卖中间价 3:含买价 4:含卖价做市模式固定为3:含买价'
+        type: integer
+      quoteshowtypeinterval:
+        description: 行情报价间隔时间(秒)(成交价时为0)
+        type: integer
+      remark:
+        description: 备注
+        type: string
+      trademode:
+        description: 交易模式 - 10:做市 13:竞价 15:通道交易 16:挂牌点选 17:仓单贸易 18:期权 19:竞拍-降价式 20:竞拍-竞价式
+          21:竞拍-大宗式 22:受托竞价
+        type: integer
+    required:
+    - goodscode
+    - goodsid
+    - goodsname
+    - marketid
+    type: object
   models.TradeHolderDetail:
     properties:
       accountid:
@@ -41935,6 +42088,24 @@ paths:
       summary: 获取中江出入金渠道显示列表
       tags:
       - 中江
+  /sbyj/GetTouristGoods:
+    get:
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.TouristGoods'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      summary: 获取水贝亿爵游客商品列表
+      tags:
+      - 水贝亿爵
 securityDefinitions:
   ApiKeyAuth:
     in: header

+ 70 - 0
models/sbyj.go

@@ -0,0 +1,70 @@
+package models
+
+import (
+	"mtp2_if/db"
+	"time"
+)
+
+type TouristGoods struct {
+	Goodsid               int64     `json:"goodsid"  xorm:"'GOODSID'" binding:"required"`          // 商品ID(自增ID SEQ_GOODS)
+	Goodscode             string    `json:"goodscode"  xorm:"'GOODSCODE'" binding:"required"`      // 商品代码(内部)
+	Goodsname             string    `json:"goodsname"  xorm:"'GOODSNAME'" binding:"required"`      // 商品名称
+	Marketid              int64     `json:"marketid"  xorm:"'MARKETID'" binding:"required"`        // 所属市场ID
+	Goodsgroupid          int64     `json:"goodsgroupid"  xorm:"'GOODSGROUPID'"`                   // 所属商品组ID
+	Goodsstatus           int64     `json:"goodsstatus"  xorm:"'GOODSSTATUS'"`                     // 商品状态- 1:待审核 2:未上市 3:上市 4:已注销 5:审核拒绝 6:退市 7:待退市
+	Currencyid            int64     `json:"currencyid"  xorm:"'CURRENCYID'"`                       // 报价货币ID
+	Goodunitid            int64     `json:"goodunitid"  xorm:"'GOODUNITID'"`                       // 报价单位ID
+	Agreeunit             float64   `json:"agreeunit"  xorm:"'AGREEUNIT'"`                         // 合约单位
+	Decimalplace          int64     `json:"decimalplace"  xorm:"'DECIMALPLACE'"`                   // 报价小数位
+	Listingdate           time.Time `json:"listingdate"  xorm:"'LISTINGDATE'"`                     // 交易开始日期
+	Lasttradedate         time.Time `json:"lasttradedate"  xorm:"'LASTTRADEDATE'"`                 // 最后交易日期(状态:待退市)
+	Delistingdate         time.Time `json:"delistingdate"  xorm:"'DELISTINGDATE'"`                 // 商品退市时间(状态:退市) -- 已作废
+	Deliveryflag          int64     `json:"deliveryflag"  xorm:"'DELIVERYFLAG'"`                   // 交割标志 - 0:不可交割  1:可交割
+	Hasquoter             int64     `json:"hasquoter"  xorm:"'HASQUOTER'"`                         // 是否有报价商 - 0:无报价商 1:有报价商
+	Hqprotecttime         int64     `json:"hqprotecttime"  xorm:"'HQPROTECTTIME'"`                 // 行情保护时间(秒)
+	Quoteshowtype         int64     `json:"quoteshowtype"  xorm:"'QUOTESHOWTYPE'"`                 // 行情报价类型: 1:成交价 2:买卖中间价 3:含买价 4:含卖价做市模式固定为3:含买价
+	Quoteshowtypeinterval int64     `json:"quoteshowtypeinterval"  xorm:"'QUOTESHOWTYPEINTERVAL'"` // 行情报价间隔时间(秒)(成交价时为0)
+	Modifystatus          int64     `json:"modifystatus"  xorm:"'MODIFYSTATUS'"`                   // 变更状态 - 1:未变更 2:变更中 3:待审核 4:已审核
+	Goodstradetype        int64     `json:"goodstradetype"  xorm:"'GOODSTRADETYPE'"`               // 商品交易权限类型 - 1:可建可平 3:不可建可平
+	Creatorid             int64     `json:"creatorid"  xorm:"'CREATORID'"`                         // 创建人
+	Createtime            time.Time `json:"createtime"  xorm:"'CREATETIME'"`                       // 创建时间
+	Auditaccountid        int64     `json:"auditaccountid"  xorm:"'AUDITACCOUNTID'"`               // 审核操作员账号
+	Audittime             time.Time `json:"audittime"  xorm:"'AUDITTIME'"`                         // 审核时间
+	Modifytime            time.Time `json:"modifytime"  xorm:"'MODIFYTIME'"`                       // 修改时间
+	Modifierid            int64     `json:"modifierid"  xorm:"'MODIFIERID'"`                       // 修改人
+	Cancelaccountid       int64     `json:"cancelaccountid"  xorm:"'CANCELACCOUNTID'"`             // 注销操作员账号
+	Remark                string    `json:"remark"  xorm:"'REMARK'"`                               // 备注
+	Canceltime            time.Time `json:"canceltime"  xorm:"'CANCELTIME'"`                       // 注销时间
+	Delistingmode         int64     `json:"delistingmode"  xorm:"'DELISTINGMODE'"`                 // 退市方式 - 1:退市平仓 2:退市交收 3:不处理(仅期权\币币兑换)
+	Forceclosemode        int64     `json:"forceclosemode"  xorm:"'FORCECLOSEMODE'"`               // 定期强平方式 - 1:无 2:每日 3:每周 4:每月[收益权]
+	Forceclosevalue       int64     `json:"forceclosevalue"  xorm:"'FORCECLOSEVALUE'"`             // 定期强平参数 [收益权]
+	Cutmode               int64     `json:"cutmode"  xorm:"'CUTMODE'"`                             // 斩仓方式 - 1:不斩仓 2:自动斩仓 3:半自动斩仓
+	Quoteminunit          int64     `json:"quoteminunit"  xorm:"'QUOTEMINUNIT'"`                   // 行情最小变动单位 [整数,报价小数位一起使用]
+	Isbuylimited          int64     `json:"isbuylimited"  xorm:"'ISBUYLIMITED'"`                   // 是否限制建仓量 - 0:不限制 1:限制
+	Innerdealmode         int64     `json:"innerdealmode"  xorm:"'INNERDEALMODE'"`                 // 内部成交方式[通道交易] - 1:净头寸 2:开平 3:平今
+	Outerdealmode         int64     `json:"outerdealmode"  xorm:"'OUTERDEALMODE'"`                 // 外部成交方式[通道交易]- 1:净头寸 2:开平 3:平今
+	Closepricemode        int64     `json:"closepricemode"  xorm:"'CLOSEPRICEMODE'"`               // 强平价格方式 - 1:市价 2:最新价 3:涨跌停(未实现)
+	Closepriceparam       float64   `json:"closepriceparam"  xorm:"'CLOSEPRICEPARAM'"`             // 强平最新价浮动比例 - 方式为2时使用  (<1)买 上浮 (1+x)*最新价卖 下浮 (1-x)*最新价
+	Qtydecimalplace       int64     `json:"qtydecimalplace"  xorm:"'QTYDECIMALPLACE'"`             // 成交量小数位
+	Goodscurrencyid       int64     `json:"goodscurrencyid"  xorm:"'GOODSCURRENCYID'"`             // 合约货币ID
+	Goodsquotetype        int64     `json:"goodsquotetype"  xorm:"'GOODSQUOTETYPE'"`               // 合约报价类型: 1-直接报价  2-间接报价
+	Quotegear             int64     `json:"quotegear"  xorm:"'QUOTEGEAR'"`                         // 行情档位(1-10)
+	Outgoodscode          string    `json:"outgoodscode"  xorm:"'OUTGOODSCODE'"`                   // 商品代码(外部)
+	Isvisible             int32     `json:"isvisible"  xorm:"ISVISIBLE"`                           // 游客是否可见 - 0:不可见 1:可见
+	Areauserid            int64     `json:"areauserid"  xorm:"AREAUSERID"`                         // 所属机构
+	Pictureurl            string    `json:"pictureurl"  xorm:"PICTUREURL"`                         // 商品图片
+
+	Trademode int32 `json:"trademode"  xorm:"'TRADEMODE'"` // 交易模式 - 10:做市 13:竞价 15:通道交易 16:挂牌点选 17:仓单贸易 18:期权 19:竞拍-降价式 20:竞拍-竞价式 21:竞拍-大宗式 22:受托竞价
+}
+
+func GetTouristGoods(tradeModes []int) (goods []TouristGoods, err error) {
+	goods = make([]TouristGoods, 0)
+	session := db.GetEngine().Table("GOODS G").
+		Select("G.*, M.TRADEMODE").
+		Join("LEFT", "MARKET M", "M.MARKETID = G.MARKETID").
+		Where("G.GOODSSTATUS in (3, 7)").In("M.TRADEMODE", tradeModes).OrderBy("G.GOODSCODE")
+
+	err = session.Find(&goods)
+
+	return
+}

+ 8 - 0
routers/router.go

@@ -22,6 +22,7 @@ import (
 	"mtp2_if/controllers/qhj"
 	"mtp2_if/controllers/qhjPCWeb"
 	"mtp2_if/controllers/quote"
+	"mtp2_if/controllers/sbyj"
 	"mtp2_if/controllers/search"
 	"mtp2_if/controllers/szdz"
 	"mtp2_if/controllers/taaccount"
@@ -775,6 +776,13 @@ func InitRouter() *gin.Engine {
 		mineR.Use(token.Auth()).GET("QueryMineTradeGoodsDeliveryOfflines", mine.QueryMineTradeGoodsDeliveryOfflines)
 	}
 
+	// ************************* 水贝亿爵 *************************
+	sbyjR := apiR.Group("sbyj")
+	sbyjR.Use()
+	{
+		sbyjR.Use().GET("GetTouristGoods", sbyj.GetTouristGoods)
+	}
+
 	return r
 }