记得上下班打卡 | 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
33b70f3e
Commit
33b70f3e
authored
Jun 16, 2026
by
wangyifan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商品回调改造:订单商品全退后修改为退款状态
parent
ee504be7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
16 deletions
+36
-16
GoblinOrderServiceImpl.java
...et/service/order/service/impl/GoblinOrderServiceImpl.java
+36
-16
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 @
33b70f3e
...
@@ -1253,22 +1253,6 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
...
@@ -1253,22 +1253,6 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
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
)
{
//整单退款 退券
orderVo
.
setStatus
(
GoblinStatusConst
.
Status
.
ORDER_STATUS_6
.
getValue
());
if
(!(
orderVo
.
getUcouponId
()
==
null
||
orderVo
.
getUcouponId
().
equals
(
""
)))
{
orderUtils
.
backCoupon
(
orderVo
.
getUcouponId
(),
orderVo
.
getUserId
());
}
if
(!(
orderVo
.
getStoreCouponId
()
==
null
||
orderVo
.
getStoreCouponId
().
equals
(
""
)))
{
List
<
BackCouponParam
>
params
=
ObjectUtil
.
getBackCouponParam
();
BackCouponParam
backCouponParam
=
BackCouponParam
.
getNew
();
backCouponParam
.
setuCouponIds
(
orderVo
.
getStoreCouponId
());
backCouponParam
.
setUid
(
orderVo
.
getUserId
());
params
.
add
(
backCouponParam
);
orderUtils
.
backStoreCoupon
(
params
);
}
}
backOrderVo
.
setStatus
(
GoblinStatusConst
.
Status
.
ORDER_BACK_STATUS_2
.
getValue
());
backOrderVo
.
setStatus
(
GoblinStatusConst
.
Status
.
ORDER_BACK_STATUS_2
.
getValue
());
backOrderVo
.
setRefundAt
(
nowStr
);
backOrderVo
.
setRefundAt
(
nowStr
);
for
(
GoblinBackOrderSkuVo
backOrderSkuVo
:
backOrderSkuVos
)
{
for
(
GoblinBackOrderSkuVo
backOrderSkuVo
:
backOrderSkuVos
)
{
...
@@ -1322,6 +1306,20 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
...
@@ -1322,6 +1306,20 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
logVo
.
setCreatedAt
(
now
);
logVo
.
setCreatedAt
(
now
);
mongoUtils
.
insertGoblinOrderLogVo
(
logVo
);
mongoUtils
.
insertGoblinOrderLogVo
(
logVo
);
}
}
if
(
isOrderFullyRefunded
(
orderVo
))
{
orderVo
.
setStatus
(
GoblinStatusConst
.
Status
.
ORDER_STATUS_6
.
getValue
());
if
(!(
orderVo
.
getUcouponId
()
==
null
||
orderVo
.
getUcouponId
().
equals
(
""
)))
{
orderUtils
.
backCoupon
(
orderVo
.
getUcouponId
(),
orderVo
.
getUserId
());
}
if
(!(
orderVo
.
getStoreCouponId
()
==
null
||
orderVo
.
getStoreCouponId
().
equals
(
""
)))
{
List
<
BackCouponParam
>
params
=
ObjectUtil
.
getBackCouponParam
();
BackCouponParam
backCouponParam
=
BackCouponParam
.
getNew
();
backCouponParam
.
setuCouponIds
(
orderVo
.
getStoreCouponId
());
backCouponParam
.
setUid
(
orderVo
.
getUserId
());
params
.
add
(
backCouponParam
);
orderUtils
.
backStoreCoupon
(
params
);
}
}
//redis
//redis
redisUtils
.
setGoblinOrder
(
orderId
,
orderVo
);
redisUtils
.
setGoblinOrder
(
orderId
,
orderVo
);
redisUtils
.
setBackOrderVo
(
backOrderVo
.
getBackOrderId
(),
backOrderVo
);
redisUtils
.
setBackOrderVo
(
backOrderVo
.
getBackOrderId
(),
backOrderVo
);
...
@@ -1479,4 +1477,26 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
...
@@ -1479,4 +1477,26 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
return
""
;
return
""
;
}
}
/**
* 主单是否已全部退完:以所有子单实退金额为准,不再要求累计退款金额达到主单实付(含运费)。
* 已发货后部分退不含运费时,商品全部退完也应进入退款通过;待发货整单退含运费时,子单同样会全部退完。
*/
private
boolean
isOrderFullyRefunded
(
GoblinStoreOrderVo
orderVo
)
{
if
(
orderVo
==
null
||
orderVo
.
getOrderSkuVoIds
()
==
null
||
orderVo
.
getOrderSkuVoIds
().
isEmpty
())
{
return
false
;
}
for
(
String
orderSkuId
:
orderVo
.
getOrderSkuVoIds
())
{
GoblinOrderSkuVo
orderSkuVo
=
redisUtils
.
getGoblinOrderSkuVo
(
orderSkuId
);
if
(
orderSkuVo
==
null
)
{
return
false
;
}
BigDecimal
priceRefund
=
orderSkuVo
.
getPriceRefund
()
==
null
?
BigDecimal
.
ZERO
:
orderSkuVo
.
getPriceRefund
();
BigDecimal
skuPriceActual
=
orderSkuVo
.
getSkuPriceActual
()
==
null
?
BigDecimal
.
ZERO
:
orderSkuVo
.
getSkuPriceActual
();
if
(
priceRefund
.
compareTo
(
skuPriceActual
)
<
0
)
{
return
false
;
}
}
return
true
;
}
}
}
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