根据频道获取下一级分类
()
| 130 | |
| 131 | //根据频道获取下一级分类 |
| 132 | func (this *DocController) GetCateByCid() { |
| 133 | cid, _ := this.GetInt("Cid") |
| 134 | if cid > 0 { |
| 135 | if data, _, err := models.GetList(models.GetTableCategory(), 1, 100, orm.NewCondition().And("Pid", cid).And("Status", 1), "sort", "-id"); err != nil { |
| 136 | this.ResponseJson(false, err.Error()) |
| 137 | } else { |
| 138 | this.ResponseJson(true, "数据获取成功", data) |
| 139 | } |
| 140 | } else { |
| 141 | this.ResponseJson(false, "频道ID参数不正确,必须大于0") |
| 142 | } |
| 143 | |
| 144 | } |
| 145 | |
| 146 | //新增文档分类 |
| 147 | func (this *DocController) AddCate() { |
nothing calls this directly
no test coverage detected