bitmapsavemsglogic.go 906 B

12345678910111213141516171819202122232425262728293031323334353637
  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. "app.yhyue.com/moapp/MessageCenter/rpc/internal/svc"
  7. "github.com/zeromicro/go-zero/core/logx"
  8. )
  9. type BitmapSaveMsgLogic struct {
  10. ctx context.Context
  11. svcCtx *svc.ServiceContext
  12. logx.Logger
  13. }
  14. func NewBitmapSaveMsgLogic(ctx context.Context, svcCtx *svc.ServiceContext) *BitmapSaveMsgLogic {
  15. return &BitmapSaveMsgLogic{
  16. ctx: ctx,
  17. svcCtx: svcCtx,
  18. Logger: logx.WithContext(ctx),
  19. }
  20. }
  21. // BitmapSaveMsg bitmap发送消息
  22. func (l *BitmapSaveMsgLogic) BitmapSaveMsg(in *messageclient.MultipleSaveMsgReq) (*messageclient.MultipleSaveMsgResp, error) {
  23. var code = 1
  24. err := service.UpdateUserMsgSummary(in)
  25. if err != nil {
  26. code = 0
  27. }
  28. return &messageclient.MultipleSaveMsgResp{
  29. Code: int64(code),
  30. Message: err.Error(),
  31. }, nil
  32. }