|
@@ -0,0 +1,43 @@
|
|
|
+package logic
|
|
|
+
|
|
|
+import (
|
|
|
+ "app.yhyue.com/moapp/MessageCenter/rpc/messageclient"
|
|
|
+ "context"
|
|
|
+
|
|
|
+ "app.yhyue.com/moapp/MessageCenter/api/internal/svc"
|
|
|
+ "app.yhyue.com/moapp/MessageCenter/api/internal/types"
|
|
|
+
|
|
|
+ "github.com/zeromicro/go-zero/core/logx"
|
|
|
+)
|
|
|
+
|
|
|
+type MsgOpenLogLogic struct {
|
|
|
+ logx.Logger
|
|
|
+ ctx context.Context
|
|
|
+ svcCtx *svc.ServiceContext
|
|
|
+}
|
|
|
+
|
|
|
+func NewMsgOpenLogLogic(ctx context.Context, svcCtx *svc.ServiceContext) *MsgOpenLogLogic {
|
|
|
+ return &MsgOpenLogLogic{
|
|
|
+ Logger: logx.WithContext(ctx),
|
|
|
+ ctx: ctx,
|
|
|
+ svcCtx: svcCtx,
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+func (l *MsgOpenLogLogic) MsgOpenLog(req *types.MsgOpenLogReq) (resp *types.Response, err error) {
|
|
|
+ lsi := l.svcCtx.MessageCenter
|
|
|
+ res, err := lsi.MsgOpenLog(l.ctx, &messageclient.MsgOpenLogReq{
|
|
|
+ UserId: req.UserId,
|
|
|
+ AppId: req.AppId,
|
|
|
+ MsgLogId: req.MsgLogId,
|
|
|
+ Platform: req.Platform,
|
|
|
+ })
|
|
|
+ if err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+
|
|
|
+ return &types.Response{
|
|
|
+ Code: res.Code,
|
|
|
+ Message: res.Message,
|
|
|
+ }, nil
|
|
|
+}
|