记得上下班打卡 | 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
e38d2dcd
Commit
e38d2dcd
authored
Mar 14, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用券逻辑修改
parent
f3394ddb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
GoblinOrderServiceImpl.java
...et/service/order/service/impl/GoblinOrderServiceImpl.java
+15
-6
No files found.
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/service/impl/GoblinOrderServiceImpl.java
View file @
e38d2dcd
...
@@ -508,12 +508,21 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
...
@@ -508,12 +508,21 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
List
<
GoblinOrderSkuVo
>
skuVoList
=
ObjectUtil
.
getGoblinOrderSkuVoArrayList
();
List
<
GoblinOrderSkuVo
>
skuVoList
=
ObjectUtil
.
getGoblinOrderSkuVoArrayList
();
for
(
GoblinOrderSqlParam
item
:
sqlParams
)
{
for
(
GoblinOrderSqlParam
item
:
sqlParams
)
{
List
<
String
>
goblinOrderSkuIdList
=
CollectionUtil
.
linkedListString
();
List
<
String
>
goblinOrderSkuIdList
=
CollectionUtil
.
linkedListString
();
BigDecimal
restVoucherPrice
=
item
.
getStoreOrder
().
getPriceVoucher
();
for
(
int
i
=
0
;
i
<
item
.
getOrderSkuList
().
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
item
.
getOrderSkuList
().
size
();
i
++)
{
GoblinOrderSku
orderSku
=
item
.
getOrderSkuList
().
get
(
i
);
GoblinOrderSku
orderSku
=
item
.
getOrderSkuList
().
get
(
i
);
if
(
item
.
getStoreOrder
().
getPriceVoucher
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
&&
i
==
0
)
{
if
(
item
.
getStoreOrder
().
getPriceVoucher
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
orderSku
.
setPriceVoucher
(
item
.
getStoreOrder
().
getPriceVoucher
());
restVoucherPrice
=
restVoucherPrice
.
subtract
(
orderSku
.
getSkuPrice
());
BigDecimal
skuPriceActual
=
orderSku
.
getSkuPrice
().
subtract
(
item
.
getStoreOrder
().
getPriceVoucher
());
if
(
restVoucherPrice
.
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
orderSku
.
setSkuPriceActual
(
skuPriceActual
.
compareTo
(
BigDecimal
.
ZERO
)
>
0
?
skuPriceActual
:
BigDecimal
.
ZERO
);
orderSku
.
setPriceVoucher
(
orderSku
.
getSkuPrice
());
BigDecimal
skuPriceActual
=
orderSku
.
getSkuPrice
().
subtract
(
orderSku
.
getSkuPrice
());
orderSku
.
setSkuPriceActual
(
skuPriceActual
.
compareTo
(
BigDecimal
.
ZERO
)
>
0
?
skuPriceActual
:
BigDecimal
.
ZERO
);
}
else
{
orderSku
.
setPriceVoucher
(
restVoucherPrice
.
add
(
orderSku
.
getSkuPrice
()));
BigDecimal
skuPriceActual
=
orderSku
.
getSkuPrice
().
subtract
(
orderSku
.
getPriceVoucher
());
orderSku
.
setSkuPriceActual
(
skuPriceActual
.
compareTo
(
BigDecimal
.
ZERO
)
>
0
?
skuPriceActual
:
BigDecimal
.
ZERO
);
}
}
}
sqlDataSku
.
add
(
new
Object
[]{
sqlDataSku
.
add
(
new
Object
[]{
orderSku
.
getOrderSkuId
(),
orderSku
.
getOrderId
(),
orderSku
.
getSpuId
(),
orderSku
.
getSpuName
(),
orderSku
.
getSpuPic
(),
orderSku
.
getSkuId
(),
orderSku
.
getNum
(),
orderSku
.
getSkuPrice
(),
orderSku
.
getSkuPriceActual
(),
orderSku
.
getSkuName
(),
orderSku
.
getOrderSkuId
(),
orderSku
.
getOrderId
(),
orderSku
.
getSpuId
(),
orderSku
.
getSpuName
(),
orderSku
.
getSpuPic
(),
orderSku
.
getSkuId
(),
orderSku
.
getNum
(),
orderSku
.
getSkuPrice
(),
orderSku
.
getSkuPriceActual
(),
orderSku
.
getSkuName
(),
...
@@ -724,7 +733,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
...
@@ -724,7 +733,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
if
(
orderVo
.
getStatus
()
==
GoblinStatusConst
.
Status
.
ORDER_STATUS_5
.
getValue
()
&&
syncOrderParam
.
getStatus
().
equals
(
1
))
{
if
(
orderVo
.
getStatus
()
==
GoblinStatusConst
.
Status
.
ORDER_STATUS_5
.
getValue
()
&&
syncOrderParam
.
getStatus
().
equals
(
1
))
{
log
.
error
(
"订单号为 {} 的订单超时支付"
,
syncOrderParam
.
getOrderCode
());
log
.
error
(
"订单号为 {} 的订单超时支付"
,
syncOrderParam
.
getOrderCode
());
// 商铺退款逻辑
// 商铺退款逻辑
orderUtils
.
refundOrderSku
(
orderId
,
syncOrderParam
.
getPaymentId
(),
syncOrderParam
.
getPaymentType
());
orderUtils
.
refundOrderSku
(
orderId
,
syncOrderParam
.
getPaymentId
(),
syncOrderParam
.
getPaymentType
());
// orderVo.setStatus(GoblinStatusConst.OrderStatus.ORDER_STATUS_61.getValue());
// orderVo.setStatus(GoblinStatusConst.OrderStatus.ORDER_STATUS_61.getValue());
// redisUtils.setGoblinOrder(orderVo.getOrderId(),orderVo);
// redisUtils.setGoblinOrder(orderVo.getOrderId(),orderVo);
}
else
if
((
orderVo
.
getStatus
()
==
GoblinStatusConst
.
Status
.
ORDER_STATUS_6
.
getValue
()
||
orderVo
.
getStatus
()
==
GoblinStatusConst
.
Status
.
ORDER_STATUS_7
.
getValue
())
&&
syncOrderParam
.
getStatus
().
equals
(
1
))
{
}
else
if
((
orderVo
.
getStatus
()
==
GoblinStatusConst
.
Status
.
ORDER_STATUS_6
.
getValue
()
||
orderVo
.
getStatus
()
==
GoblinStatusConst
.
Status
.
ORDER_STATUS_7
.
getValue
())
&&
syncOrderParam
.
getStatus
().
equals
(
1
))
{
...
@@ -903,7 +912,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
...
@@ -903,7 +912,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
String
orderId
=
backOrderVo
.
getOrderId
();
String
orderId
=
backOrderVo
.
getOrderId
();
List
<
GoblinBackOrderSkuVo
>
backOrderSkuVos
=
backOrderVo
.
getBackOrderSkuVos
();
List
<
GoblinBackOrderSkuVo
>
backOrderSkuVos
=
backOrderVo
.
getBackOrderSkuVos
();
GoblinStoreOrderVo
orderVo
=
redisUtils
.
getGoblinOrder
(
orderId
);
GoblinStoreOrderVo
orderVo
=
redisUtils
.
getGoblinOrder
(
orderId
);
orderVo
.
setPriceRefund
(
orderVo
.
getPriceRefund
()
==
null
?
BigDecimal
.
ZERO
:
orderVo
.
getPriceRefund
().
add
(
refundCallbackParam
.
getRefundPrice
()));
orderVo
.
setPriceRefund
(
orderVo
.
getPriceRefund
()
==
null
?
BigDecimal
.
ZERO
:
orderVo
.
getPriceRefund
().
add
(
refundCallbackParam
.
getRefundPrice
()));
if
(
orderVo
.
getPriceRefund
().
compareTo
(
orderVo
.
getPriceActual
())
>=
0
)
{
if
(
orderVo
.
getPriceRefund
().
compareTo
(
orderVo
.
getPriceActual
())
>=
0
)
{
//整单退款 退券
//整单退款 退券
orderVo
.
setStatus
(
GoblinStatusConst
.
Status
.
ORDER_STATUS_6
.
getValue
());
orderVo
.
setStatus
(
GoblinStatusConst
.
Status
.
ORDER_STATUS_6
.
getValue
());
...
...
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