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

import com.goldenwater.slgc.entity.pms.PmsContract;
import com.goldenwater.slgc.mapper.pms.PmsContractMapper;
import com.goldenwater.slgc.service.pms.IPmsContractService;
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 PmsContractServiceImpl implements IPmsContractService {
    @Autowired
    private PmsContractMapper pmsContractMapper;

    /**
     * 查询合同列表
     */
    @Override
    public List<PmsContract> selectList(PmsContract contract) {
        return pmsContractMapper.selectList(contract);
    }

    /**
     * 根据主键查询合同
     */
    @Override
    public PmsContract selectById(Long id) {
        return pmsContractMapper.selectById(id);
    }

    /**
     * 新增合同
     */
    @Override
    public int insert(PmsContract contract) {
        return pmsContractMapper.insert(contract);
    }

    /**
     * 修改合同
     */
    @Override
    public int update(PmsContract contract) {
        return pmsContractMapper.update(contract);
    }

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

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