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
c88ea733
Commit
c88ea733
authored
Jun 24, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改抖音验券
parent
3bf6045f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
TiktokServiceImpl.java
...ain/java/share/system/service/impl/TiktokServiceImpl.java
+12
-11
No files found.
share-system/src/main/java/share/system/service/impl/TiktokServiceImpl.java
View file @
c88ea733
...
@@ -379,15 +379,15 @@ public class TiktokServiceImpl implements TiktokService {
...
@@ -379,15 +379,15 @@ public class TiktokServiceImpl implements TiktokService {
JSONObject
sku
=
entries
.
getJSONObject
(
"sku"
);
JSONObject
sku
=
entries
.
getJSONObject
(
"sku"
);
JSONObject
amount
=
entries
.
getJSONObject
(
"amount"
);
JSONObject
amount
=
entries
.
getJSONObject
(
"amount"
);
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
//查询领取记录表
//
//查询领取记录表
LambdaQueryWrapper
<
SConsumerCoupon
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
//
LambdaQueryWrapper<SConsumerCoupon> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper
.
eq
(
SConsumerCoupon:
:
getCouponCode
,
entries
.
getStr
(
"encrypted_code"
));
//
queryWrapper.eq(SConsumerCoupon::getCouponCode, entries.getStr("encrypted_code"));
queryWrapper
.
eq
(
SConsumerCoupon:
:
getUseStatus
,
UserStatusEnum
.
UNUSED
.
getCode
());
//
queryWrapper.eq(SConsumerCoupon::getUseStatus, UserStatusEnum.UNUSED.getCode());
queryWrapper
.
eq
(
SConsumerCoupon:
:
getIsDelete
,
YesNoEnum
.
no
.
getIndex
());
//
queryWrapper.eq(SConsumerCoupon::getIsDelete, YesNoEnum.no.getIndex());
SConsumerCoupon
unUsedCoupon
=
isConsumerCouponService
.
getOne
(
queryWrapper
);
//
SConsumerCoupon unUsedCoupon = isConsumerCouponService.getOne(queryWrapper);
if
(
ObjectUtils
.
isNotEmpty
(
unUsedCoupon
))
{
//
if (ObjectUtils.isNotEmpty(unUsedCoupon)) {
throw
new
RuntimeException
(
"该券已被领取"
);
//
throw new RuntimeException("该券已被领取");
}
//
}
TiktokCouponDto
couponDto
=
new
TiktokCouponDto
();
TiktokCouponDto
couponDto
=
new
TiktokCouponDto
();
couponDto
.
setVerifyToken
(
prepare
.
getStr
(
"verify_token"
));
couponDto
.
setVerifyToken
(
prepare
.
getStr
(
"verify_token"
));
couponDto
.
setPoiId
(
sStore
.
getTiktokPoiId
());
couponDto
.
setPoiId
(
sStore
.
getTiktokPoiId
());
...
@@ -400,8 +400,8 @@ public class TiktokServiceImpl implements TiktokService {
...
@@ -400,8 +400,8 @@ public class TiktokServiceImpl implements TiktokService {
couponDto
.
setEncryptedCodes
(
codes
);
couponDto
.
setEncryptedCodes
(
codes
);
JSONObject
verify
=
verify
(
couponDto
);
JSONObject
verify
=
verify
(
couponDto
);
JSONArray
verifyResults
=
verify
.
getJSONArray
(
"verify_results"
);
JSONArray
verifyResults
=
verify
.
getJSONArray
(
"verify_results"
);
Object
o1
=
verifyResults
.
get
(
0
);
verifyResults
.
forEach
(
item
->
{
JSONObject
verifyResult
=
new
JSONObject
(
o1
);
JSONObject
verifyResult
=
new
JSONObject
(
item
);
String
originCode
=
verifyResult
.
getStr
(
"origin_code"
);
String
originCode
=
verifyResult
.
getStr
(
"origin_code"
);
SConsumerCoupon
sConsumerCoupon
=
new
SConsumerCoupon
();
SConsumerCoupon
sConsumerCoupon
=
new
SConsumerCoupon
();
sConsumerCoupon
.
setConsumerId
(
user
.
getId
());
sConsumerCoupon
.
setConsumerId
(
user
.
getId
());
...
@@ -467,6 +467,7 @@ public class TiktokServiceImpl implements TiktokService {
...
@@ -467,6 +467,7 @@ public class TiktokServiceImpl implements TiktokService {
sConsumerCoupon
.
setSalePrice
(
sCoupon
.
getSalePrice
());
sConsumerCoupon
.
setSalePrice
(
sCoupon
.
getSalePrice
());
}
}
isConsumerCouponService
.
insertSConsumerCoupon
(
sConsumerCoupon
);
isConsumerCouponService
.
insertSConsumerCoupon
(
sConsumerCoupon
);
});
}
catch
(
RuntimeException
e
)
{
}
catch
(
RuntimeException
e
)
{
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
}
}
...
...
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