From 7f8a45a749419c3da5b81c4683f0b8034f5280f3 Mon Sep 17 00:00:00 2001
From: wangpengfei <274878379@qq.com>
Date: 星期二, 25 七月 2023 15:20:09 +0800
Subject: [PATCH] fix
---
api/v1/city.go | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/api/v1/city.go b/api/v1/city.go
index 724b032..c7ef526 100644
--- a/api/v1/city.go
+++ b/api/v1/city.go
@@ -70,12 +70,12 @@
// List
//
-// @Tags City
-// @Summary 鑾峰彇鍩庡競鍒楄〃
-// @Produce application/json
-// @Param provinceId query int false "鐪佷唤ID"
-// @Success 200 {object} contextx.Response{data=response.CityResponse} "鎴愬姛"
-// @Router /api/city/list [get]
+// @Tags City
+// @Summary 鑾峰彇鍩庡競鍒楄〃
+// @Produce application/json
+// @Param province_id query int false "鐪佷唤ID"
+// @Success 200 {object} contextx.Response{data=response.CityResponse} "鎴愬姛"
+// @Router /api/city/list [get]
func (ci *CityApi) List(c *gin.Context) {
ctx, ok := contextx.NewContext(c, nil)
if !ok {
@@ -83,7 +83,7 @@
}
// 鑾峰彇鐪佷唤ID
- provinceId, _ := strconv.Atoi(c.Query("provinceId"))
+ provinceId, _ := strconv.Atoi(c.Query("province_id"))
cities, errCode := cityService.ListCities(provinceId)
if errCode != ecode.OK {
ctx.Fail(errCode)
--
Gitblit v1.8.0