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

import com.goldenwater.slgc.entity.pms.PmsProject;
import com.goldenwater.slgc.mapper.pms.PmsProjectMapper;
import com.goldenwater.slgc.service.pms.IPmsProjectService;
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 PmsProjectServiceImpl implements IPmsProjectService {
    @Autowired
    private PmsProjectMapper pmsProjectMapper;

    /**
     * 查询项目列表
     */
    @Override
    public List<PmsProject> selectList(PmsProject project) {
        return pmsProjectMapper.selectList(project);
    }

    /**
     * 根据主键查询项目
     */
    @Override
    public PmsProject selectById(Long id) {
        return pmsProjectMapper.selectById(id);
    }

    /**
     * 新增项目
     */
    @Override
    public int insert(PmsProject project) {
        return pmsProjectMapper.insert(project);
    }

    /**
     * 修改项目
     */
    @Override
    public int update(PmsProject project) {
        return pmsProjectMapper.update(project);
    }

    /**
     * 删除项目
     */
    @Override
    public int deleteById(Long id) {
        return pmsProjectMapper.deleteById(id);
    }

    /**
     * 批量删除项目
     */
    @Override
    public int deleteByIds(Long[] ids) {
        return pmsProjectMapper.deleteByIds(ids);
    }
}
