Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_ht
Overview
Overview
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
pseer
gxpt_ht
Commits
44d6b7cd
Commit
44d6b7cd
authored
Jan 19, 2024
by
wuwenlong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into test
parents
13d26afe
dda748e1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
1 deletions
+28
-1
SOrderController.java
...in/java/share/web/controller/system/SOrderController.java
+9
-0
OrderTask.java
share-quartz/src/main/java/share/quartz/task/OrderTask.java
+2
-1
ISOrderService.java
...em/src/main/java/share/system/service/ISOrderService.java
+7
-0
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+10
-0
No files found.
share-front/src/main/java/share/web/controller/system/SOrderController.java
View file @
44d6b7cd
...
@@ -116,6 +116,15 @@ public class SOrderController extends BaseController
...
@@ -116,6 +116,15 @@ public class SOrderController extends BaseController
return
R
.
ok
(
sOrderService
.
cancel
(
orderNo
));
return
R
.
ok
(
sOrderService
.
cancel
(
orderNo
));
}
}
/**
* 取消支付
*/
@ApiOperation
(
value
=
"取消支付"
)
@RequestMapping
(
value
=
"/cancelPay"
,
method
=
RequestMethod
.
POST
)
public
R
<
Boolean
>
cancelPay
(
@RequestBody
@Validated
@NotBlank
(
message
=
"订单编号不能为空"
)
String
orderNo
)
{
return
R
.
ok
(
sOrderService
.
cancelPay
(
orderNo
));
}
/**
/**
* 根据参数计算订单价格
* 根据参数计算订单价格
...
...
share-quartz/src/main/java/share/quartz/task/OrderTask.java
View file @
44d6b7cd
...
@@ -102,7 +102,8 @@ public class OrderTask {
...
@@ -102,7 +102,8 @@ public class OrderTask {
SOrder
sOrder
=
orderService
.
getByOrderNo
(
String
.
valueOf
(
data
));
SOrder
sOrder
=
orderService
.
getByOrderNo
(
String
.
valueOf
(
data
));
if
(
ObjectUtil
.
isNull
(
sOrder
))
{
if
(
ObjectUtil
.
isNull
(
sOrder
))
{
logger
.
error
(
"orderTask.autoCancel | 订单不存在,orderNo: "
+
data
);
logger
.
error
(
"orderTask.autoCancel | 订单不存在,orderNo: "
+
data
);
throw
new
BaseException
(
"订单不存在,orderNo: "
+
data
);
continue
;
// throw new BaseException("订单不存在,orderNo: " + data);
}
}
boolean
result
=
autoCancel
(
sOrder
);
boolean
result
=
autoCancel
(
sOrder
);
if
(!
result
)
{
if
(!
result
)
{
...
...
share-system/src/main/java/share/system/service/ISOrderService.java
View file @
44d6b7cd
...
@@ -142,6 +142,13 @@ public interface ISOrderService extends IService<SOrder>
...
@@ -142,6 +142,13 @@ public interface ISOrderService extends IService<SOrder>
*/
*/
boolean
cancel
(
String
orderNo
);
boolean
cancel
(
String
orderNo
);
/**
* 取消支付
* @param orderNo
* @return
*/
boolean
cancelPay
(
String
orderNo
);
SOrder
selectSOrderByOrderNo
(
String
orderNo
);
SOrder
selectSOrderByOrderNo
(
String
orderNo
);
SOrderVo
queryOrderInfoByNo
(
String
orderNo
);
SOrderVo
queryOrderInfoByNo
(
String
orderNo
);
...
...
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
44d6b7cd
...
@@ -701,6 +701,16 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -701,6 +701,16 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
}
}
@Override
@Override
public
boolean
cancelPay
(
String
orderNo
)
{
SOrder
order
=
getByOrderNo
(
orderNo
);
if
(
Objects
.
isNull
(
order
))
{
throw
new
BaseException
(
"订单不存在!"
);
}
removeById
(
order
.
getId
());
return
true
;
}
@Override
public
SOrder
selectSOrderByOrderNo
(
String
orderNo
)
{
public
SOrder
selectSOrderByOrderNo
(
String
orderNo
)
{
LambdaQueryWrapper
<
SOrder
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
SOrder
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
SOrder:
:
getOrderNo
,
orderNo
);
queryWrapper
.
eq
(
SOrder:
:
getOrderNo
,
orderNo
);
...
...
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