package logic import ( util "bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/entity" "bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/internal/svc" "bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/messagecenter" "bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/service" "context" "github.com/zeromicro/go-zero/core/logx" ) type CloseChatSessionLogic struct { ctx context.Context svcCtx *svc.ServiceContext logx.Logger } func NewCloseChatSessionLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CloseChatSessionLogic { return &CloseChatSessionLogic{ ctx: ctx, svcCtx: svcCtx, Logger: logx.WithContext(ctx), } } // 会话关闭 func (l *CloseChatSessionLogic) CloseChatSession(in *messagecenter.CloseSessionReq) (*messagecenter.ChatSessionResp, error) { // todo: add your logic here and delete this line m := service.MessaggeService{} fool := m.CloseChatSession(in) error_message := "" error_code := int64(0) if fool { error_code = util.SUCCESS_CODE error_message = "" } else { error_code = util.ERROR_CODE error_message = "修改失败" } return &messagecenter.ChatSessionResp{ ErrorCode: error_code, ErrorMsg: error_message, }, nil }