123456789101112131415 |
- package models
- import "github.com/beego/beego/v2/client/orm"
- type ChartPermissionMappingIdName struct {
- PermissionId int
- PermissionName string
- }
- func GetChartPermissionNameFromMappingByKeyword(source string, classifyId int) (list []*ChartPermissionMappingIdName, err error) {
- o := orm.NewOrmUsingDB("rddp")
- sql := " SELECT b.chart_permission_id AS permission_id,b.permission_name FROM chart_permission_search_key_word_mapping AS a INNER JOIN chart_permission AS b ON a.chart_permission_id = b.chart_permission_id WHERE a.`from` = ? AND a.classify_id = ? "
- _, err = o.Raw(sql, source, classifyId).QueryRows(&list)
- return
- }
|