Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
e5b8b3db
Commit
e5b8b3db
authored
Jun 20, 2023
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目订单附件上传调试---代码格式化
parent
ea01cefc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
26 deletions
+26
-26
TOrderServiceImpl.java
...ud/plus/v1/yifu/order/service/impl/TOrderServiceImpl.java
+26
-26
No files found.
yifu-order/yifu-order-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/order/service/impl/TOrderServiceImpl.java
View file @
e5b8b3db
...
@@ -706,35 +706,35 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
...
@@ -706,35 +706,35 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
}
}
}
}
if
(
vo
.
getFile1
().
equals
(
"fileOne"
))
{
if
(
vo
.
getFile1
().
equals
(
"fileOne"
))
{
if
(
ArrayUtils
.
isNotEmpty
(
vo
.
getFile
()))
{
if
(
ArrayUtils
.
isNotEmpty
(
vo
.
getFile
()))
{
for
(
MultipartFile
multipartFile
:
vo
.
getFile
())
{
for
(
MultipartFile
multipartFile
:
vo
.
getFile
())
{
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
multipartFile
.
getOriginalFilename
();
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
multipartFile
.
getOriginalFilename
();
//filePath不传默认存储空间的根目录
//filePath不传默认存储空间的根目录
//支持的附件格式
//支持的附件格式
String
key
=
fileName
;
String
key
=
fileName
;
boolean
flag
=
ossUtil
.
uploadFileByStream
(
multipartFile
.
getInputStream
(),
key
,
null
);
boolean
flag
=
ossUtil
.
uploadFileByStream
(
multipartFile
.
getInputStream
(),
key
,
null
);
if
(
flag
)
{
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
TOrderEnclosure
orderEnclosure
=
new
TOrderEnclosure
();
TOrderEnclosure
orderEnclosure
=
new
TOrderEnclosure
();
orderEnclosure
.
setOrderNo
(
vo
.
getOrderNo
());
orderEnclosure
.
setOrderNo
(
vo
.
getOrderNo
());
orderEnclosure
.
setEnclosureName
(
multipartFile
.
getOriginalFilename
());
orderEnclosure
.
setEnclosureName
(
multipartFile
.
getOriginalFilename
());
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
TWO_INTEGER
);
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
TWO_INTEGER
);
orderEnclosure
.
setEnclosureAddress
(
key
);
orderEnclosure
.
setEnclosureAddress
(
key
);
orderEnclosure
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
orderEnclosure
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
try
{
try
{
tOrderEnclosureService
.
save
(
orderEnclosure
);
tOrderEnclosureService
.
save
(
orderEnclosure
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"订单接收OSS文件上传接口异常:"
+
e
.
getMessage
());
log
.
error
(
"订单接收OSS文件上传接口异常:"
+
e
.
getMessage
());
ossUtil
.
deleteObject
(
null
,
key
);
ossUtil
.
deleteObject
(
null
,
key
);
return
R
.
failed
(
"failed:"
+
e
.
getMessage
());
return
R
.
failed
(
"failed:"
+
e
.
getMessage
());
}
}
else
{
return
R
.
failed
(
OrderConstants
.
OPERATE_FAILED
);
}
}
}
else
{
return
R
.
failed
(
OrderConstants
.
OPERATE_FAILED
);
}
}
}
}
}
}
}
if
(
vo
.
getFile1
().
equals
(
"fileTwo"
))
{
if
(
vo
.
getFile1
().
equals
(
"fileTwo"
))
{
if
(
ArrayUtils
.
isNotEmpty
(
vo
.
getFile
()))
{
if
(
ArrayUtils
.
isNotEmpty
(
vo
.
getFile
()))
{
for
(
MultipartFile
multipartFile
:
vo
.
getFile
())
{
for
(
MultipartFile
multipartFile
:
vo
.
getFile
())
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment