From b0c07ddee23e2d54d03636f08af19f0934857cf4 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期五, 25 八月 2023 10:32:56 +0800
Subject: [PATCH] Merge branch 'hotfix'
---
api/v1/region.go | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/api/v1/region.go b/api/v1/region.go
index 2e123c2..df63a21 100644
--- a/api/v1/region.go
+++ b/api/v1/region.go
@@ -13,6 +13,7 @@
type RegionApi struct{}
// Add
+//
// @Tags Region
// @Summary 娣诲姞鍦板尯
// @Produce application/json
@@ -39,6 +40,7 @@
}
// Set
+//
// @Tags Region
// @Summary 璁剧疆鍦板尯
// @Produce application/json
@@ -62,6 +64,7 @@
}
// Delete
+//
// @Tags Region
// @Summary 鍒犻櫎鍦板尯
// @Produce application/json
@@ -86,6 +89,7 @@
}
// Update
+//
// @Tags Region
// @Summary 鏇存柊鍦板尯
// @Produce application/json
@@ -109,10 +113,12 @@
}
// List
+//
// @Tags Region
// @Summary 鍦板尯鍒楄〃
// @Produce application/json
-// @Success 200 {object} contextx.Response{}
+// @Param city_id query int true "鍩庡競ID"
+// @Success 200 {object} contextx.Response{}
// @Router /api/region/list [get]
func (r *RegionApi) List(c *gin.Context) {
ctx, ok := contextx.NewContext(c, nil)
@@ -120,7 +126,8 @@
return
}
- regionList, errCode := regionService.ListRegions()
+ cityId, _ := strconv.Atoi(c.Query("city_id"))
+ regionList, errCode := regionService.ListRegions(cityId)
if errCode != ecode.OK {
ctx.Fail(errCode)
return
--
Gitblit v1.8.0