mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-25 00:15:06 +08:00
[feat]合并wyw-7.26外包合同管理模块2
This commit is contained in:
@ -14,4 +14,10 @@ public interface ProjectApi {
|
||||
*/
|
||||
ProjectDetailRespDTO getProjectDetailById(Long projectId);
|
||||
|
||||
/**
|
||||
* 判断项目是否存在
|
||||
* @param projectId
|
||||
*/
|
||||
void validProjectExist(Long projectId);
|
||||
|
||||
}
|
||||
|
@ -10,10 +10,14 @@ import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.pms.enums.ErrorCodeConstants.PROJECT_NOT_EXISTS;
|
||||
|
||||
@Service
|
||||
@Validated
|
||||
public class ProjectImpl implements ProjectApi {
|
||||
|
||||
|
||||
@Resource
|
||||
private ProjectMapper projectMapper;
|
||||
|
||||
@ -31,4 +35,12 @@ public class ProjectImpl implements ProjectApi {
|
||||
ProjectDetailRespDTO detailRespDTO = BeanUtils.toBean(projectMapperDetail, ProjectDetailRespDTO.class);
|
||||
return detailRespDTO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void validProjectExist(Long projectId) {
|
||||
if (projectMapper.selectById(projectId) == null) {
|
||||
throw exception(PROJECT_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user