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

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sunxung.factoring.entity.ledger.LedgerPlanFactoringAssign;
import com.sunxung.factoring.mapper.ledger.LedgerPlanFactoringAssignMapper;
import com.sunxung.factoring.service.ledger.LedgerPlanFactoringAssignService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description : 分账管理-账后收放款计划分配service实现类
 * @Author : L.Jia
 * @Date: 2021-12-10 14:50
 */
@Service
public class LedgerPlanFactoringAssignServiceImpl extends ServiceImpl<LedgerPlanFactoringAssignMapper, LedgerPlanFactoringAssign>
        implements LedgerPlanFactoringAssignService {


    @Override
    public List<LedgerPlanFactoringAssign> findByFundGoodsAssignId(Long ledgerFundGoodsAssignId) {
        QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.eq("ledger_fund_goods_assign_id", ledgerFundGoodsAssignId);
        return baseMapper.selectList(queryWrapper);
    }

    @Override
    public List<LedgerPlanFactoringAssign> findByBasicInfoId(Long basicInfoId) {
        QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.eq("ledger_account_basic_info_id", basicInfoId);
        return baseMapper.selectList(queryWrapper);
    }
}
