|
@@ -31,12 +31,22 @@ func (l *ResEmpowerLogic) ResEmpower(req *types.ResEmpowerReq) (resp *types.BiRe
|
|
|
for _, v := range strings.Split(req.EntUserId, ",") {
|
|
|
entUserIds = append(entUserIds, Int64All(v))
|
|
|
}
|
|
|
- r, err := l.svcCtx.ResourceCenterRpc.Empower(context.Background(), &pb.EmpowerReq{
|
|
|
- Appid: "10000",
|
|
|
- FunctionCode: req.FunctionCode,
|
|
|
- EntId: req.EntId,
|
|
|
- EntUserId: entUserIds,
|
|
|
- })
|
|
|
+ var r *pb.Resp
|
|
|
+ if req.ReqType == 1 {
|
|
|
+ r, err = l.svcCtx.ResourceCenterRpc.Empower(context.Background(), &pb.EmpowerReq{
|
|
|
+ Appid: "10000",
|
|
|
+ FunctionCode: req.FunctionCode,
|
|
|
+ EntId: req.EntId,
|
|
|
+ EntUserId: entUserIds,
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ r, err = l.svcCtx.ResourceCenterRpc.CancelEmpower(context.Background(), &pb.EmpowerReq{
|
|
|
+ Appid: "10000",
|
|
|
+ FunctionCode: req.FunctionCode,
|
|
|
+ EntId: req.EntId,
|
|
|
+ EntUserId: entUserIds,
|
|
|
+ })
|
|
|
+ }
|
|
|
var status int64
|
|
|
if err != nil {
|
|
|
l.Error(err)
|