package com.izouma.nineth.service;

import com.izouma.nineth.domain.DivMoney;
import com.izouma.nineth.domain.TransferMoneyInfo;
import com.izouma.nineth.dto.PageQuery;
import com.izouma.nineth.exception.BusinessException;
import com.izouma.nineth.repo.TransferMoneyInfoRepo;
import com.izouma.nineth.utils.JpaUtils;
import lombok.AllArgsConstructor;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 转账记录服务
 */
@Service
@AllArgsConstructor
public class TransferMoneyInfoService {

    private TransferMoneyInfoRepo transferMoneyInfoRepo;


    /**
     * 列表数据
     * @param pageQuery
     * @return
     */
    public Page<TransferMoneyInfo> all(PageQuery pageQuery) {
        return transferMoneyInfoRepo.findAll(JpaUtils.toSpecification(pageQuery, TransferMoneyInfo.class),
                JpaUtils.toPageRequest(pageQuery));
    }


}
