zhou.xiaoning 2 anos atrás
pai
commit
0095600ec0

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

+ 3 - 15
controllers/sbyj/goods.go

@@ -10,15 +10,10 @@ import (
 	"github.com/gin-gonic/gin"
 )
 
-type GetTouristGoodsRsp struct {
-	TradeGoods     []models.TouristGoods // 交易商品列表
-	ReferenceGoods []models.TouristGoods // 参考商品列表
-}
-
 // GetTouristGoods 获取水贝亿爵游客商品列表
 // @Summary 获取水贝亿爵游客商品列表
 // @Produce json
-// @Success 200 {object} GetTouristGoodsRsp
+// @Success 200 {array}  models.TouristGoods
 // @Failure 500 {object} app.Response
 // @Router  /sbyj/GetTouristGoods [get]
 // @Tags    水贝亿爵
@@ -26,14 +21,7 @@ func GetTouristGoods(c *gin.Context) {
 	appG := app.Gin{C: c}
 
 	// 获取数据
-	tradeGoods, err := models.GetTouristGoods([]int{52})
-	if err != nil {
-		// 查询失败
-		logger.GetLogger().Errorf("GetTouristGoods failed: %s", err.Error())
-		appG.Response(http.StatusBadRequest, e.ERROR_QUERY_FAIL, nil)
-		return
-	}
-	referenceGoods, err := models.GetTouristGoods([]int{99})
+	goodses, err := models.GetTouristGoods([]int{52, 99})
 	if err != nil {
 		// 查询失败
 		logger.GetLogger().Errorf("GetTouristGoods failed: %s", err.Error())
@@ -42,5 +30,5 @@ func GetTouristGoods(c *gin.Context) {
 	}
 
 	// 查询成功返回
-	appG.Response(http.StatusOK, e.SUCCESS, GetTouristGoodsRsp{TradeGoods: tradeGoods, ReferenceGoods: referenceGoods})
+	appG.Response(http.StatusOK, e.SUCCESS, goodses)
 }

+ 4 - 20
docs/docs.go

@@ -21144,7 +21144,10 @@ const docTemplate = `{
                     "200": {
                         "description": "OK",
                         "schema": {
-                            "$ref": "#/definitions/sbyj.GetTouristGoodsRsp"
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.TouristGoods"
+                            }
                         }
                     },
                     "500": {
@@ -59019,25 +59022,6 @@ const docTemplate = `{
                 }
             }
         },
-        "sbyj.GetTouristGoodsRsp": {
-            "type": "object",
-            "properties": {
-                "referenceGoods": {
-                    "description": "参考商品列表",
-                    "type": "array",
-                    "items": {
-                        "$ref": "#/definitions/models.TouristGoods"
-                    }
-                },
-                "tradeGoods": {
-                    "description": "交易商品列表",
-                    "type": "array",
-                    "items": {
-                        "$ref": "#/definitions/models.TouristGoods"
-                    }
-                }
-            }
-        },
         "szdz.QueryConvertLogRsp": {
             "type": "object",
             "required": [

+ 4 - 20
docs/swagger.json

@@ -21135,7 +21135,10 @@
                     "200": {
                         "description": "OK",
                         "schema": {
-                            "$ref": "#/definitions/sbyj.GetTouristGoodsRsp"
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.TouristGoods"
+                            }
                         }
                     },
                     "500": {
@@ -59010,25 +59013,6 @@
                 }
             }
         },
-        "sbyj.GetTouristGoodsRsp": {
-            "type": "object",
-            "properties": {
-                "referenceGoods": {
-                    "description": "参考商品列表",
-                    "type": "array",
-                    "items": {
-                        "$ref": "#/definitions/models.TouristGoods"
-                    }
-                },
-                "tradeGoods": {
-                    "description": "交易商品列表",
-                    "type": "array",
-                    "items": {
-                        "$ref": "#/definitions/models.TouristGoods"
-                    }
-                }
-            }
-        },
         "szdz.QueryConvertLogRsp": {
             "type": "object",
             "required": [

+ 3 - 14
docs/swagger.yaml

@@ -28164,19 +28164,6 @@ definitions:
         description: 交易日归属 - 0:星期天、1:星期一、2:星期二、3:星期三、4:星期四、5:星期五、6:星期六
         type: integer
     type: object
-  sbyj.GetTouristGoodsRsp:
-    properties:
-      referenceGoods:
-        description: 参考商品列表
-        items:
-          $ref: '#/definitions/models.TouristGoods'
-        type: array
-      tradeGoods:
-        description: 交易商品列表
-        items:
-          $ref: '#/definitions/models.TouristGoods'
-        type: array
-    type: object
   szdz.QueryConvertLogRsp:
     properties:
       accountid:
@@ -42087,7 +42074,9 @@ paths:
         "200":
           description: OK
           schema:
-            $ref: '#/definitions/sbyj.GetTouristGoodsRsp'
+            items:
+              $ref: '#/definitions/models.TouristGoods'
+            type: array
         "500":
           description: Internal Server Error
           schema: