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
1830afdf
Commit
1830afdf
authored
Jul 08, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加权益和充值订单的取消订单接口
parent
fd49f0cf
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
60 additions
and
8 deletions
+60
-8
EquityMembersOrderController.java
...e/web/controller/system/EquityMembersOrderController.java
+7
-2
RechargeController.java
.../java/share/web/controller/system/RechargeController.java
+7
-2
EquityMembersOrderService.java
.../java/share/system/service/EquityMembersOrderService.java
+4
-0
RechargeService.java
...m/src/main/java/share/system/service/RechargeService.java
+4
-0
EquityMembersOrderServiceImpl.java
...re/system/service/impl/EquityMembersOrderServiceImpl.java
+19
-4
RechargeServiceImpl.java
...n/java/share/system/service/impl/RechargeServiceImpl.java
+19
-0
No files found.
share-front/src/main/java/share/web/controller/system/EquityMembersOrderController.java
View file @
1830afdf
...
@@ -96,12 +96,17 @@ public class EquityMembersOrderController extends BaseController {
...
@@ -96,12 +96,17 @@ public class EquityMembersOrderController extends BaseController {
@PostMapping
(
"/createEquityMembers"
)
@PostMapping
(
"/createEquityMembers"
)
public
R
<
EquityMembersResultResponse
>
createOrder
(
@RequestBody
@Validated
CreateEquityMembersRequest
request
)
{
public
R
<
EquityMembersResultResponse
>
createOrder
(
@RequestBody
@Validated
CreateEquityMembersRequest
request
)
{
if
(
"1"
.
equals
(
redisUtil
.
frontInOutLogSwitch
()))
{
if
(
"1"
.
equals
(
redisUtil
.
frontInOutLogSwitch
()))
{
log
.
info
(
"
S
OrderController method preOrder 入参 {}"
,
JsonConvertUtil
.
write2JsonStr
(
request
));
log
.
info
(
"
EquityMembers
OrderController method preOrder 入参 {}"
,
JsonConvertUtil
.
write2JsonStr
(
request
));
}
}
EquityMembersResultResponse
response
=
equityMembersOrderService
.
createEquityMembers
(
request
);
EquityMembersResultResponse
response
=
equityMembersOrderService
.
createEquityMembers
(
request
);
if
(
"1"
.
equals
(
redisUtil
.
frontInOutLogSwitch
()))
{
if
(
"1"
.
equals
(
redisUtil
.
frontInOutLogSwitch
()))
{
log
.
info
(
"
S
OrderController method preOrder 出参 {}"
,
JsonConvertUtil
.
write2JsonStr
(
response
));
log
.
info
(
"
EquityMembers
OrderController method preOrder 出参 {}"
,
JsonConvertUtil
.
write2JsonStr
(
response
));
}
}
return
R
.
ok
(
response
);
return
R
.
ok
(
response
);
}
}
@RequestMapping
(
value
=
"/cancelPay"
,
method
=
RequestMethod
.
POST
)
public
R
<
Boolean
>
cancelPay
(
@RequestParam
(
"equityOrderNo"
)
String
equityOrderNo
)
{
return
R
.
ok
(
equityMembersOrderService
.
cancelPay
(
equityOrderNo
));
}
}
}
share-front/src/main/java/share/web/controller/system/RechargeController.java
View file @
1830afdf
...
@@ -96,12 +96,17 @@ public class RechargeController extends BaseController {
...
@@ -96,12 +96,17 @@ public class RechargeController extends BaseController {
@PostMapping
(
"/createRecharge"
)
@PostMapping
(
"/createRecharge"
)
public
R
<
RechargePayResultResponse
>
createOrder
(
@RequestBody
@Validated
CreateRechargeRequest
request
)
{
public
R
<
RechargePayResultResponse
>
createOrder
(
@RequestBody
@Validated
CreateRechargeRequest
request
)
{
if
(
"1"
.
equals
(
redisUtil
.
frontInOutLogSwitch
()))
{
if
(
"1"
.
equals
(
redisUtil
.
frontInOutLogSwitch
()))
{
log
.
info
(
"
SOrder
Controller method preOrder 入参 {}"
,
JsonConvertUtil
.
write2JsonStr
(
request
));
log
.
info
(
"
Recharge
Controller method preOrder 入参 {}"
,
JsonConvertUtil
.
write2JsonStr
(
request
));
}
}
RechargePayResultResponse
response
=
rechargeService
.
createRecharge
(
request
);
RechargePayResultResponse
response
=
rechargeService
.
createRecharge
(
request
);
if
(
"1"
.
equals
(
redisUtil
.
frontInOutLogSwitch
()))
{
if
(
"1"
.
equals
(
redisUtil
.
frontInOutLogSwitch
()))
{
log
.
info
(
"
SOrder
Controller method preOrder 出参 {}"
,
JsonConvertUtil
.
write2JsonStr
(
response
));
log
.
info
(
"
Recharge
Controller method preOrder 出参 {}"
,
JsonConvertUtil
.
write2JsonStr
(
response
));
}
}
return
R
.
ok
(
response
);
return
R
.
ok
(
response
);
}
}
@RequestMapping
(
value
=
"/cancelPay"
,
method
=
RequestMethod
.
POST
)
public
R
<
Boolean
>
cancelPay
(
@RequestParam
(
"rechargeNo"
)
String
rechargeNo
)
{
return
R
.
ok
(
rechargeService
.
cancelPay
(
rechargeNo
));
}
}
}
share-system/src/main/java/share/system/service/EquityMembersOrderService.java
View file @
1830afdf
...
@@ -68,4 +68,8 @@ public interface EquityMembersOrderService extends IService<EquityMembersOrder>
...
@@ -68,4 +68,8 @@ public interface EquityMembersOrderService extends IService<EquityMembersOrder>
EquityMembersOrder
getInfoByEntity
(
EquityMembersOrder
equityMembersOrderParam
);
EquityMembersOrder
getInfoByEntity
(
EquityMembersOrder
equityMembersOrderParam
);
void
paymentSuccessful
(
EquityMembersOrder
equityMembersOrder
);
void
paymentSuccessful
(
EquityMembersOrder
equityMembersOrder
);
Boolean
cancelPay
(
String
equityOrderNo
);
EquityMembersOrder
getByEquityOrderNo
(
String
equityOrderNo
);
}
}
share-system/src/main/java/share/system/service/RechargeService.java
View file @
1830afdf
...
@@ -68,4 +68,8 @@ public interface RechargeService extends IService<Recharge> {
...
@@ -68,4 +68,8 @@ public interface RechargeService extends IService<Recharge> {
Recharge
getInfoByEntity
(
Recharge
rechargeParam
);
Recharge
getInfoByEntity
(
Recharge
rechargeParam
);
void
paymentSuccessful
(
Recharge
recharge
);
void
paymentSuccessful
(
Recharge
recharge
);
Boolean
cancelPay
(
String
rechargeNo
);
Recharge
getByRechargeNo
(
String
rechargeNo
);
}
}
share-system/src/main/java/share/system/service/impl/EquityMembersOrderServiceImpl.java
View file @
1830afdf
...
@@ -3,6 +3,7 @@ package share.system.service.impl;
...
@@ -3,6 +3,7 @@ package share.system.service.impl;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.json.JSONObject
;
import
cn.hutool.json.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -23,10 +24,7 @@ import share.system.request.CreateEquityMembersRequest;
...
@@ -23,10 +24,7 @@ import share.system.request.CreateEquityMembersRequest;
import
share.system.response.EquityMembersResultResponse
;
import
share.system.response.EquityMembersResultResponse
;
import
share.system.service.*
;
import
share.system.service.*
;
import
java.util.Date
;
import
java.util.*
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 权益会员订单Service业务层处理
* 权益会员订单Service业务层处理
...
@@ -195,6 +193,23 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde
...
@@ -195,6 +193,23 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde
updateEquityMembersOrder
(
equityMembersOrder
);
updateEquityMembersOrder
(
equityMembersOrder
);
}
}
@Override
public
Boolean
cancelPay
(
String
equityOrderNo
)
{
EquityMembersOrder
equityMembersOrder
=
getByEquityOrderNo
(
equityOrderNo
);
if
(
Objects
.
isNull
(
equityMembersOrder
))
{
throw
new
BaseException
(
"订单不存在!"
);
}
removeById
(
equityMembersOrder
.
getId
());
return
true
;
}
@Override
public
EquityMembersOrder
getByEquityOrderNo
(
String
equityOrderNo
)
{
LambdaQueryWrapper
<
EquityMembersOrder
>
lqw
=
Wrappers
.
lambdaQuery
();
lqw
.
eq
(
EquityMembersOrder:
:
getEquityOrderNo
,
equityOrderNo
);
return
getOne
(
lqw
);
}
private
EquityMembersOrder
generatEquityMembersOrder
(
CreateEquityMembersRequest
request
,
SConsumer
user
)
{
private
EquityMembersOrder
generatEquityMembersOrder
(
CreateEquityMembersRequest
request
,
SConsumer
user
)
{
EquityMembersOrder
equityMembersOrder
=
new
EquityMembersOrder
();
EquityMembersOrder
equityMembersOrder
=
new
EquityMembersOrder
();
BeanUtils
.
copyProperties
(
request
,
equityMembersOrder
);
BeanUtils
.
copyProperties
(
request
,
equityMembersOrder
);
...
...
share-system/src/main/java/share/system/service/impl/RechargeServiceImpl.java
View file @
1830afdf
...
@@ -2,6 +2,7 @@ package share.system.service.impl;
...
@@ -2,6 +2,7 @@ package share.system.service.impl;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -25,6 +26,7 @@ import java.math.BigDecimal;
...
@@ -25,6 +26,7 @@ import java.math.BigDecimal;
import
java.math.RoundingMode
;
import
java.math.RoundingMode
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Objects
;
/**
/**
* 充值记录Service业务层处理
* 充值记录Service业务层处理
...
@@ -175,6 +177,23 @@ public class RechargeServiceImpl extends ServiceImpl<RechargeMapper, Recharge> i
...
@@ -175,6 +177,23 @@ public class RechargeServiceImpl extends ServiceImpl<RechargeMapper, Recharge> i
updateRecharge
(
recharge
);
updateRecharge
(
recharge
);
}
}
@Override
public
Boolean
cancelPay
(
String
rechargeNo
)
{
Recharge
recharge
=
getByRechargeNo
(
rechargeNo
);
if
(
Objects
.
isNull
(
recharge
))
{
throw
new
BaseException
(
"订单不存在!"
);
}
removeById
(
recharge
.
getId
());
return
true
;
}
@Override
public
Recharge
getByRechargeNo
(
String
rechargeNo
)
{
LambdaQueryWrapper
<
Recharge
>
lqw
=
Wrappers
.
lambdaQuery
();
lqw
.
eq
(
Recharge:
:
getRechargeNo
,
rechargeNo
);
return
getOne
(
lqw
);
}
private
void
extracted
(
Recharge
recharge
)
{
private
void
extracted
(
Recharge
recharge
)
{
//新增会员钱包
//新增会员钱包
RechargeConf
rechargeConf
=
rechargeConfService
.
selectRechargeConfById
(
recharge
.
getRechargeConfId
());
RechargeConf
rechargeConf
=
rechargeConfService
.
selectRechargeConfById
(
recharge
.
getRechargeConfId
());
...
...
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