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
a40a9be2
Commit
a40a9be2
authored
Jun 20, 2023
by
wangzb
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP1.5.4' into MVP1.5.4
parents
bbcea31d
e5b8b3db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
29 deletions
+26
-29
TOrderServiceImpl.java
...ud/plus/v1/yifu/order/service/impl/TOrderServiceImpl.java
+26
-29
No files found.
yifu-order/yifu-order-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/order/service/impl/TOrderServiceImpl.java
View file @
a40a9be2
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
order
.
service
.
impl
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
order
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
@@ -684,8 +683,6 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
...
@@ -684,8 +683,6 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
*/
*/
@Override
@Override
public
R
receiveOrderNew
(
OrderAttVo
vo
)
throws
IOException
{
public
R
receiveOrderNew
(
OrderAttVo
vo
)
throws
IOException
{
log
.
error
(
"ssssssssssssssss"
+
JSON
.
toJSONString
(
vo
));
if
(
Common
.
isEmpty
(
vo
.
getOrderNo
())){
if
(
Common
.
isEmpty
(
vo
.
getOrderNo
())){
return
R
.
failed
(
OrderConstants
.
ORDER_NO_IS_EMPTY
);
return
R
.
failed
(
OrderConstants
.
ORDER_NO_IS_EMPTY
);
}
}
...
@@ -709,35 +706,35 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
...
@@ -709,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