package logic import ( "context" "fmt" "strings" . "bp.jydev.jianyu360.cn/BaseService/resourceCenter/public/service" "bp.jydev.jianyu360.cn/BaseService/resourceCenter/rpc/internal/svc" "bp.jydev.jianyu360.cn/BaseService/resourceCenter/rpc/pb" "github.com/zeromicro/go-zero/core/logx" ) type CancelEmpowerLogic struct { ctx context.Context svcCtx *svc.ServiceContext logx.Logger } func NewCancelEmpowerLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CancelEmpowerLogic { return &CancelEmpowerLogic{ ctx: ctx, svcCtx: svcCtx, Logger: logx.WithContext(ctx), } } // 取消授权 func (l *CancelEmpowerLogic) CancelEmpower(in *pb.EmpowerReq) (*pb.Resp, error) { resp := &pb.Resp{} status, err := CancelEmpower(in.Appid, strings.Split(in.FunctionCode, ","), in.EntId, in.EntUserId) if err != nil { l.Error(fmt.Sprintf("%+v", in), err) } resp.Status = status return resp, nil }