记得上下班打卡 | 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
30a0d9ab
Commit
30a0d9ab
authored
Aug 26, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单 券相关入redis
parent
a1c9fcdf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
KylinOrderTicketsServiceImpl.java
...vice/order/service/impl/KylinOrderTicketsServiceImpl.java
+8
-2
DataUtils.java
...ain/java/com/liquidnet/service/order/utils/DataUtils.java
+1
-1
No files found.
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/service/impl/KylinOrderTicketsServiceImpl.java
View file @
30a0d9ab
...
...
@@ -325,6 +325,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
//券的使用逻辑
sqls
.
add
(
SqlMapping
.
get
(
"kylin_order_coupon.add"
));
LinkedList
<
Object
[]>
sqlsDataE
=
ObjectUtil
.
cloneLinkedListObj
();
ArrayList
<
KylinOrderCoupons
>
couponsList
=
new
ArrayList
();
if
(
advanceMap
!=
null
)
{
BigDecimal
priceVoucher
=
(
BigDecimal
)
advanceMap
.
get
(
"voucher"
);
Integer
typeVoucher
=
(
Integer
)
advanceMap
.
get
(
"type"
);
...
...
@@ -334,12 +335,13 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
couponsAdvance
.
setCouponType
(
101
);
couponsAdvance
.
setCouponPrice
(
BigDecimal
.
ZERO
);
couponsAdvance
.
setCreatedAt
(
now
);
dataUtils
.
setOrderCoupon
(
orderTicketId
,
couponsAdvance
);
couponsList
.
add
(
couponsAdvance
);
sqlsDataE
.
add
(
new
Object
[]{
orderTicketId
,
payOrderParam
.
getVoucherCode
(),
typeVoucher
,
priceVoucher
,
now
,
now
});
}
if
(
payOrderParam
.
getVoucherCode
()
!=
null
)
{
HashMap
<
String
,
Object
>
hashMap
=
orderUtils
.
useCoupon
(
payOrderParam
.
getVoucherCode
(),
content
,
orderTickets
.
getPriceTotal
());
BigDecimal
priceVoucher
=
(
BigDecimal
)
hashMap
.
get
(
"voucher"
);
...
...
@@ -355,13 +357,17 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
couponsVoucher
.
setCouponType
(
typeVoucher
);
couponsVoucher
.
setCouponPrice
(
priceVoucher
);
couponsVoucher
.
setCreatedAt
(
now
);
dataUtils
.
setOrderCoupon
(
orderTicketId
,
couponsVoucher
);
couponsList
.
add
(
couponsVoucher
);
sqlsDataE
.
add
(
new
Object
[]{
orderTicketId
,
payOrderParam
.
getVoucherCode
(),
typeVoucher
,
priceVoucher
,
now
,
now
});
}
if
(
couponsList
.
size
()
>
0
)
{
dataUtils
.
setOrderCoupon
(
orderTicketId
,
couponsList
);
}
orderTickets
.
setPriceActual
(
orderTickets
.
getPriceTotal
().
subtract
(
orderTickets
.
getPriceVoucher
()));
orderTickets
.
setPriceExpress
(
payOrderParam
.
getIsExpress
()
==
1
?
ticketData
.
getPriceExpress
()
:
BigDecimal
.
valueOf
(
0
));
orderTickets
.
setPriceRefund
(
BigDecimal
.
valueOf
(
0.0
));
...
...
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/utils/DataUtils.java
View file @
30a0d9ab
...
...
@@ -235,7 +235,7 @@ public class DataUtils {
}
}
public
void
setOrderCoupon
(
String
orderId
,
KylinOrderCoupons
bean
){
public
void
setOrderCoupon
(
String
orderId
,
List
<
KylinOrderCoupons
>
bean
){
String
redisKey
=
KylinRedisConst
.
ORDER_COUPON
.
concat
(
orderId
);
redisUtil
.
set
(
redisKey
,
bean
);
}
...
...
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