MCPcopy Index your code
hub / github.com/TruthHun/DocHub / GetCateByCid

Method GetCateByCid

controllers/AdminControllers/DocController.go:132–144  ·  view source on GitHub ↗

根据频道获取下一级分类

()

Source from the content-addressed store, hash-verified

130
131//根据频道获取下一级分类
132func (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//新增文档分类
147func (this *DocController) AddCate() {

Callers

nothing calls this directly

Calls 1

ResponseJsonMethod · 0.45

Tested by

no test coverage detected