更新分类字段内容
()
| 968 | |
| 969 | // 更新分类字段内容 |
| 970 | func (this *ManagerController) UpdateCate() { |
| 971 | field := this.GetString("field") |
| 972 | val := this.GetString("value") |
| 973 | id, _ := this.GetInt("id") |
| 974 | if err := new(models.Category).UpdateByField(id, field, val); err != nil { |
| 975 | this.JsonResult(1, "更新失败:"+err.Error()) |
| 976 | } |
| 977 | this.JsonResult(0, "更新成功") |
| 978 | } |
| 979 | |
| 980 | // 删除分类 |
| 981 | func (this *ManagerController) DelCate() { |
nothing calls this directly
no test coverage detected