1234567891011121314151617181920212223 |
- package entity
- import (
- resourcepb "bp.jydev.jianyu360.cn/BaseService/resourceCenter/rpc/pb"
- "context"
- "strconv"
- )
- //获取用户资源信息
- func GetResources(appId, baseUserId string, entId, entUserId int64) []string {
- baseUserIdInt, _ := strconv.ParseInt(baseUserId, 10, 0)
- req := &resourcepb.HaspowersReq{
- EntId: entId,
- UserId: baseUserIdInt,
- EntUserId: entUserId,
- Appid: appId,
- }
- powerList, err := ResourceLib.Haspowers(context.Background(), req)
- if err == nil && len(powerList.Powers) > 0 {
- return powerList.Powers
- }
- return []string{}
- }
|