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

import com.goldenwater.slgc.entity.pms.PmsPhase;
import com.goldenwater.slgc.mapper.pms.PmsPhaseMapper;
import com.goldenwater.slgc.service.pms.IPmsPhaseService;
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 PmsPhaseServiceImpl implements IPmsPhaseService {
    @Autowired
    private PmsPhaseMapper pmsPhaseMapper;

    /**
     * 查询阶段列表
     */
    @Override
    public List<PmsPhase> selectList(PmsPhase phase) {
        return pmsPhaseMapper.selectList(phase);
    }

    /**
     * 根据主键查询阶段
     */
    @Override
    public PmsPhase selectById(Long id) {
        return pmsPhaseMapper.selectById(id);
    }

    /**
     * 新增阶段
     */
    @Override
    public int insert(PmsPhase phase) {
        return pmsPhaseMapper.insert(phase);
    }

    /**
     * 修改阶段
     */
    @Override
    public int update(PmsPhase phase) {
        return pmsPhaseMapper.update(phase);
    }

    /**
     * 删除阶段
     */
    @Override
    public int deleteById(Long id) {
        return pmsPhaseMapper.deleteById(id);
    }

    /**
     * 批量删除阶段
     */
    @Override
    public int deleteByIds(Long[] ids) {
        return pmsPhaseMapper.deleteByIds(ids);
    }

    /**
     * 根据项目ID查询阶段列表
     */
    @Override
    public List<PmsPhase> selectByPrjId(Long prjId) {
        return pmsPhaseMapper.selectByPrjId(prjId);
    }
}
