package com.izouma.nineth.service;

import com.izouma.nineth.domain.UserBankCard;
import com.izouma.nineth.dto.PageQuery;
import com.izouma.nineth.repo.UserBankCardRepo;
import com.izouma.nineth.utils.JpaUtils;
import lombok.AllArgsConstructor;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service;

@Service
@AllArgsConstructor
public class UserBankCardService {
    private UserBankCardRepo userBankCardRepo;

    /**
     * 银行卡查询接口
     * @param pageQuery
     * @return
     */
    public Page<UserBankCard> all(PageQuery pageQuery) {
        return userBankCardRepo.findAll(JpaUtils.toSpecification(pageQuery, UserBankCard.class), JpaUtils.toPageRequest(pageQuery));
    }

}
