|
@@ -120,9 +120,13 @@ public class TeachcloudCommonServiceImpl implements TeachcloudCommonService {
|
|
|
}
|
|
|
Set<Long> privilegeIds = sysRolePrivilegeList.stream().map(s -> s.getPrivilegeId()).collect(Collectors.toSet());
|
|
|
QueryWrapper<SysPrivilege> sysPrivilegeQueryWrapper = new QueryWrapper<>();
|
|
|
- sysPrivilegeQueryWrapper.lambda().in(SysPrivilege::getId, privilegeIds)
|
|
|
+ sysPrivilegeQueryWrapper.lambda()
|
|
|
.eq(SysPrivilege::getEnable, true).eq(SysPrivilege::getFrontDisplay, true)
|
|
|
.orderByAsc(SysPrivilege::getSequence);
|
|
|
+
|
|
|
+ if (!privilegeIds.isEmpty()){
|
|
|
+ sysPrivilegeQueryWrapper.lambda().in(SysPrivilege::getId, privilegeIds);
|
|
|
+ }
|
|
|
List<SysPrivilege> sysPrivilegeList = sysPrivilegeService.list(sysPrivilegeQueryWrapper);
|
|
|
Gson gson = new Gson();
|
|
|
List<MenuDto> menuDtoList = gson.fromJson(JacksonUtil.parseJson(sysPrivilegeList), new TypeToken<List<MenuDto>>() {
|
|
@@ -585,15 +589,11 @@ public class TeachcloudCommonServiceImpl implements TeachcloudCommonService {
|
|
|
String filePath = (String) jsonObject.get(SystemConstant.PATH);
|
|
|
UploadFileEnum uploadFileEnum = UploadFileEnum.valueOf((String) jsonObject.get(SystemConstant.UPLOAD_TYPE));
|
|
|
if (Objects.equals(attachmentType, SystemConstant.LOCAL)) {
|
|
|
- url = SystemConstant.HTTP + dictionaryConfig.sysDomain().getFileHost() + File.separator + filePath;
|
|
|
+ String hostUrl = SystemConstant.getLocalFileHost(dictionaryConfig.sysDomain().getFileHost());
|
|
|
+ filePath = SystemConstant.getLocalFilePath(filePath);
|
|
|
+ url = hostUrl + File.separator + filePath;
|
|
|
} else {
|
|
|
-// if (uploadFileEnum == UploadFileEnum.PAPER) {
|
|
|
-// url = ossUtil.getPrivateUrl(filePath);
|
|
|
url = fileStoreUtil.getPrivateUrl(filePath, uploadFileEnum.getFssType());
|
|
|
-// } else {
|
|
|
-// url = dictionaryConfig.aliYunOssDomain().getUrl() + File.separator + filePath;
|
|
|
-// url = fileStoreUtil.getPrivateUrl(filePath, uploadFileEnum.getFssType());
|
|
|
-// }
|
|
|
}
|
|
|
return url;
|
|
|
}
|
|
@@ -611,16 +611,15 @@ public class TeachcloudCommonServiceImpl implements TeachcloudCommonService {
|
|
|
if (StringUtils.isBlank(path)) {
|
|
|
return null;
|
|
|
}
|
|
|
-
|
|
|
String pathUrl;
|
|
|
if (Objects.equals(type, SystemConstant.LOCAL)) {
|
|
|
- pathUrl = SystemConstant.HTTP + dictionaryConfig.sysDomain().getFileHost() + File.separator + path;
|
|
|
+ String hostUrl = SystemConstant.getLocalFileHost(dictionaryConfig.sysDomain().getFileHost());
|
|
|
+ path = SystemConstant.getLocalFilePath(path);
|
|
|
+ pathUrl = hostUrl + File.separator + path;
|
|
|
} else {
|
|
|
if (isExpire) {
|
|
|
-// pathUrl = ossUtil.getPrivateUrl(path);
|
|
|
pathUrl = fileStoreUtil.getPrivateUrl(path, fileStoreUtil.getUploadEnumByPath(path).getFssType());
|
|
|
} else {
|
|
|
-// pathUrl = dictionaryConfig.aliYunOssDomain().getUrl() + File.separator + path;
|
|
|
pathUrl = fileStoreUtil.getPrivateUrl(path, fileStoreUtil.getUploadEnumByPath(path).getFssType());
|
|
|
}
|
|
|
|
|
@@ -651,7 +650,9 @@ public class TeachcloudCommonServiceImpl implements TeachcloudCommonService {
|
|
|
UploadFileEnum uploadFileEnum = jsonObject.get(SystemConstant.UPLOAD_TYPE).toString().contains(UploadFileEnum.HTML.name()) ? UploadFileEnum.HTML : UploadFileEnum.valueOf((String) jsonObject.get(SystemConstant.UPLOAD_TYPE));
|
|
|
|
|
|
if (Objects.equals(attachmentType, SystemConstant.LOCAL)) {
|
|
|
- pathUrl = SystemConstant.HTTP + dictionaryConfig.sysDomain().getFileHost() + File.separator + filePath;
|
|
|
+ String hostUrl = SystemConstant.getLocalFileHost(dictionaryConfig.sysDomain().getFileHost());
|
|
|
+ filePath = SystemConstant.getLocalFilePath(filePath);
|
|
|
+ pathUrl = hostUrl + File.separator + filePath;
|
|
|
} else {
|
|
|
pathUrl = fileStoreUtil.getPrivateUrl(filePath, uploadFileEnum.getFssType());
|
|
|
}
|