|
|
@ -20,9 +20,11 @@ import cn.escheduler.api.enums.Status; |
|
|
|
import cn.escheduler.api.utils.Constants; |
|
|
|
import cn.escheduler.api.utils.Constants; |
|
|
|
import cn.escheduler.api.utils.PageInfo; |
|
|
|
import cn.escheduler.api.utils.PageInfo; |
|
|
|
import cn.escheduler.common.enums.UserType; |
|
|
|
import cn.escheduler.common.enums.UserType; |
|
|
|
|
|
|
|
import cn.escheduler.dao.mapper.ProcessDefinitionMapper; |
|
|
|
import cn.escheduler.dao.mapper.ProjectMapper; |
|
|
|
import cn.escheduler.dao.mapper.ProjectMapper; |
|
|
|
import cn.escheduler.dao.mapper.ProjectUserMapper; |
|
|
|
import cn.escheduler.dao.mapper.ProjectUserMapper; |
|
|
|
import cn.escheduler.dao.mapper.UserMapper; |
|
|
|
import cn.escheduler.dao.mapper.UserMapper; |
|
|
|
|
|
|
|
import cn.escheduler.dao.model.ProcessDefinition; |
|
|
|
import cn.escheduler.dao.model.Project; |
|
|
|
import cn.escheduler.dao.model.Project; |
|
|
|
import cn.escheduler.dao.model.ProjectUser; |
|
|
|
import cn.escheduler.dao.model.ProjectUser; |
|
|
|
import cn.escheduler.dao.model.User; |
|
|
|
import cn.escheduler.dao.model.User; |
|
|
@ -55,6 +57,9 @@ public class ProjectService extends BaseService{ |
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
private ProjectUserMapper projectUserMapper; |
|
|
|
private ProjectUserMapper projectUserMapper; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
|
|
private ProcessDefinitionMapper processDefinitionMapper; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* create project |
|
|
|
* create project |
|
|
|
* |
|
|
|
* |
|
|
@ -199,6 +204,12 @@ public class ProjectService extends BaseService{ |
|
|
|
if (checkResult != null) { |
|
|
|
if (checkResult != null) { |
|
|
|
return checkResult; |
|
|
|
return checkResult; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
List<ProcessDefinition> processDefinitionList = processDefinitionMapper.queryAllDefinitionList(projectId); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(processDefinitionList.size() > 0){ |
|
|
|
|
|
|
|
putMsg(result, Status.DELETE_PROJECT_ERROR_DEFINES_NOT_NULL); |
|
|
|
|
|
|
|
return result; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
int delete = projectMapper.delete(projectId); |
|
|
|
int delete = projectMapper.delete(projectId); |
|
|
|
if (delete > 0) { |
|
|
|
if (delete > 0) { |
|
|
|