123456789101112131415161718192021222324252627282930313233343536373839404142 |
- package logic
- import (
- util "bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/entity"
- "bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/service"
- "context"
- "bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/internal/svc"
- "bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/messagecenter"
- "github.com/zeromicro/go-zero/core/logx"
- )
- type WithdrawMessageLogic struct {
- ctx context.Context
- svcCtx *svc.ServiceContext
- logx.Logger
- }
- func NewWithdrawMessageLogic(ctx context.Context, svcCtx *svc.ServiceContext) *WithdrawMessageLogic {
- return &WithdrawMessageLogic{
- ctx: ctx,
- svcCtx: svcCtx,
- Logger: logx.WithContext(ctx),
- }
- }
- // 用户撤回消息
- func (l *WithdrawMessageLogic) WithdrawMessage(in *messagecenter.ReadWithdrawReq) (*messagecenter.CurrencyResp, error) {
- // todo: add your logic here and delete this line
- m := service.MessaggeService{}
- errorCode := m.WithdrawMessage(in)
- if !errorCode {
- return &messagecenter.CurrencyResp{
- ErrorCode: util.ERROR_CODE,
- ErrorMsg: "撤回消息失败",
- }, nil
- }
- return &messagecenter.CurrencyResp{ErrorCode: util.SUCCESS_CODE,
- ErrorMsg: ""}, nil
- }
|