|
@@ -107,7 +107,7 @@ public class SoftItemSoftwareServiceImpl extends ServiceImpl<SoftItemSoftwareMap
|
|
|
RedisService redisService;
|
|
|
|
|
|
@Autowired
|
|
|
- ISoftItemSoftwareService softwareService; //废弃
|
|
|
+ ISoftItemSoftwareService softwareService;
|
|
|
|
|
|
@Autowired
|
|
|
ISoftSoftwareRelationService softwareRelationService;
|
|
@@ -296,11 +296,6 @@ public class SoftItemSoftwareServiceImpl extends ServiceImpl<SoftItemSoftwareMap
|
|
|
}
|
|
|
if (softItemSoftware.getFlag().equals(SoftItemSoftware.Status.CREATE.name()) ||
|
|
|
softItemSoftware.getFlag().equals(SoftItemSoftware.Status.PENDING.name())) {
|
|
|
- //删除关联
|
|
|
-// QueryWrapper<SoftSoftwareRelation> delSoftRelationWrapper = new QueryWrapper<>();
|
|
|
-// delSoftRelationWrapper.eq("SoftwareCode", softItemSoftware.getSoftwareCode());
|
|
|
-// softwareRelationService.remove(delSoftRelationWrapper);
|
|
|
-
|
|
|
//删除软件记录
|
|
|
softItemSoftware.setFlag(SoftItemSoftware.Status.DELETE.name());
|
|
|
|
|
@@ -325,9 +320,7 @@ public class SoftItemSoftwareServiceImpl extends ServiceImpl<SoftItemSoftwareMap
|
|
|
noticeResult.put("override", sysNotices);
|
|
|
template.convertAndSendToUser(softItemSoftware.getUploadFileUser(), "/queue/notice", noticeResult.toJSONString());
|
|
|
}
|
|
|
- //TODO 软件删除后文件记录不删除 待定
|
|
|
-// ossFileRecordService.remove()
|
|
|
-
|
|
|
+
|
|
|
} else {
|
|
|
throw new BusinessException(500, "当前状态不允许删除");
|
|
|
}
|
|
@@ -348,11 +341,7 @@ public class SoftItemSoftwareServiceImpl extends ServiceImpl<SoftItemSoftwareMap
|
|
|
if (!currentUser.getCode().equals(softwareParam.getUploadFileUser())) {
|
|
|
throw new BusinessException(500, "当前上传用户与指定上传用户不一致");
|
|
|
}
|
|
|
-// if (!softItemSoftware.getFlag().equals(SoftItemSoftware.Status.CREATE.name()) ||
|
|
|
-// !softItemSoftware.getFlag().equals(SoftItemSoftware.Status.PENDING.name())) {
|
|
|
-// throw new BusinessException(500, "当前状态不允许修改");
|
|
|
-// }
|
|
|
-//
|
|
|
+
|
|
|
if (softItemSoftware.getFlag().equals(SoftItemSoftware.Status.CREATE.name()) ||
|
|
|
softItemSoftware.getFlag().equals(SoftItemSoftware.Status.PENDING.name())) {
|
|
|
List<FileParam> newFiles = Arrays.stream(softwareParam.getFiles()).filter(FileParam::isCreate).collect(Collectors.toList());
|
|
@@ -425,7 +414,6 @@ public class SoftItemSoftwareServiceImpl extends ServiceImpl<SoftItemSoftwareMap
|
|
|
|
|
|
SysNotice sysNotice = new SysNotice();
|
|
|
sysNotice.setType(SysNotice.Type.B.name());
|
|
|
-// sysNotice.setHandleUrl("/FullScene/ReceiveSoftware/" + softItemSoftware.getSoftwareId());
|
|
|
sysNotice.setHandleUrl(null);
|
|
|
sysNotice.setSubject(softItemSoftware.getSoftwareName() + " 已发布");
|
|
|
sysNotice.setToUser(softItemSoftware.getReceiveUser());
|
|
@@ -503,15 +491,6 @@ public class SoftItemSoftwareServiceImpl extends ServiceImpl<SoftItemSoftwareMap
|
|
|
URL ossUrl = OssClient.initOSS(properties).generatePresignedUrl(properties.getBucket(), softItemSoftware.getBurnAfterItemCode() + '/' + fileParam.getFileName(), expiration);
|
|
|
//本地下载地址
|
|
|
fileItem.put("onlineUrl", ossUrl.toString());
|
|
|
-// String localUrl = repositoryProperties.getProtocol() +
|
|
|
-// "://" +
|
|
|
-// plant.getFileServerIp() + ":" +
|
|
|
-// repositoryProperties.getPort() +
|
|
|
-// "/" +
|
|
|
-// softItemSoftware.getBurnAfterItemCode() +
|
|
|
-// "/" +
|
|
|
-// fileParam.getFileName();
|
|
|
-// fileItem.put("localUrl", localUrl);
|
|
|
files.add(fileItem);
|
|
|
}
|
|
|
JSONObject result = new JSONObject();
|