fix(工作台): 首页获取遗留缺陷集成配置为空时报错

This commit is contained in:
song-cc-rock 2024-11-18 17:53:38 +08:00 committed by Craftsman
parent 83ed18b4bf
commit b825aa7a4e
1 changed files with 6 additions and 0 deletions

View File

@ -38,6 +38,9 @@ import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors;
/**
* @author song-cc-rock
*/
@Service
@Transactional(rollbackFor = Exception.class)
public class BugCommonService {
@ -225,6 +228,9 @@ public class BugCommonService {
*/
public String getPlatformHandlerUser(String projectId, String currentUserId, String currentOrgId) {
ServiceIntegration serviceIntegration = projectApplicationService.getPlatformServiceIntegrationWithSyncOrDemand(projectId, true);
if (serviceIntegration == null) {
return null;
}
String platformUserName = userPlatformAccountService.getPlatformUserName(currentUserId, currentOrgId, serviceIntegration.getPluginId());
List<SelectOption> headerHandlerOption = getHeaderHandlerOption(projectId);
if (StringUtils.isNotBlank(platformUserName)) {