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
70014766
Commit
70014766
authored
Jun 25, 2023
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目订单 附件上传
parent
57ab3185
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
52 deletions
+5
-52
EkpOrderController.java
...oud/plus/v1/yifu/order/controller/EkpOrderController.java
+5
-9
EkpOrderFileTask.java
.../yifu/cloud/plus/v1/yifu/order/util/EkpOrderFileTask.java
+0
-43
No files found.
yifu-order/yifu-order-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/order/controller/EkpOrderController.java
View file @
70014766
...
...
@@ -2,7 +2,6 @@ package com.yifu.cloud.plus.v1.yifu.order.controller;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.order.service.TOrderService
;
import
com.yifu.cloud.plus.v1.yifu.order.util.EkpOrderFileTask
;
import
com.yifu.cloud.plus.v1.yifu.order.vo.OrderAddVO
;
import
com.yifu.cloud.plus.v1.yifu.order.vo.OrderAttVo
;
import
com.yifu.cloud.plus.v1.yifu.order.vo.OrderReplyAddVO
;
...
...
@@ -10,12 +9,9 @@ import io.swagger.v3.oas.annotations.media.Schema;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.annotation.Resource
;
import
java.io.IOException
;
...
...
@@ -34,9 +30,6 @@ public class EkpOrderController {
@Resource
private
TOrderService
tOrderService
;
@Autowired
private
EkpOrderFileTask
ekpOrderFileTask
;
/**
* 接收处理ekp订单
*
...
...
@@ -48,6 +41,9 @@ public class EkpOrderController {
@Schema
(
description
=
"接收处理ekp订单"
)
@PostMapping
(
value
=
"/receiveOrder"
)
public
R
receiveOrder
(
OrderAddVO
vo
)
throws
IOException
{
log
.
error
(
"vo.getCreateTime()111="
+
vo
.
getCreateTime
());
log
.
error
(
"vo.getCreateTime()222="
+
vo
.
getDeptNo
());
log
.
error
(
"vo.getCreateTime()333="
+
vo
.
getOrderNo
());
return
tOrderService
.
receiveOrder
(
vo
);
}
...
...
@@ -62,8 +58,8 @@ public class EkpOrderController {
*/
@Schema
(
description
=
"接收处理ekp附件"
)
@PostMapping
(
value
=
"/receiveOrderNew"
)
public
R
receiveOrder
(
OrderAttVo
vo
)
{
ekpOrderFileTask
.
receiveOrderNew
(
vo
);
public
R
receiveOrder
(
OrderAttVo
vo
)
throws
IOException
{
tOrderService
.
receiveOrderNew
(
vo
);
return
R
.
ok
();
}
...
...
yifu-order/yifu-order-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/order/util/EkpOrderFileTask.java
deleted
100644 → 0
View file @
57ab3185
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
order
.
util
;
import
com.yifu.cloud.plus.v1.yifu.order.service.TOrderService
;
import
com.yifu.cloud.plus.v1.yifu.order.vo.OrderAttVo
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Component
;
import
java.io.IOException
;
/**
* @Author fxj
* @Date 2023/6/25
* @Description
* @Version 1.0
*/
@Slf4j
@Component
public
class
EkpOrderFileTask
{
@Autowired
TOrderService
orderService
;
/**
* @Author fxj
* @Description 订单附件上传
* @Date 15:58 2023/6/25
* @Param
* @return
**/
@Async
public
void
receiveOrderNew
(
OrderAttVo
vo
){
synchronized
(
this
){
try
{
Thread
.
sleep
(
10000
);
orderService
.
receiveOrderNew
(
vo
);
}
catch
(
IOException
e
)
{
log
.
error
(
"订单附件上传异常:"
,
e
);
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
}
}
}
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