oneuserconversationlogic.go 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. package logic
  2. import (
  3. "bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/service"
  4. "context"
  5. "bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/internal/svc"
  6. "bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/messagecenter"
  7. "github.com/zeromicro/go-zero/core/logx"
  8. )
  9. type OneUserConversationLogic struct {
  10. ctx context.Context
  11. svcCtx *svc.ServiceContext
  12. logx.Logger
  13. }
  14. func NewOneUserConversationLogic(ctx context.Context, svcCtx *svc.ServiceContext) *OneUserConversationLogic {
  15. return &OneUserConversationLogic{
  16. ctx: ctx,
  17. svcCtx: svcCtx,
  18. Logger: logx.WithContext(ctx),
  19. }
  20. }
  21. // 1v1首次创建会话汇总表信息
  22. func (l *OneUserConversationLogic) OneUserConversation(in *messagecenter.OneUserConversationReq) (*messagecenter.CurrencyResp, error) {
  23. // todo: add your logic here and delete this line
  24. errorMsg := service.OneCreatingSession(in)
  25. if errorMsg != "" {
  26. return &messagecenter.CurrencyResp{ErrorCode: -1, ErrorMsg: errorMsg}, nil
  27. }
  28. return &messagecenter.CurrencyResp{}, nil
  29. }