package com.goldenwater.slgc.service.impl.pms;

import com.goldenwater.slgc.entity.pms.PmsContractPayment;
import com.goldenwater.slgc.mapper.pms.PmsContractPaymentMapper;
import com.goldenwater.slgc.service.pms.IPmsContractPaymentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;

@Service
@Transactional
public class PmsContractPaymentServiceImpl implements IPmsContractPaymentService {
    @Autowired
    private PmsContractPaymentMapper pmsContractPaymentMapper;

    /**
     * 查询合同付款列表
     */
    @Override
    public List<PmsContractPayment> selectList(PmsContractPayment contractPayment) {
        return pmsContractPaymentMapper.selectList(contractPayment);
    }

    /**
     * 根据主键查询合同付款
     */
    @Override
    public PmsContractPayment selectById(Long id) {
        return pmsContractPaymentMapper.selectById(id);
    }

    /**
     * 新增合同付款
     */
    @Override
    public int insert(PmsContractPayment contractPayment) {
        return pmsContractPaymentMapper.insert(contractPayment);
    }

    /**
     * 修改合同付款
     */
    @Override
    public int update(PmsContractPayment contractPayment) {
        return pmsContractPaymentMapper.update(contractPayment);
    }

    /**
     * 删除合同付款
     */
    @Override
    public int deleteById(Long id) {
        return pmsContractPaymentMapper.deleteById(id);
    }

    /**
     * 批量删除合同付款
     */
    @Override
    public int deleteByIds(Long[] ids) {
        return pmsContractPaymentMapper.deleteByIds(ids);
    }

    /**
     * 根据合同ID查询合同付款列表
     */
    @Override
    public List<PmsContractPayment> selectByConId(Long conId) {
        return pmsContractPaymentMapper.selectByConId(conId);
    }
}
