优化mongo,封装count逻辑,处理objectId
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user