package cn.iocoder.yudao.module.system.service.biz;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.system.controller.admin.biz.vo.ElderlyCcbPayOrderRecordPageReqVO;
import cn.iocoder.yudao.module.system.dal.dataobject.biz.ElderlyCcbPayOrderRecordDO;
import cn.iocoder.yudao.module.system.dal.mysql.biz.ElderlyCcbPayOrderRecordMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;

import javax.annotation.Resource;
import java.util.List;

/**
 * 建行支付账单记录 Service 实现类
 */
@Service
@Validated
public class ElderlyCcbPayOrderRecordServiceImpl implements ElderlyCcbPayOrderRecordService {

    @Resource
    private ElderlyCcbPayOrderRecordMapper elderlyCcbPayOrderRecordMapper;

    @Override
    public PageResult<ElderlyCcbPayOrderRecordDO> getPage(ElderlyCcbPayOrderRecordPageReqVO pageReqVO) {
        Page<ElderlyCcbPayOrderRecordDO> page = new Page<>(pageReqVO.getPageNo(), pageReqVO.getPageSize());
        List<ElderlyCcbPayOrderRecordDO> list = elderlyCcbPayOrderRecordMapper.selectPageWithElderInfo(page, pageReqVO);
        return new PageResult<>(list, page.getTotal());
    }
}
