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
b0c7d084
Commit
b0c7d084
authored
Nov 10, 2023
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
支付成功增加验劵
parent
97d8f520
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
QPServiceImpl.java
...rc/main/java/share/system/service/impl/QPServiceImpl.java
+6
-3
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+2
-0
No files found.
share-system/src/main/java/share/system/service/impl/QPServiceImpl.java
View file @
b0c7d084
...
@@ -55,7 +55,7 @@ public class QPServiceImpl implements QPService {
...
@@ -55,7 +55,7 @@ public class QPServiceImpl implements QPService {
@Override
@Override
public
TuangouReceiptPrepareResponseEntityVo
consumeByUser
(
String
code
,
String
openShopUuid
)
{
public
TuangouReceiptPrepareResponseEntityVo
consumeByUser
(
String
code
,
String
openShopUuid
)
{
//验券准备
//验券准备
TuangouReceiptPrepareResponseEntity
prepare
=
prepare
(
code
,
""
);
TuangouReceiptPrepareResponseEntity
prepare
=
prepare
(
code
,
openShopUuid
);
SCoupon
sCoupon
=
isCouponService
.
selectSCouponByName
(
prepare
.
getDeal_title
());
SCoupon
sCoupon
=
isCouponService
.
selectSCouponByName
(
prepare
.
getDeal_title
());
if
(
sCoupon
==
null
)
{
if
(
sCoupon
==
null
)
{
throw
new
RuntimeException
(
"未找到对应的优惠券"
);
throw
new
RuntimeException
(
"未找到对应的优惠券"
);
...
@@ -63,10 +63,13 @@ public class QPServiceImpl implements QPService {
...
@@ -63,10 +63,13 @@ public class QPServiceImpl implements QPService {
TuangouReceiptPrepareResponseEntityVo
response
=
new
TuangouReceiptPrepareResponseEntityVo
();
TuangouReceiptPrepareResponseEntityVo
response
=
new
TuangouReceiptPrepareResponseEntityVo
();
//查询领取记录表
//查询领取记录表
LambdaQueryWrapper
<
SConsumerCoupon
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
SConsumerCoupon
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
SConsumerCoupon:
:
get
CouponId
,
prepare
.
getDeal_title
());
queryWrapper
.
eq
(
SConsumerCoupon:
:
get
DealId
,
prepare
.
getDeal_id
());
SConsumerCoupon
one
=
isConsumerCouponService
.
getOne
(
queryWrapper
);
SConsumerCoupon
one
=
isConsumerCouponService
.
getOne
(
queryWrapper
);
if
(
ObjectUtils
.
isEmpty
(
one
))
{
throw
new
RuntimeException
(
"该券码已被使用"
);
}
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
if
(
ObjectUtils
.
isNotEmpty
(
one
))
{
if
(
ObjectUtils
.
isNotEmpty
(
sCoupon
))
{
SConsumerCoupon
sConsumerCoupon
=
new
SConsumerCoupon
();
SConsumerCoupon
sConsumerCoupon
=
new
SConsumerCoupon
();
sConsumerCoupon
.
setDealId
(
prepare
.
getDeal_id
());
sConsumerCoupon
.
setDealId
(
prepare
.
getDeal_id
());
sConsumerCoupon
.
setName
(
prepare
.
getDeal_title
());
sConsumerCoupon
.
setName
(
prepare
.
getDeal_title
());
...
...
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
b0c7d084
...
@@ -203,6 +203,8 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper,SOrder> implemen
...
@@ -203,6 +203,8 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper,SOrder> implemen
consumerCoupon
.
setId
(
tuangouReceiptPrepareResponseEntityVo
.
getConsumerCouponId
());
consumerCoupon
.
setId
(
tuangouReceiptPrepareResponseEntityVo
.
getConsumerCouponId
());
consumerCoupon
.
setUseStatus
(
UserStatusEnum
.
USED
.
getCode
());
consumerCoupon
.
setUseStatus
(
UserStatusEnum
.
USED
.
getCode
());
consumerCouponService
.
updateById
(
consumerCoupon
);
consumerCouponService
.
updateById
(
consumerCoupon
);
//验劵
qpService
.
consume
(
request
.
getCode
(),
1
,
sStore
.
getOpenShopUuid
());
}
else
{
}
else
{
consumerCouponService
.
deleteSConsumerCouponById
(
tuangouReceiptPrepareResponseEntityVo
.
getConsumerCouponId
());
consumerCouponService
.
deleteSConsumerCouponById
(
tuangouReceiptPrepareResponseEntityVo
.
getConsumerCouponId
());
}
}
...
...
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