fix
wangpengfei
2023-07-18 d9ec14b9adf6e90309d763e3b3b1b0f22773f8da
api/v1/province.go
@@ -13,6 +13,7 @@
type ProvinceApi struct{}
// Add
//
//   @Tags      Province
//   @Summary   添加省份
//   @Produce   application/json
@@ -39,6 +40,7 @@
}
// Update
//
//   @Tags      Province
//   @Summary   更新省份
//   @Produce   application/json
@@ -62,10 +64,12 @@
}
// List
//
//   @Tags      Province
//   @Summary   获取省份列表
//   @Produce   application/json
//   @Success   200   {object}   contextx.Response{data=response.ProvinceResponse}
//   @Param      country_id   query      int   true   "国家ID"
//   @Success   200         {object}   contextx.Response{data=response.ProvinceResponse}
//   @Router      /api/province/list [get]
func (p *ProvinceApi) List(c *gin.Context) {
   ctx, ok := contextx.NewContext(c, nil)
@@ -73,7 +77,8 @@
      return
   }
   provinces, errCode := provinceService.GetProvinces()
   countryId, _ := strconv.Atoi(c.Query("country_id"))
   provinces, errCode := provinceService.GetProvinces(countryId)
   if errCode != ecode.OK {
      ctx.Fail(errCode)
      return
@@ -85,6 +90,7 @@
}
// Set
//
//   @Tags      Province
//   @Summary   设置省份
//   @Produce   application/json
@@ -108,6 +114,7 @@
}
// Delete
//
//   @Tags      Province
//   @Summary   删除省份
//   @Produce   application/json