|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public String getPreFixPath(String resourceCode, String targetCode) { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (StringUtils.isBlank(resourceCode) || StringUtils.isBlank(targetCode)){ | 
|---|
|  |  |  | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"路径参数不完整"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | SystemDict queryDto = new SystemDict(); | 
|---|
|  |  |  | queryDto.setCode(Constants.FTP); | 
|---|
|  |  |  | queryDto.setDeleted(Boolean.FALSE); | 
|---|
|  |  |  | SystemDict dictData = systemDictService.findOne(queryDto); | 
|---|
|  |  |  | if (dictData == null) { | 
|---|
|  |  |  | throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(), "数据值不存在"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | List<SystemDictData> list = systemDictDataService.findList(dictData.getId(), Arrays.asList(resourceCode, targetCode)); | 
|---|
|  |  |  | String resourcePath = list.stream().filter(s->s.getLabel().equals(resourceCode)).findFirst().map(s->s.getCode()).orElse(""); | 
|---|
|  |  |  | String targetPath = list.stream().filter(s -> s.getLabel().equals(targetCode)).findFirst().map(s -> s.getCode()).orElse(""); | 
|---|
|  |  |  | return resourcePath+targetPath; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|