by Robin at 20241202

This commit is contained in:
Robin 2024-12-02 16:12:06 +08:00
parent fc58ef20a2
commit 376e151d32
2 changed files with 3 additions and 1 deletions

View File

@ -45,6 +45,7 @@ type ApiCountUnreadReq struct {
type ApiCountUnreadData struct {
Result map[int64]int64 `json:"result"`
Total int64 `json:"total"`
}
type ApiCountUnreadResp struct {

View File

@ -82,7 +82,7 @@ func ApiReadAllNotification(ctx *gin.Context) {
func ApiGetNotificationUrcByMid(ctx *gin.Context) {
req := ctx.MustGet("client_req").(*notificationproto.ApiCountUnreadReq)
mp, ec := service.DefaultService.ApiGetNotificationUrcByMid(ctx, req)
mp, total, ec := service.DefaultService.ApiGetNotificationUrcByMid(ctx, req)
if ec != errcode.ErrCodeNotificationSrvOk {
logger.Error("ApiReceiveAllBcstedNotifs fail, req: %v, ec: %v", util.ToJson(req), ec)
ReplyErrCodeMsg(ctx, ec)
@ -91,6 +91,7 @@ func ApiGetNotificationUrcByMid(ctx *gin.Context) {
data := &notificationproto.ApiCountUnreadData{
Result: mp,
Total: total,
}
ReplyOk(ctx, data)