|
@@ -27,6 +27,14 @@ func AddCygxTag(item *CygxTag) (id int64, err error) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+// 通过ID获取分类详情
|
|
|
+func GetCygxTagInfoById(tagId int) (item *CygxTagList, err error) {
|
|
|
+ o := orm.NewOrm()
|
|
|
+ sql := `SELECT * FROM cygx_tag WHERE tag_id=?`
|
|
|
+ err = o.Raw(sql, tagId).QueryRow(&item)
|
|
|
+ return
|
|
|
+}
|
|
|
+
|
|
|
func (m *CygxTag) Update(cols []string) (err error) {
|
|
|
o := orm.NewOrmUsingDB("hz_cygx")
|
|
|
_, err = o.Update(m, cols...)
|
|
@@ -48,6 +56,7 @@ type CygxTagList struct {
|
|
|
Status int `orm:"column(status);NOT NULL"` // 状态:0-禁用 1-启用
|
|
|
Pv int `description:"PV"`
|
|
|
Uv int `description:"UV"`
|
|
|
+ TagType int `description:"1:热门活动、2:海外研究、3:路演回放、4:语音问答"`
|
|
|
}
|
|
|
|
|
|
// 获取tag列表
|