12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- 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{}
- fool := m.UpdateReadById(in)
- error_message := ""
- error_code := int64(0)
- if fool {
- error_code = int64(0)
- error_message = ""
- } else {
- error_code = int64(1)
- error_message = "修改失败"
- }
- return &messagecenter.CurrencyResp{
- ErrorCode: error_code,
- ErrorMsg: error_message,
- }, nil
- }
|