package cn.com.ty.lift.business.contract.service;

import cn.com.ty.lift.business.contract.dao.entity.PaymentHistory;
import cn.com.ty.lift.business.contract.dao.entity.model.request.PaymentRequest;
import cn.com.ty.lift.business.contract.dao.entity.model.response.PaymentHistoryResponse;
import cn.com.ty.lift.business.contract.dao.mapper.PaymentHistoryMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * @author bieao
 * @date 2020/2/26
 * @description 付款操作记录业务层
 */
@Service
public class PaymentHistoryService extends ServiceImpl<PaymentHistoryMapper, PaymentHistory> {

    /**
     * @param request 付款编号
     * @return IPage<PaymentHistoryResponse> 付款历史记录
     * @description 根据合同编号查询付款历史记录
     * @date 2020/2/26 5:24 下午
     */
    public IPage<PaymentHistoryResponse> list(PaymentRequest request) {
      return baseMapper.queryPaymentHistory(request.getPage(),request.getContractId());
    }
}
