|
@@ -43,4 +43,19 @@ func GetKeyWordsByChartPermissionId(charPermissionId int, from string) (keyWords
|
|
|
}
|
|
|
}
|
|
|
return
|
|
|
+}
|
|
|
+
|
|
|
+// GetKeyWordsByChartPermissionId 根据权限ID, 查询二级分类名称
|
|
|
+func GetKeyWordsByChartPermissionIdOnly(charPermissionId int) (keyWords []string, err error) {
|
|
|
+ var list []*ChartPermissionSearchKeyWordMapping
|
|
|
+ err = global.DEFAULT_MYSQL.Model(ChartPermissionSearchKeyWordMapping{}).Where("chart_permission_id = ? ", charPermissionId).Scan(&list).Error
|
|
|
+ if err != nil && err != utils.ErrNoRow {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if len(list) > 0 {
|
|
|
+ for _, item := range list {
|
|
|
+ keyWords = append(keyWords, item.KeyWord)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return
|
|
|
}
|