newusermsglogic.go 862 B

123456789101112131415161718192021222324252627282930313233343536
  1. package logic
  2. import (
  3. service "app.yhyue.com/moapp/MessageCenter/rpc/internal/common"
  4. "app.yhyue.com/moapp/MessageCenter/rpc/messageclient"
  5. "context"
  6. "fmt"
  7. "app.yhyue.com/moapp/MessageCenter/rpc/internal/svc"
  8. "github.com/zeromicro/go-zero/core/logx"
  9. )
  10. type NewUserMsgLogic struct {
  11. ctx context.Context
  12. svcCtx *svc.ServiceContext
  13. logx.Logger
  14. }
  15. func NewNewUserMsgLogic(ctx context.Context, svcCtx *svc.ServiceContext) *NewUserMsgLogic {
  16. return &NewUserMsgLogic{
  17. ctx: ctx,
  18. svcCtx: svcCtx,
  19. Logger: logx.WithContext(ctx),
  20. }
  21. }
  22. // 新用户发送消息
  23. func (l *NewUserMsgLogic) NewUserMsg(in *messageclient.NewUserInsertMsgReq) (*messageclient.Response, error) {
  24. // todo: add your logic here and delete this line
  25. fmt.Println(in)
  26. msg := service.NewUserSendMsg(in)
  27. return &messageclient.Response{
  28. Code: 1,
  29. Message: msg,
  30. }, nil
  31. }