记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
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
董敬伟
liquidnet-bus-v1
Commits
db4f09e3
Commit
db4f09e3
authored
Oct 14, 2021
by
张国柄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:公有券使用时user_coupon.insert逻辑调整;
parent
32cb02d7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
CandyCouponServiceImpl.java
...et/service/candy/service/impl/CandyCouponServiceImpl.java
+4
-3
sqlmap.properties
...t-service-candy-impl/src/main/resources/sqlmap.properties
+2
-1
No files found.
liquidnet-bus-service/liquidnet-service-candy/liquidnet-service-candy-impl/src/main/java/com/liquidnet/service/candy/service/impl/CandyCouponServiceImpl.java
View file @
db4f09e3
...
...
@@ -393,19 +393,20 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
if
(
vo
.
getCouType
()
!=
-
1
)
{
redisDataUtils
.
setCouponByUid
(
uid
,
dtoList
);
LocalDateTime
now
=
LocalDateTime
.
now
();
//入库
if
(
dto
.
getCcouponId
()
==
null
)
{
if
(
dto
.
getCcouponId
()
==
null
||
(
null
!=
dto
.
getCcouponId
()
&&
dto
.
getUsedAt
()
!=
null
))
{
// 是公有券且为使用后退回的券,则更新
queueUtils
.
sendMsgByRedis
(
MQConst
.
CandyQueue
.
COUPON_USE
.
getKey
(),
SqlMapping
.
get
(
"candy_coupon.use"
,
LocalDateTime
.
now
()
,
content
,
uid
,
uCouponId
now
,
content
,
uid
,
uCouponId
)
);
}
else
{
queueUtils
.
sendMsgByRedis
(
MQConst
.
CandyQueue
.
COUPON_USE
.
getKey
(),
SqlMapping
.
get
(
"candy_coupon.use_insert"
,
uCouponId
,
uid
,
dto
.
getCouponId
(),
LocalDateTime
.
now
(),
content
uCouponId
,
uid
,
dto
.
getCouponId
(),
dto
.
getBindAt
(),
dto
.
getDuedAt
(),
now
,
content
,
now
)
);
}
...
...
liquidnet-bus-service/liquidnet-service-candy/liquidnet-service-candy-impl/src/main/resources/sqlmap.properties
View file @
db4f09e3
# -- 使用券 --
candy_coupon.use
=
UPDATE candy_user_coupon SET state = 3 ,used_at = ? , used_for = ? WHERE uid = ? AND ucoupon_id = ?
candy_coupon.use_insert
=
INSERT INTO candy_user_coupon (ucoupon_id , uid , state , coupon_id , used_at , used_for ) VALUE ( ? , ? , 3 , ? , ? ,? )
#candy_coupon.use_insert=INSERT INTO candy_user_coupon (ucoupon_id , uid , state , coupon_id , used_at , used_for ) VALUE ( ? , ? , 3 , ? , ? ,? )
candy_coupon.use_insert
=
INSERT INTO candy_user_coupon (ucoupon_id , uid , state , coupon_id , bind_at, dued_at, used_at , used_for, created_at) VALUE ( ? , ? , 3 , ? , ? , ?, ?, ?, ?)
# -- 回退券 --
candy_coupon.back
=
UPDATE candy_user_coupon SET state = 1 WHERE uid = ? AND ucoupon_id = ?
# -- 领取券 --
...
...
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