package com.gkhy.safePlatform.account.service.baseService.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.gkhy.safePlatform.account.entity.user.ProjectInfo; import com.gkhy.safePlatform.account.enums.ProjectStatusEnum; import com.gkhy.safePlatform.account.repository.ProjectInfoRepository; import com.gkhy.safePlatform.account.service.baseService.ProjectInfoService; import com.gkhy.safePlatform.commons.enums.ResultCodes; import com.gkhy.safePlatform.commons.exception.BusinessException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; @Service("projectInfoService") public class ProjectInfoServiceImpl extends ServiceImpl implements ProjectInfoService { @Autowired private ProjectInfoRepository projectInfoRepository; @Override public List getAllProject(ProjectStatusEnum status) { return projectInfoRepository.listAllProject(status.getCode()); } @Override public ProjectInfo getProjectById(Long projectId) { if (projectId == null) { throw new BusinessException(ResultCodes.SERVER_PARAM_NULL); } return projectInfoRepository.getProjectById(projectId); } }