|
@@ -46,14 +46,15 @@ func (m *CaseDAO) GetTagList(caseids string, page int, pageSize int) ([]TagInfo,
|
46
|
46
|
|
47
|
47
|
// Tag 标签
|
48
|
48
|
type Tag struct {
|
49
|
|
- model.TaCmsCase `xorm:"extends"`
|
50
|
|
- TagCases []model.SysTagCase
|
|
49
|
+ model.SysTag `xorm:"extends"`
|
|
50
|
+ TagCases []model.SysTagCase
|
51
|
51
|
}
|
52
|
52
|
|
53
|
53
|
// GetTagByID 根据ID获取标签
|
54
|
54
|
func (m *CaseDAO) GetTagByID(tagid string) (*Tag, error) {
|
55
|
55
|
var tags []Tag
|
56
|
|
- err := m.db.Table("sys_tag").Where("tag_id=?", tagid).Find(&tags)
|
|
56
|
+ sql := `select * from sys_tag where tag_id='` + tagid + `'`
|
|
57
|
+ err := m.db.Sql(sql).Find(&tags)
|
57
|
58
|
if err != nil {
|
58
|
59
|
return nil, err
|
59
|
60
|
}
|