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

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sunxung.factoring.entity.purchcontractmanagement.PurchContractOtherClause;
import com.sunxung.factoring.mapper.purchcontractmanagement.PurchContractOtherClauseMapper;
import com.sunxung.factoring.service.purchcontractmanagement.PurchContractOtherClauseService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description : 采购合同其他条款service实现类
 * @Author : JiaYf
 * @Date: 2021-09-17 19:22
 */
@Service
public class PurchContractOtherClauseServiceImpl extends ServiceImpl<PurchContractOtherClauseMapper, PurchContractOtherClause>
        implements PurchContractOtherClauseService {

    @Override
    public List<PurchContractOtherClause> findByPurchContApprId(Long id) {
        QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.eq("purch_contract_approval_id", id);
        queryWrapper.orderByAsc("serial_number");
        return baseMapper.selectList(queryWrapper);
    }
}
