wangchuanjin 1 жил өмнө
parent
commit
b3b790ba12

+ 13 - 8
api/internal/logic/resempowerlogic.go

@@ -33,16 +33,21 @@ func (l *ResEmpowerLogic) ResEmpower(req *types.ResEmpowerReq) (resp *types.BiRe
 		entUserIds = append(entUserIds, Int64All(v))
 		entUserIds = append(entUserIds, Int64All(v))
 	}
 	}
 	var r *pb.Resp
 	var r *pb.Resp
-	pdReq := &pb.EmpowerReq{
-		Appid:        "10000",
-		FunctionCode: req.FunctionCode,
-		EntId:        req.EntId,
-		EntUserId:    entUserIds,
-	}
 	if req.ReqType == 1 {
 	if req.ReqType == 1 {
-		r, err = l.svcCtx.ResourceCenterRpc.Empower(context.Background(), pdReq)
+		r, err = l.svcCtx.ResourceCenterRpc.Empower(context.Background(), &pb.EmpowerReq{
+			Appid:        "10000",
+			FunctionCode: req.FunctionCode,
+			EntId:        req.EntId,
+			EntUserId:    entUserIds,
+		})
 	} else if req.ReqType == 2 {
 	} else if req.ReqType == 2 {
-		r, err = l.svcCtx.ResourceCenterRpc.ReEmpower(context.Background(), pdReq)
+		r, err = l.svcCtx.ResourceCenterRpc.CrReEmpower(context.Background(), &pb.CrReEmpowerReq{
+			Appid:          "10000",
+			FunctionModule: []string{"bi_电销菜单管理"},
+			FunctionCode:   strings.Split(req.FunctionCode, ","),
+			EntId:          req.EntId,
+			EntUserId:      entUserIds,
+		})
 	} else if req.ReqType == -1 {
 	} else if req.ReqType == -1 {
 		r, err = l.svcCtx.ResourceCenterRpc.CancelAllEmpower(context.Background(), &pb.AllEmpowerReq{
 		r, err = l.svcCtx.ResourceCenterRpc.CancelAllEmpower(context.Background(), &pb.AllEmpowerReq{
 			Appid:          "10000",
 			Appid:          "10000",

+ 1 - 1
go.mod

@@ -5,7 +5,7 @@ go 1.19
 require (
 require (
 	app.yhyue.com/moapp/jybase v0.0.0-20240104022202-158734833402
 	app.yhyue.com/moapp/jybase v0.0.0-20240104022202-158734833402
 	bp.jydev.jianyu360.cn/BaseService/gateway v1.3.4
 	bp.jydev.jianyu360.cn/BaseService/gateway v1.3.4
-	bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.1.2
+	bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.1.3
 	bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.16
 	bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.16
 	github.com/gogf/gf/v2 v2.0.6
 	github.com/gogf/gf/v2 v2.0.6
 	github.com/nsqio/go-nsq v1.1.0
 	github.com/nsqio/go-nsq v1.1.0

+ 2 - 2
go.sum

@@ -13,8 +13,8 @@ bp.jydev.jianyu360.cn/BaseService/gateway v1.3.4/go.mod h1:BMLd/5wb3BIEGhnEgF9y1
 bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220418005748-8ba5d936dd53/go.mod h1:E5lcDI3k4FESLxiAetCfWQTq8qfpy9cv0yN1oKoEO34=
 bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220418005748-8ba5d936dd53/go.mod h1:E5lcDI3k4FESLxiAetCfWQTq8qfpy9cv0yN1oKoEO34=
 bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220419023723-0b32d4a41751/go.mod h1:6KL5LMEku83uRbre0W/bj5kXG2I6pJGBFtktmtp51yM=
 bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220419023723-0b32d4a41751/go.mod h1:6KL5LMEku83uRbre0W/bj5kXG2I6pJGBFtktmtp51yM=
 bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220420075831-0b59892e9982/go.mod h1:wsHNO91h37H+xE4ZNny0yd7mtpODeDJxbVYhIRMR+qw=
 bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220420075831-0b59892e9982/go.mod h1:wsHNO91h37H+xE4ZNny0yd7mtpODeDJxbVYhIRMR+qw=
-bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.1.2 h1:wXFTDpIfmkxh7tXvyWohrBMptzj/5L8f2s4ItOTAY0I=
-bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.1.2/go.mod h1:rRiGzKG4F/fmkNxXQCxrkxNWc8yf1SmW8qWCKfGIQSM=
+bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.1.3 h1:lk3he0hY+8VK1/Hm+ZSlc/c8Y8ZIFriwZu0V7o7F500=
+bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.1.3/go.mod h1:rRiGzKG4F/fmkNxXQCxrkxNWc8yf1SmW8qWCKfGIQSM=
 bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20220418072311-2062bed1e700/go.mod h1:KjcrxTzM96tBc6G4B8tlLBn1lrVy5UJYF8+eTdP4xAE=
 bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20220418072311-2062bed1e700/go.mod h1:KjcrxTzM96tBc6G4B8tlLBn1lrVy5UJYF8+eTdP4xAE=
 bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20220421015128-4a36f3eac5c5/go.mod h1:GT0QC4aaKDuXxAvaU4G02XjCc31TU1ctqBGqxQYOfC4=
 bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20220421015128-4a36f3eac5c5/go.mod h1:GT0QC4aaKDuXxAvaU4G02XjCc31TU1ctqBGqxQYOfC4=
 bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.16 h1:CckcpZZs1jb76sn8b7YDJZTh30py1RymWzuj3FVO6iI=
 bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.16 h1:CckcpZZs1jb76sn8b7YDJZTh30py1RymWzuj3FVO6iI=