package logic import ( "bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/api/messagecenter/internal/svc" "bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/api/messagecenter/internal/types" "bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/messagecenter" "context" "github.com/zeromicro/go-zero/core/logx" ) type WithdrawMessageLogic struct { logx.Logger ctx context.Context svcCtx *svc.ServiceContext } func NewWithdrawMessageLogic(ctx context.Context, svcCtx *svc.ServiceContext) *WithdrawMessageLogic { return &WithdrawMessageLogic{ Logger: logx.WithContext(ctx), ctx: ctx, svcCtx: svcCtx, } } func (l *WithdrawMessageLogic) WithdrawMessage(req *types.ReadWithdrawReq) (resp *types.CommonRes, err error) { // todo: add your logic here and delete this line r, err := l.svcCtx.Message.WithdrawMessage(l.ctx, &messagecenter.ReadWithdrawReq{ MessageId: req.MessageId, Appid: req.Appid, UserType: req.UserType, EntId: req.EntId, SenderId: req.SenderId, RecipientId: req.RecipientId, ChatGroupId: req.ChatGroupId, ConversationType: req.ConversationType, }) if err != nil { return nil, err } return &types.CommonRes{ Error_msg: r.ErrorMsg, Error_code: int(r.ErrorCode), }, nil }