Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
2cf70f9484
|
@ -28,7 +28,7 @@
|
|||
and test_case.name like CONCAT('%', #{request.name},'%')
|
||||
</if>
|
||||
<if test="request.nodeIds != null and request.nodeIds.size() > 0">
|
||||
and test_plan_test_case.node_id in
|
||||
and test_case.node_id in
|
||||
<foreach collection="request.nodeIds" item="nodeId" separator="," open="(" close=")">
|
||||
#{nodeId}
|
||||
</foreach>
|
||||
|
|
|
@ -53,7 +53,7 @@ public class WorkspaceController {
|
|||
@PostMapping("special/update")
|
||||
@RequiresRoles(RoleConstants.ADMIN)
|
||||
public void updateWorkspaceByAdmin(@RequestBody Workspace workspace) {
|
||||
workspaceService.updateWorkspacebyAdmin(workspace);
|
||||
workspaceService.updateWorkspaceByAdmin(workspace);
|
||||
}
|
||||
|
||||
@GetMapping("special/delete/{workspaceId}")
|
||||
|
|
|
@ -109,12 +109,8 @@ public class OrganizationService {
|
|||
}
|
||||
|
||||
public void updateOrgMember(OrganizationMemberDTO memberDTO) {
|
||||
User user = new User();
|
||||
BeanUtils.copyProperties(memberDTO, user);
|
||||
userMapper.updateByPrimaryKeySelective(user);
|
||||
//
|
||||
String orgId = memberDTO.getOrganizationId();
|
||||
String userId = user.getId();
|
||||
String userId = memberDTO.getId();
|
||||
// 已有角色
|
||||
List<Role> memberRoles = extUserRoleMapper.getOrganizationMemberRoles(orgId, userId);
|
||||
// 修改后的角色
|
||||
|
|
|
@ -52,9 +52,10 @@ public class UserService {
|
|||
String id = user.getId();
|
||||
User user1 = userMapper.selectByPrimaryKey(id);
|
||||
if (user1 != null) {
|
||||
MSException.throwException("user_id_already_exists");
|
||||
MSException.throwException(Translator.get("user_id_already_exists"));
|
||||
}else{
|
||||
createUser(user);
|
||||
}
|
||||
createUser(user);
|
||||
return getUserDTO(user.getId());
|
||||
}
|
||||
|
||||
|
@ -299,7 +300,7 @@ public class UserService {
|
|||
return user;
|
||||
}
|
||||
}
|
||||
MSException.throwException("password_modification_failed");
|
||||
MSException.throwException(Translator.get("password_modification_failed"));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ import org.apache.commons.lang3.StringUtils;
|
|||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -200,12 +201,8 @@ public class WorkspaceService {
|
|||
}
|
||||
|
||||
public void updateWorkspaceMember(WorkspaceMemberDTO memberDTO) {
|
||||
User user = new User();
|
||||
BeanUtils.copyProperties(memberDTO, user);
|
||||
userMapper.updateByPrimaryKeySelective(user);
|
||||
//
|
||||
String workspaceId = memberDTO.getWorkspaceId();
|
||||
String userId = user.getId();
|
||||
String userId = memberDTO.getId();
|
||||
// 已有角色
|
||||
List<Role> memberRoles = extUserRoleMapper.getWorkspaceMemberRoles(workspaceId, userId);
|
||||
// 修改后的角色
|
||||
|
@ -234,11 +231,11 @@ public class WorkspaceService {
|
|||
}
|
||||
}
|
||||
|
||||
public Integer checkSourceRole(String orgId, String userId, String roleId) {
|
||||
return extOrganizationMapper.checkSourceRole(orgId, userId, roleId);
|
||||
public Integer checkSourceRole(String workspaceId, String userId, String roleId) {
|
||||
return extOrganizationMapper.checkSourceRole(workspaceId, userId, roleId);
|
||||
}
|
||||
|
||||
public void updateWorkspacebyAdmin(Workspace workspace) {
|
||||
public void updateWorkspaceByAdmin(Workspace workspace) {
|
||||
workspace.setCreateTime(null);
|
||||
workspace.setUpdateTime(System.currentTimeMillis());
|
||||
workspaceMapper.updateByPrimaryKeySelective(workspace);
|
||||
|
|
Loading…
Reference in New Issue