Pārlūkot izejas kodu

/sbyj/GetTouristGoods 接口增加goodsorder出参

zhou.xiaoning 1 gadu atpakaļ
vecāks
revīzija
076e50fd65
6 mainītis faili ar 25 papildinājumiem un 11 dzēšanām
  1. 6 6
      config/config.xml
  2. 4 4
      controllers/guangzuan/tradeService.go
  3. 4 0
      docs/docs.go
  4. 4 0
      docs/swagger.json
  5. 3 0
      docs/swagger.yaml
  6. 4 1
      models/sbyj.go

+ 6 - 6
config/config.xml

@@ -13,11 +13,11 @@
     <DbAddress value="192.168.31.88"/>
     <DbName value="orcl"/>
     <DbPort value="1521"/>
-    <DbUser value="mtp2_test175"/>
+    <DbUser value="mtp2_test171"/>
     <DbPwd value="muchinfo"/>
   </DbSetting>
   <RedisSetting>
-    <Address value="192.168.31.175"/>
+    <Address value="192.168.31.171"/>
     <Port value="5007"/>
     <Timeout value="3"/>
     <ConnNum value="1"/>
@@ -25,11 +25,11 @@
     <Pwd value=""/>
   </RedisSetting>
   <MqSetting>
-    <Url value="amqp://guest:guest@192.168.31.175:5020/test"/>
+    <Url value="amqp://guest:guest@192.168.31.171:5020/test"/>
     <Exchange value="entry"/>
   </MqSetting>
   <MongoDBSetting>
-    <HostName value="192.168.31.175"/>
+    <HostName value="192.168.31.171"/>
     <Port value="5025"/>
     <DBName value="HistoryQuote"/>
     <Username value="quote_test01"/>
@@ -38,8 +38,8 @@
   <MySQLSetting>
     <Host value="192.168.30.72"/>
     <Port value="3306"/>
-    <DBName value="historyquote_test175"/>
-    <Username value="quote_test175"/>
+    <DBName value="historyquote_test171"/>
+    <Username value="quote_test171"/>
     <Password value="123456"/>
   </MySQLSetting>
   <Tencent>

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

+ 4 - 0
docs/docs.go

@@ -56498,6 +56498,10 @@ const docTemplate = `{
                     "description": "商品名称",
                     "type": "string"
                 },
+                "goodsorder": {
+                    "description": "商品显示顺序(99)",
+                    "type": "string"
+                },
                 "goodsquotetype": {
                     "description": "合约报价类型: 1-直接报价  2-间接报价",
                     "type": "integer"

+ 4 - 0
docs/swagger.json

@@ -56489,6 +56489,10 @@
                     "description": "商品名称",
                     "type": "string"
                 },
+                "goodsorder": {
+                    "description": "商品显示顺序(99)",
+                    "type": "string"
+                },
                 "goodsquotetype": {
                     "description": "合约报价类型: 1-直接报价  2-间接报价",
                     "type": "integer"

+ 3 - 0
docs/swagger.yaml

@@ -24475,6 +24475,9 @@ definitions:
       goodsname:
         description: 商品名称
         type: string
+      goodsorder:
+        description: 商品显示顺序(99)
+        type: string
       goodsquotetype:
         description: '合约报价类型: 1-直接报价  2-间接报价'
         type: integer

+ 4 - 1
models/sbyj.go

@@ -64,13 +64,16 @@ type TouristGoods struct {
 	Pictureurl            string    `json:"pictureurl"  xorm:"PICTUREURL"`                         // 商品图片
 
 	Trademode int32 `json:"trademode"  xorm:"'TRADEMODE'"` // 交易模式 - 10:做市 13:竞价 15:通道交易 16:挂牌点选 17:仓单贸易 18:期权 19:竞拍-降价式 20:竞拍-竞价式 21:竞拍-大宗式 22:受托竞价
+
+	GOODSORDER string `json:"goodsorder" xorm:"GOODSORDER"` // 商品显示顺序(99)
 }
 
 func GetTouristGoods(tradeModes []int) (goods []TouristGoods, err error) {
 	goods = make([]TouristGoods, 0)
 	session := db.GetEngine().Table("GOODS G").
-		Select("G.*, M.TRADEMODE").
+		Select("G.*, M.TRADEMODE, E.GOODSORDER").
 		Join("LEFT", "MARKET M", "M.MARKETID = G.MARKETID").
+		Join("LEFT", "GOODSEX E", "E.GOODSID = G.GOODSID").
 		Where("G.GOODSSTATUS in (3, 7)").In("M.TRADEMODE", tradeModes).OrderBy("G.GOODSCODE")
 
 	err = session.Find(&goods)