1234567891011121314151617181920212223242526272829303132333435 |
- package logic
- import (
- "app.yhyue.com/moapp/MessageCenter/rpc/messageclient"
- "context"
- "app.yhyue.com/moapp/MessageCenter/rpc/internal/svc"
- "app.yhyue.com/moapp/MessageCenter/service"
- "github.com/zeromicro/go-zero/core/logx"
- )
- type GetClassUnreadCountLogic struct {
- ctx context.Context
- svcCtx *svc.ServiceContext
- logx.Logger
- }
- func NewGetClassUnreadCountLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetClassUnreadCountLogic {
- return &GetClassUnreadCountLogic{
- ctx: ctx,
- svcCtx: svcCtx,
- Logger: logx.WithContext(ctx),
- }
- }
- // 查询指定用户指定分类的未读消息合计
- func (l *GetClassUnreadCountLogic) GetClassUnreadCount(in *messageclient.GetClassUnreadCountReq) (*messageclient.GetUnreadCountResponse, error) {
- // todo: add your logic here and delete this line
- code, msg, count := service.ClassCountUnread(int(in.MsgType), in.UserId, in.Appid)
- return &messageclient.GetUnreadCountResponse{
- Code: code,
- Message: msg,
- Count: count,
- }, nil
- }
|