()
| 841 | } |
| 842 | |
| 843 | func (this *ManagerController) UpdateAds() { |
| 844 | id, _ := this.GetInt("id") |
| 845 | field := this.GetString("field") |
| 846 | value := this.GetString("value") |
| 847 | if field == "" { |
| 848 | this.JsonResult(1, "字段不能为空") |
| 849 | } |
| 850 | _, err := orm.NewOrm().QueryTable(models.NewAdsCont()).Filter("id", id).Update(orm.Params{field: value}) |
| 851 | if err != nil { |
| 852 | this.JsonResult(1, err.Error()) |
| 853 | } |
| 854 | go models.UpdateAdsCache() |
| 855 | this.JsonResult(0, "操作成功") |
| 856 | } |
| 857 | |
| 858 | func (this *ManagerController) DelAds() { |
| 859 | id, _ := this.GetInt("id") |
nothing calls this directly
no test coverage detected