| | |
| | | Id string `json:"id"` |
| | | ParentId string `json:"parentId"` |
| | | Name string `json:"name"` |
| | | Alias string `json:"alias"` |
| | | } |
| | | |
| | | // @Summary 显示树形结构 |
| | |
| | | // @Description 添加目录上区域 |
| | | // @Produce json |
| | | // @Tags menu |
| | | // @Param name query string true "区域名字" |
| | | // @Param parentId query int true "上一级父id" |
| | | // @Param name formData string true "区域名字" |
| | | // @Param parentId formData string 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/add [post] |
| | |
| | | // @Accept json |
| | | // @Produce json |
| | | // @Tags menu |
| | | // @Param id query int true "区域id" |
| | | // @Param name query string true "区域名字" |
| | | // @Param parentId query int true "上一级父id" |
| | | // @Param id formData string true "区域id" |
| | | // @Param name formData string true "区域名字" |
| | | // @Param parentId formData string true "上一级父id" |
| | | // @Param alias formData string false "备注名称" |
| | | // @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 [post] |
| | |
| | | util.ResponseFormat(c, code.RequestParamError, "parentId参数错误") |
| | | return |
| | | } |
| | | alias := c.PostForm("alias") |
| | | var model = AreaVo{ |
| | | Id:id, |
| | | ParentId:parentId, |
| | | Name:name, |
| | | Alias: alias, |
| | | } |
| | | paramBody := util.Struct2Map(model) |
| | | var api dbapi.AreaApi |
| | |
| | | // @Description 点击删除按钮时删除一个区域 |
| | | // @Produce json |
| | | // @Tags menu |
| | | // @Param id query int true "当前id" |
| | | // @Param id formData string 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 [post] |