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

import com.goldenwater.slgc.entity.pms.PmsCompany;
import com.goldenwater.slgc.mapper.pms.PmsCompanyMapper;
import com.goldenwater.slgc.service.pms.IPmsCompanyService;
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 PmsCompanyServiceImpl implements IPmsCompanyService {
    @Autowired
    private PmsCompanyMapper pmsCompanyMapper;

    /**
     * 查询单位列表
     */
    @Override
    public List<PmsCompany> selectList(PmsCompany company) {
        return pmsCompanyMapper.selectList(company);
    }

    /**
     * 根据主键查询单位
     */
    @Override
    public PmsCompany selectById(Long id) {
        return pmsCompanyMapper.selectById(id);
    }

    /**
     * 新增单位
     */
    @Override
    public int insert(PmsCompany company) {
        return pmsCompanyMapper.insert(company);
    }

    /**
     * 修改单位
     */
    @Override
    public int update(PmsCompany company) {
        return pmsCompanyMapper.update(company);
    }

    /**
     * 删除单位
     */
    @Override
    public int deleteById(Long id) {
        return pmsCompanyMapper.deleteById(id);
    }

    /**
     * 批量删除单位
     */
    @Override
    public int deleteByIds(Long[] ids) {
        return pmsCompanyMapper.deleteByIds(ids);
    }
}
