package logic import ( "context" "bp.jydev.jianyu360.cn/BaseService/jyMicroservices/jyBXSubscribe/rpc/type/bxsubscribe" "bp.jydev.jianyu360.cn/BaseService/jyMicroservices/jyBXSubscribe/api/internal/svc" "bp.jydev.jianyu360.cn/BaseService/jyMicroservices/jyBXSubscribe/api/internal/types" "github.com/zeromicro/go-zero/core/logx" ) type SetUserLogic struct { logx.Logger ctx context.Context svcCtx *svc.ServiceContext } func NewSetUserLogic(ctx context.Context, svcCtx *svc.ServiceContext) *SetUserLogic { return &SetUserLogic{ Logger: logx.WithContext(ctx), ctx: ctx, svcCtx: svcCtx, } } func (l *SetUserLogic) SetUser(req *types.SetUserReq) (*types.CommonResp, error) { // todo: add your logic here and delete this line res, err := l.svcCtx.Suscribe.SetUser(l.ctx, &bxsubscribe.SetUserInfoReq{ UserId: req.UserId, EntId: req.EntId, EntUserId: req.EntUserId, PositionType: req.PositionType, Mail: req.Mail, }) if err != nil { return &types.CommonResp{ Err_code: res.ErrorCode, Err_msg: res.ErrorMsg, Data: nil, }, nil } return &types.CommonResp{ Err_code: res.ErrorCode, Err_msg: res.ErrorMsg, Data: nil, }, nil }