MCPcopy Create free account
hub / github.com/TruthHun/DocHub / GetTitleById

Method GetTitleById

models/CategoryModel.go:40–43  ·  view source on GitHub ↗

根据传递过来的id从分类表中查询标题 @param id 主键id @return title 返回查询的标题名称

(id interface{})

Source from the content-addressed store, hash-verified

38//@param id 主键id
39//@return title 返回查询的标题名称
40func (this *Category) GetTitleById(id interface{}) (title string) {
41 orm.NewOrm().QueryTable(GetTableCategory()).Filter("Id", id).One(this, "Title")
42 return this.Title
43}
44
45//根据id删除分类
46//@param id 需要删除的分类id

Callers

nothing calls this directly

Calls 2

GetTableCategoryFunction · 0.85
OneMethod · 0.80

Tested by

no test coverage detected