package com.sunxung.factoring.service.credit.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.sunxung.factoring.entity.GridPage;
import com.sunxung.factoring.entity.credit.CreditDetail;
import com.sunxung.factoring.entity.credit.CreditInfo;
import com.sunxung.factoring.mapper.credit.CreditDetailMapper;
import com.sunxung.factoring.mapper.credit.CreditInfoMapper;
import com.sunxung.factoring.service.credit.CreditDetailService;
import com.sunxung.factoring.service.credit.CreditService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CreditDetailServiceImpl extends ServiceImpl<CreditDetailMapper, CreditDetail> implements CreditDetailService {


    @Override
    public void add(CreditDetail creditDetail) {
        save(creditDetail);
    }

    @Override
    public List<CreditDetail> getByCreditId(Long id) {
        return list(new QueryWrapper<CreditDetail>().eq("credit_id",id));
    }
}
