fix
wangpengfei
2023-08-18 9a7e0a7da01a9f9625ceaca0c61a59c540c6438f
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