You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
371 B
21 lines
371 B
package bdb |
|
|
|
import ( |
|
"encoding/json" |
|
"server/modules/customer/values" |
|
|
|
"github.com/liangdas/mqant/log" |
|
) |
|
|
|
func GetPowerByRole(role int) map[int][]int { |
|
one := &values.Role{Role: role} |
|
BackDB.Get(one) |
|
ret := map[int][]int{} |
|
if len(one.Power) > 0 { |
|
err := json.Unmarshal([]byte(one.Power), &ret) |
|
if err != nil { |
|
log.Error("err:%v", err) |
|
} |
|
} |
|
return ret |
|
}
|
|
|