优化mongo,封装count逻辑,处理objectId

This commit is contained in:
2026-01-06 17:01:10 +08:00
parent a43da6e06e
commit 213ad95791
8 changed files with 123 additions and 91 deletions

View File

@@ -53,8 +53,8 @@ func (s *operationLog) GetByID(ctx context.Context, id string) (*dto.OperationLo
}
// List 查询操作日志列表
func (s *operationLog) List(ctx context.Context, filter *dto.ListLogsReq, sortFields ...string) ([]dto.OperationLogInfo, int64, error) {
logs, total, err := dao.Log.List(ctx, filter, sortFields...)
func (s *operationLog) List(ctx context.Context, req *dto.ListLogsReq) ([]dto.OperationLogInfo, int64, error) {
logs, total, err := dao.Log.List(ctx, req)
if err != nil {
return nil, 0, err
}