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
d1f47fc6
Commit
d1f47fc6
authored
Feb 24, 2023
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增订单作废
parent
9910a63d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
0 deletions
+35
-0
OrderConstants.java
...fu/cloud/plus/v1/yifu/order/constants/OrderConstants.java
+4
-0
OrderController.java
.../cloud/plus/v1/yifu/order/controller/OrderController.java
+13
-0
TOrderService.java
.../yifu/cloud/plus/v1/yifu/order/service/TOrderService.java
+9
-0
TOrderServiceImpl.java
...ud/plus/v1/yifu/order/service/impl/TOrderServiceImpl.java
+9
-0
No files found.
yifu-order/yifu-order-api/src/main/java/com/yifu/cloud/plus/v1/yifu/order/constants/OrderConstants.java
View file @
d1f47fc6
...
...
@@ -114,4 +114,8 @@ public class OrderConstants {
* 一次性导出不可超过20000条,请分批导出
*/
public
static
final
String
EXPORT_TOO_LONG
=
"一次性导出不可超过20000条,请分批导出"
;
/**
* 订单作废失败
*/
public
static
final
String
ORDER_INVALID_FAILED
=
"订单状态为待办理才可作废"
;
}
yifu-order/yifu-order-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/order/controller/OrderController.java
View file @
d1f47fc6
...
...
@@ -140,4 +140,17 @@ public class OrderController {
return
R
.
ok
(
tOrderService
.
getOrderReplyPageList
(
page
,
orderNo
));
}
/**
* 订单作废
*
* @author licancan
* @param id
* @return {@link R< String>}
*/
@PostMapping
(
"/invalidOrder"
)
@Operation
(
summary
=
"订单作废"
,
description
=
"订单作废"
)
public
R
invalidOrder
(
@RequestParam
String
id
)
{
return
tOrderService
.
invalidOrder
(
id
);
}
}
yifu-order/yifu-order-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/order/service/TOrderService.java
View file @
d1f47fc6
...
...
@@ -108,4 +108,13 @@ public interface TOrderService extends IService<TOrder> {
* @throws IOException
*/
R
receiveOrderReply
(
OrderReplyAddVO
vo
)
throws
IOException
;
/**
* 订单作废
*
* @author licancan
* @param id
* @return {@link R}
*/
R
invalidOrder
(
String
id
);
}
yifu-order/yifu-order-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/order/service/impl/TOrderServiceImpl.java
View file @
d1f47fc6
...
...
@@ -582,4 +582,13 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
return
R
.
ok
(
OrderConstants
.
OPERATE_SUCCESS
);
}
public
R
invalidOrder
(
String
id
)
{
TOrder
one
=
baseMapper
.
selectById
(
id
);
if
(
Common
.
isNotNull
(
one
)
&&
CommonConstants
.
ZERO_INT
==
one
.
getOrderStatus
())
{
return
R
.
failed
(
OrderConstants
.
ORDER_INVALID_FAILED
);
}
one
.
setDeleteFlag
(
CommonConstants
.
ONE_INT
);
baseMapper
.
updateById
(
one
);
return
R
.
ok
();
}
}
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