1234567891011121314151617181920212223242526272829303132333435363738394041 |
- package logic
- import (
- "bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/service"
- "context"
- "bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/internal/svc"
- "bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/messagecenter"
- "github.com/zeromicro/go-zero/core/logx"
- )
- type UpdateReadByIdLogic struct {
- ctx context.Context
- svcCtx *svc.ServiceContext
- logx.Logger
- }
- func NewUpdateReadByIdLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateReadByIdLogic {
- return &UpdateReadByIdLogic{
- ctx: ctx,
- svcCtx: svcCtx,
- Logger: logx.WithContext(ctx),
- }
- }
- // 根据消息修改已读状态
- func (l *UpdateReadByIdLogic) UpdateReadById(in *messagecenter.ReadStateReq) (*messagecenter.CurrencyResp, error) {
- // todo: add your logic here and delete this line
- m := service.MessaggeService{}
- error_code := m.UpdateReadById(in)
- error_message := "修改失败"
- if error_code == 0 {
- error_message = ""
- }
- return &messagecenter.CurrencyResp{
- ErrorCode: error_code,
- ErrorMsg: error_message,
- }, nil
- }
|