修改bug

master
bynt 9 months ago
parent 9488739766
commit 7d56b1e4bb

@ -139,7 +139,7 @@ public class ModelRecordServiceImpl implements ModeRecordService {
@Transactional(rollbackFor = Exception.class)
public Boolean updateNumById(String path, Integer num, Long downId) {
ModeRecord downRecord = modeRecordRepository.findById(downId).orElseGet(ModeRecord::new);
if (ObjectUtil.isNull(downRecord) && ObjectUtil.isNull(downRecord.getId())) {
if (ObjectUtil.isNotNull(downRecord) && ObjectUtil.isNotNull(downRecord.getId())) {
modeRecordRepository.updateStatusAndPathById(DefaultNumberConstants.ONE_NUMBER, path, num, downId);
modeRecordRepository.updateStatusNumById(DefaultNumberConstants.ONE_NUMBER, num, downRecord.getParentId());
return Boolean.TRUE;

@ -20,7 +20,6 @@ public class DeliveryProperties {
@ApiModelProperty("文件地址")
private String fileUrl;
@ApiModelProperty("公钥")
private String publicKey;

@ -188,6 +188,7 @@ public class DmpCallbackServiceImpl implements DmpCallbackService {
@SneakyThrows(value = ZipException.class)
private void downResource(String taskName, DeliveryRecord
byTaskName, List<List<String>> originalList, List<String> responseList) {
log.info("=================== the task name {} response size {} ===================",taskName,responseList.size());
Integer type = byTaskName.getType();
String uuid = IdUtil.fastSimpleUUID();
List<String> csvList = Lists.newArrayList();
@ -237,6 +238,7 @@ public class DmpCallbackServiceImpl implements DmpCallbackService {
String filePath = zipPath.substring
(zipPath.lastIndexOf(StrPool.SLASH) + DefaultNumberConstants.ONE_NUMBER);
FileUtil.del(csvPath);
log.info("================== the zip path {} size {} down id {} ==================",zipPath,originalList.size(),byTaskName.getDownId());
String downUrl = deliveryProperties.getDmpDownPath().concat(filePath);
if (type == DefaultNumberConstants.TWO_NUMBER) {
deliveryRecordClient.updatePath(zipPath, downUrl, byTaskName.getDownId(), SecurityConstants.FROM_IN);

Loading…
Cancel
Save