liuxiaolong
2019-07-03 4017349920b546f42460cedb8a63be8d03b12774
controllers/area.go
@@ -87,7 +87,7 @@
// @Param area body controllers.AreaVo true "区域结构"
// @Success 200 {string} json "{"code":200, data:"",msg:"请求成功", success:true}"
// @Failure 200 {string} json "{"code":"错误码", data:"出错信息",msg:"请求失败", success:false}"
// @Router /data/api-v/area/update/{id} [put]
// @Router /data/api-v/area/update [post]
func (ac AreaController) AreaUpdate(c *gin.Context) {
   var api dbapi.AreaApi
   var model AreaVo
@@ -112,13 +112,13 @@
// @Param id query int true "当前id"
// @Success 200 {string} json "{"code":200, data:"删除的区域信息",msg:"请求成功", success:true}"
// @Failure 200 {string} json "{"code":"错误码", data:"出错信息",msg:"请求失败", success:false}"
// @Router /data/api-v/area/del [get]
// @Router /data/api-v/area/del [post]
func (ac AreaController) AreaDelete(c *gin.Context) {
   var api dbapi.AreaApi
   id := c.Query("id")
   id := c.PostForm("id")
   areaId, err := strconv.Atoi(id)
   if err != nil {
      util.ResponseFormat(c, code.ComError, "传入非整形无法解析")
      util.ResponseFormat(c, code.ComError, "参数有误")
      return
   }