project set workspace_id

This commit is contained in:
Captain.B 2020-02-19 15:42:03 +08:00
parent ba4c27281e
commit a6cca8e701
1 changed files with 3 additions and 2 deletions

View File

@ -2,6 +2,7 @@ package io.metersphere.service;
import io.metersphere.base.domain.Project; import io.metersphere.base.domain.Project;
import io.metersphere.base.mapper.ProjectMapper; import io.metersphere.base.mapper.ProjectMapper;
import io.metersphere.user.SessionUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -20,8 +21,8 @@ public class ProjectService {
long createTime = System.currentTimeMillis(); long createTime = System.currentTimeMillis();
project.setCreateTime(createTime); project.setCreateTime(createTime);
project.setUpdateTime(createTime); project.setUpdateTime(createTime);
// todo set workspace id // set workspace id
// project.setWorkspaceId(); project.setWorkspaceId(SessionUtils.getCurrentWorkspaceId());
projectMapper.insertSelective(project); projectMapper.insertSelective(project);
return project; return project;
} }