package com.izouma.wenlvju.service;

import com.izouma.wenlvju.domain.RateAudit;
import com.izouma.wenlvju.dto.PageQuery;
import com.izouma.wenlvju.repo.RateAuditRepo;
import com.izouma.wenlvju.utils.JpaUtils;
import lombok.AllArgsConstructor;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service;

@Service
@AllArgsConstructor
public class RateAuditService {

    private RateAuditRepo rateAuditRepo;

    public Page<RateAudit> all(PageQuery pageQuery) {
        return rateAuditRepo.findAll(JpaUtils.toSpecification(pageQuery, RateAudit.class), JpaUtils.toPageRequest(pageQuery));
    }
}
