feat(1.0): 调整统计数字逻辑

This commit is contained in:
summer 2025-11-06 13:09:24 +08:00
parent 0ffda3fb0b
commit e2fdf47088

View File

@ -2,13 +2,12 @@ package app
import ( import (
"fmt" "fmt"
"net/http"
"mini-chat/internal/code" "mini-chat/internal/code"
"mini-chat/internal/pkg/core" "mini-chat/internal/pkg/core"
"mini-chat/internal/pkg/httpclient" "mini-chat/internal/pkg/httpclient"
"mini-chat/internal/pkg/timeutil" "mini-chat/internal/pkg/timeutil"
"mini-chat/internal/pkg/validation" "mini-chat/internal/pkg/validation"
"net/http"
"go.uber.org/zap" "go.uber.org/zap"
"gorm.io/gorm" "gorm.io/gorm"
@ -146,7 +145,10 @@ func (h *handler) PageList() core.HandlerFunc {
checkAppRes := new(checkAppResponse) checkAppRes := new(checkAppResponse)
for k, v := range resultData { for k, v := range resultData {
messageTotalCount, _ := h.readDB.AppMessageLog.WithContext(ctx.RequestContext()).Where(h.readDB.AppMessageLog.AppID.Eq(v.AppID)).Count() messageTotalCount, _ := h.readDB.AppMessageLog.WithContext(ctx.RequestContext()).
Where(h.readDB.AppMessageLog.AppID.Eq(v.AppID)).
Where(h.readDB.AppMessageLog.SenderID.Neq("888888")).
Count()
checkStatusText := "未知" checkStatusText := "未知"
response, err := httpclient.GetHttpClientWithContext(ctx.RequestContext()).R(). response, err := httpclient.GetHttpClientWithContext(ctx.RequestContext()).R().
SetQueryParams(map[string]string{ SetQueryParams(map[string]string{