Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
iClear-Connect-Pre-Clearance
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
tao.mo
2024-12-23 20:56:38 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f7fe9576d1ac3c13e64ac2eeac3312952f29ca14
f7fe9576
1 parent
ab4fcdfe
biz-customer | 修改 | 不删除提交上传失败文件
mt 2024年12月23日20:56:32
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
server/biz-customer/src/main/java/com/fedex/connect/customer/service/biz/impl/AttachmentServiceImpl.java
server/biz-customer/src/main/java/com/fedex/connect/customer/service/biz/impl/ConsignmentServiceImpl.java
server/biz-customer/src/main/java/com/fedex/connect/customer/validate/controller/biz/AttachmentValidate.java
server/biz-customer/src/main/java/com/fedex/connect/customer/service/biz/impl/AttachmentServiceImpl.java
View file @
f7fe957
...
...
@@ -78,8 +78,8 @@ public class AttachmentServiceImpl extends BaseService implements IAttachmentSer
++
i
;
}
}
catch
(
Exception
ex
){
//如果上传过程中存在失败,则所有已上传的文件进行删除
attachmentUtil
.
deleteAttachments
(
attachmentList
);
//如果上传过程中存在失败,则所有已上传的文件进行删除
,已上传文件不进行删除
//
attachmentUtil.deleteAttachments(attachmentList);
throw
ex
;
}
return
attachmentList
;
...
...
server/biz-customer/src/main/java/com/fedex/connect/customer/service/biz/impl/ConsignmentServiceImpl.java
View file @
f7fe957
...
...
@@ -132,15 +132,15 @@ public class ConsignmentServiceImpl extends BaseService implements IConsignmentS
consignmentUtil
.
submitInfo
(
consignment
,
attachmentList
,
uploadRecord
,
user
);
}
catch
(
OpErrorException
ex
){
/**
* 提交异常,需要删除对应已上传附件
* 提交异常,需要删除对应已上传附件
,已上传文件不进行删除
*/
attachmentService
.
deleteAttachments
(
attachmentList
);
//
attachmentService.deleteAttachments(attachmentList);
throw
ex
;
}
catch
(
Exception
ex
){
/**
* 提交异常,需要删除对应已上传附件
* 提交异常,需要删除对应已上传附件
,已上传文件不进行删除
*/
attachmentService
.
deleteAttachments
(
attachmentList
);
//
attachmentService.deleteAttachments(attachmentList);
responseUtils
.
fail
(
ResponseCode
.
MESSAGE_CODE_30016
,
ex
);
}
return
responseUtils
.
success
(
ResponseCode
.
MESSAGE_CODE_30015
);
...
...
server/biz-customer/src/main/java/com/fedex/connect/customer/validate/controller/biz/AttachmentValidate.java
View file @
f7fe957
...
...
@@ -35,7 +35,7 @@ public class AttachmentValidate {
public
void
validateFile
(
MultipartFile
[]
files
,
ConsignmentBo
consignmentBo
){
//文件为空
if
(
Objects
.
isNull
(
files
)
||
files
.
length
==
DigitConstants
.
DIGIT_
MINUS_ONE
||
files
.
length
==
DigitConstants
.
DIGIT_
ZERO
||
Objects
.
isNull
(
consignmentBo
)
||
Objects
.
isNull
(
consignmentBo
.
getAttachmentBizTypeList
())){
responseUtils
.
fail
(
ResponseCode
.
MESSAGE_CODE_30006
);
...
...
Please
register
or
login
to post a comment