浏览代码

[新会陈皮]
1.查询轮播增加过滤条件和字段
2.查询现货商品详细增加字段

zou.yingbin 3 年之前
父节点
当前提交
976415ddb1
共有 6 个文件被更改,包括 66 次插入51 次删除
  1. 1 1
      controllers/common/common.go
  2. 24 16
      docs/docs.go
  3. 13 11
      docs/swagger.json
  4. 12 10
      docs/swagger.yaml
  5. 14 13
      models/common.go
  6. 2 0
      models/ermcp3.go

+ 1 - 1
controllers/common/common.go

@@ -132,7 +132,7 @@ type QueryImageConfigsRsp struct {
 // @Summary 查询轮播图配置信息
 // @Produce json
 // @Param userId query int false "用户id"
-// @Param imageType query int false "类型 - 1:App首页轮播 2:我的"
+// @Param imageType query int false "类型 - 1:App首页轮播 2:我的 3:首页(PC) 4:首页推广(移动-新会)"
 // @Success 200 {object} QueryImageConfigsRsp
 // @Failure 500 {object} app.Response
 // @Router /Common/QueryImageConfigs [get]

+ 24 - 16
docs/docs.go

@@ -1,14 +1,13 @@
-// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
+// Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
 // This file was generated by swaggo/swag
-
 package docs
 
 import (
 	"bytes"
 	"encoding/json"
 	"strings"
+	"text/template"
 
-	"github.com/alecthomas/template"
 	"github.com/swaggo/swag"
 )
 
@@ -16,7 +15,7 @@ var doc = `{
     "schemes": {{ marshal .Schemes }},
     "swagger": "2.0",
     "info": {
-        "description": "{{.Description}}",
+        "description": "{{escape .Description}}",
         "title": "{{.Title}}",
         "termsOfService": "http://www.muchinfo.cn",
         "contact": {},
@@ -652,7 +651,7 @@ var doc = `{
                     },
                     {
                         "type": "integer",
-                        "description": "类型 - 1:App首页轮播 2:我的",
+                        "description": "类型 - 1:App首页轮播 2:我的 3:首页(PC) 4:首页推广(移动-新会)",
                         "name": "imageType",
                         "in": "query"
                     }
@@ -14192,9 +14191,7 @@ var doc = `{
                 "code": {
                     "type": "integer"
                 },
-                "data": {
-                    "type": "object"
-                },
+                "data": {},
                 "msg": {
                     "type": "string"
                 },
@@ -17270,31 +17267,31 @@ var doc = `{
                     "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": {
@@ -37396,6 +37393,10 @@ var doc = `{
         "models.XHWrstandard": {
             "type": "object",
             "properties": {
+                "bannerpicurl": {
+                    "description": "banner图",
+                    "type": "string"
+                },
                 "deliverygoodsid": {
                     "description": "品种ID",
                     "type": "integer"
@@ -40107,6 +40108,13 @@ func (s *s) ReadDoc() string {
 			a, _ := json.Marshal(v)
 			return string(a)
 		},
+		"escape": func(v interface{}) string {
+			// escape tabs
+			str := strings.Replace(v.(string), "\t", "\\t", -1)
+			// replace " with \", and if that results in \\", replace that with \\\"
+			str = strings.Replace(str, "\"", "\\\"", -1)
+			return strings.Replace(str, "\\\\\"", "\\\\\\\"", -1)
+		},
 	}).Parse(doc)
 	if err != nil {
 		return doc
@@ -40121,5 +40129,5 @@ func (s *s) ReadDoc() string {
 }
 
 func init() {
-	swag.Register(swag.Name, &s{})
+	swag.Register("swagger", &s{})
 }

+ 13 - 11
docs/swagger.json

@@ -636,7 +636,7 @@
                     },
                     {
                         "type": "integer",
-                        "description": "类型 - 1:App首页轮播 2:我的",
+                        "description": "类型 - 1:App首页轮播 2:我的 3:首页(PC) 4:首页推广(移动-新会)",
                         "name": "imageType",
                         "in": "query"
                     }
@@ -14176,9 +14176,7 @@
                 "code": {
                     "type": "integer"
                 },
-                "data": {
-                    "type": "object"
-                },
+                "data": {},
                 "msg": {
                     "type": "string"
                 },
@@ -17254,31 +17252,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": {
@@ -37380,6 +37378,10 @@
         "models.XHWrstandard": {
             "type": "object",
             "properties": {
+                "bannerpicurl": {
+                    "description": "banner图",
+                    "type": "string"
+                },
                 "deliverygoodsid": {
                     "description": "品种ID",
                     "type": "integer"

+ 12 - 10
docs/swagger.yaml

@@ -4,8 +4,7 @@ definitions:
     properties:
       code:
         type: integer
-      data:
-        type: object
+      data: {}
       msg:
         type: string
       page:
@@ -2293,25 +2292,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: 单位名称
@@ -17300,6 +17299,9 @@ definitions:
     type: object
   models.XHWrstandard:
     properties:
+      bannerpicurl:
+        description: banner图
+        type: string
       deliverygoodsid:
         description: 品种ID
         type: integer
@@ -19730,7 +19732,7 @@ paths:
         in: query
         name: userId
         type: integer
-      - description: 类型 - 1:App首页轮播 2:我的
+      - description: 类型 - 1:App首页轮播 2:我的 3:首页(PC) 4:首页推广(移动-新会)
         in: query
         name: imageType
         type: integer

+ 14 - 13
models/common.go

@@ -197,19 +197,20 @@ func (Division) TableName() string {
 
 // Szdz2imageconfig 终端图片配置  - 通用功能
 type Szdz2imageconfig struct {
-	Configid   int64     `json:"configid"  xorm:"'CONFIGID'" binding:"required"` // 配置ID(SEQ_SZDZ2_IMAGECONFIG)
-	Imagetype  int32     `json:"imagetype"  xorm:"'IMAGETYPE'"`                  // 类型 - 1:首页轮播(移动) 2:我的(移动)
-	Title      string    `json:"title"  xorm:"'TITLE'"`                          // 标题
-	Imagepath  string    `json:"imagepath"  xorm:"'IMAGEPATH'"`                  // 图片
-	URL        string    `json:"url"  xorm:"'URL'"`                              // 链接(地址或商品ID)
-	Sort       int64     `json:"sort"  xorm:"'SORT'"`                            // 排序
-	Isshow     int32     `json:"isshow"  xorm:"'ISSHOW'"`                        // 是否展示 - 0:不展示 1:展示
-	Createdate time.Time `json:"createdate"  xorm:"'CREATEDATE'"`                // 创建时间
-	Creatorid  int64     `json:"creatorid"  xorm:"'CREATORID'"`                  // 创建人
-	Updatedate time.Time `json:"updatedate"  xorm:"'UPDATEDATE'"`                // 修改时间
-	Modifierid int64     `json:"modifierid"  xorm:"'MODIFIERID'"`                // 操作人
-	Areauserid int64     `json:"areauserid"  xorm:"'AREAUSERID'"`                // 所属机构ID
-	Urltype    int32     `json:"urltype"  xorm:"'URLTYPE'"`                      // 链接类型 - 1:直接地址 2:商品ID
+	Configid        int64     `json:"configid"  xorm:"'CONFIGID'" binding:"required"` // 配置ID(SEQ_SZDZ2_IMAGECONFIG)
+	Imagetype       int32     `json:"imagetype"  xorm:"'IMAGETYPE'"`                  // 类型 - 1:首页轮播(移动) 2:我的(移动)
+	Title           string    `json:"title"  xorm:"'TITLE'"`                          // 标题
+	Imagepath       string    `json:"imagepath"  xorm:"'IMAGEPATH'"`                  // 图片
+	URL             string    `json:"url"  xorm:"'URL'"`                              // 链接(地址或商品ID)
+	Sort            int64     `json:"sort"  xorm:"'SORT'"`                            // 排序
+	Isshow          int32     `json:"isshow"  xorm:"'ISSHOW'"`                        // 是否展示 - 0:不展示 1:展示
+	Createdate      time.Time `json:"createdate"  xorm:"'CREATEDATE'"`                // 创建时间
+	Creatorid       int64     `json:"creatorid"  xorm:"'CREATORID'"`                  // 创建人
+	Updatedate      time.Time `json:"updatedate"  xorm:"'UPDATEDATE'"`                // 修改时间
+	Modifierid      int64     `json:"modifierid"  xorm:"'MODIFIERID'"`                // 操作人
+	Areauserid      int64     `json:"areauserid"  xorm:"'AREAUSERID'"`                // 所属机构ID
+	Urltype         int32     `json:"urltype"  xorm:"'URLTYPE'"`                      // 链接类型 - 1:直接地址 2:商品ID
+	IMAGEDETAILPATH string    `json:"imagedetailpath"  xorm:"'IMAGEDETAILPATH'"`      // 详情图片 [UrlType = 3时 有且必填,其它类型不需要]
 }
 
 // TableName is SZDZ2_IMAGECONFIG

+ 2 - 0
models/ermcp3.go

@@ -2625,6 +2625,7 @@ type XHWrstandard struct {
 	UNITID          int64   `json:"unitid"  xorm:"'UNITID'"`                                          // 单位id
 	THUMURLS        string  `json:"thumurls"  xorm:"'THUMURLS'"`                                      // 缩略图片(1:1)(逗号分隔)
 	PICTUREURLS     string  `json:"pictureurls"  xorm:"'PICTUREURLS'"`                                // 详情图片(逗号分隔)
+	BANNERPICURL    string  `json:"bannerpicurl"  xorm:"'BANNERPICURL'"`                              // banner图
 
 	MGLST []XHMiddleGoods `json:"mglst"` // 套保品列表
 }
@@ -2646,6 +2647,7 @@ select t.areauserid,
        t.unitid,
        t.thumurls,
        t.pictureurls,
+       t.bannerpicurl,
        e.enumdicname
   from wrstandard t
   left join enumdicitem e