记得上下班打卡 | 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
9dc07321
Commit
9dc07321
authored
Mar 14, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复 拒绝退款 用户订单详情报错
用券逻辑修改
parent
f2e25ed3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
34 deletions
+33
-34
GoblinOrderAppServiceImpl.java
...ervice/goblin/service/impl/GoblinOrderAppServiceImpl.java
+1
-0
GoblinOrderServiceImpl.java
...et/service/order/service/impl/GoblinOrderServiceImpl.java
+1
-10
GoblinOrderUtils.java
...a/com/liquidnet/service/order/utils/GoblinOrderUtils.java
+31
-24
No files found.
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinOrderAppServiceImpl.java
View file @
9dc07321
...
@@ -112,6 +112,7 @@ public class GoblinOrderAppServiceImpl implements IGoblinOrderAppService {
...
@@ -112,6 +112,7 @@ public class GoblinOrderAppServiceImpl implements IGoblinOrderAppService {
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20003"
));
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20003"
));
}
}
GoblinAppOrderDetailsVo
vo
=
GoblinAppOrderDetailsVo
.
getNew
();
GoblinAppOrderDetailsVo
vo
=
GoblinAppOrderDetailsVo
.
getNew
();
vo
.
setStoreOrderVo
(
orderVo
);
List
<
GoblinOrderSkuVo
>
skuVos
=
ObjectUtil
.
getGoblinOrderSkuVoArrayList
();
List
<
GoblinOrderSkuVo
>
skuVos
=
ObjectUtil
.
getGoblinOrderSkuVoArrayList
();
for
(
String
orderSkuId
:
orderVo
.
getOrderSkuVoIds
())
{
for
(
String
orderSkuId
:
orderVo
.
getOrderSkuVoIds
())
{
GoblinOrderSkuVo
orderSkuVo
=
redisUtils
.
getGoblinOrderSkuVo
(
orderSkuId
);
GoblinOrderSkuVo
orderSkuVo
=
redisUtils
.
getGoblinOrderSkuVo
(
orderSkuId
);
...
...
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/service/impl/GoblinOrderServiceImpl.java
View file @
9dc07321
...
@@ -316,16 +316,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
...
@@ -316,16 +316,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
//商铺券
//商铺券
BigDecimal
storeVoucherPrice
=
BigDecimal
.
ZERO
;
BigDecimal
storeVoucherPrice
=
BigDecimal
.
ZERO
;
if
(
storeVoucherCode
!=
null
&&
!
storeVoucherCode
.
equals
(
""
))
{
if
(
storeVoucherCode
!=
null
&&
!
storeVoucherCode
.
equals
(
""
))
{
String
spuIds
=
""
;
GoblinUseResultVo
storeCouponVo
=
orderUtils
.
useStoreCoupon
(
storeVoucherCode
,
"购买商品["
+
orderCode
+
"]"
,
storeTotalPrice
,
goblinOrderSkuList
,
uid
);
for
(
GoblinOrderSkuParam
item
:
storeParam
.
getGoblinOrderSkuParamArrayList
())
{
String
pre
=
GoblinStatusConst
.
MarketPreStatus
.
getPre
(
item
.
getSpuId
());
if
(
pre
!=
null
)
{
spuIds
=
spuIds
.
concat
(
item
.
getSpuId
().
split
(
pre
)[
0
]
+
","
);
}
else
{
spuIds
=
spuIds
.
concat
(
item
.
getSpuId
()
+
","
);
}
}
GoblinUseResultVo
storeCouponVo
=
orderUtils
.
useStoreCoupon
(
storeVoucherCode
,
"购买商品["
+
orderCode
+
"]"
,
storeTotalPrice
,
spuIds
,
uid
);
String
typeVoucher
;
String
typeVoucher
;
if
(
storeCouponVo
!=
null
)
{
if
(
storeCouponVo
!=
null
)
{
storeVoucherPrice
=
storeCouponVo
.
getValue
();
storeVoucherPrice
=
storeCouponVo
.
getValue
();
...
...
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/utils/GoblinOrderUtils.java
View file @
9dc07321
...
@@ -16,6 +16,8 @@ import com.liquidnet.service.goblin.dto.vo.*;
...
@@ -16,6 +16,8 @@ import com.liquidnet.service.goblin.dto.vo.*;
import
com.liquidnet.service.goblin.entity.GoblinBackOrder
;
import
com.liquidnet.service.goblin.entity.GoblinBackOrder
;
import
com.liquidnet.service.goblin.entity.GoblinBackOrderLog
;
import
com.liquidnet.service.goblin.entity.GoblinBackOrderLog
;
import
com.liquidnet.service.goblin.entity.GoblinOrderOperationLog
;
import
com.liquidnet.service.goblin.entity.GoblinOrderOperationLog
;
import
com.liquidnet.service.goblin.entity.GoblinOrderSku
;
import
com.liquidnet.service.goblin.param.CouponCanUse2Param
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -188,7 +190,7 @@ public class GoblinOrderUtils {
...
@@ -188,7 +190,7 @@ public class GoblinOrderUtils {
}
}
}
}
public
GoblinUseResultVo
useStoreCoupon
(
String
ucouponId
,
String
content
,
BigDecimal
totalPrice
,
String
spuId
,
String
uid
)
{
public
GoblinUseResultVo
useStoreCoupon
(
String
ucouponId
,
String
content
,
BigDecimal
totalPrice
,
List
<
GoblinOrderSku
>
goblinOrderSkuList
,
String
uid
)
{
try
{
try
{
List
<
GoblinUserCouponVo
>
voList
=
redisUtils
.
getUserCouponVos
(
uid
);
List
<
GoblinUserCouponVo
>
voList
=
redisUtils
.
getUserCouponVos
(
uid
);
GoblinUseResultVo
returnVo
=
GoblinUseResultVo
.
getNew
();
GoblinUseResultVo
returnVo
=
GoblinUseResultVo
.
getNew
();
...
@@ -222,13 +224,19 @@ public class GoblinOrderUtils {
...
@@ -222,13 +224,19 @@ public class GoblinOrderUtils {
break
;
break
;
}
else
{
}
else
{
List
<
String
>
spuIds
=
redisUtils
.
getStoreCouponSpuIds
(
vo
.
getStoreCouponId
());
List
<
String
>
spuIds
=
redisUtils
.
getStoreCouponSpuIds
(
vo
.
getStoreCouponId
());
if
(
spuId
==
null
)
{
if
(
spuId
s
==
null
)
{
continue
;
break
;
}
}
//判断是否在可用商品内
//判断是否在可用商品内
List
<
String
>
spuList
=
Arrays
.
asList
(
spuId
.
split
(
","
))
;
BigDecimal
contentPrice
=
BigDecimal
.
ZERO
;
for
(
String
item
:
spuIds
)
{
for
(
String
item
:
spuIds
)
{
if
(
spuList
.
contains
(
item
))
{
for
(
GoblinOrderSku
param
:
goblinOrderSkuList
)
{
if
(
param
.
getSpuId
().
equals
(
item
))
{
contentPrice
=
contentPrice
.
add
(
param
.
getSkuPriceActual
());
}
}
}
if
(
vo
.
getTriggers
().
compareTo
(
contentPrice
)
<=
0
)
{
if
(
vo
.
getType
().
equals
(
"1"
))
{
//代金券
if
(
vo
.
getType
().
equals
(
"1"
))
{
//代金券
returnVo
.
setValue
(
vo
.
getValFace
());
returnVo
.
setValue
(
vo
.
getValFace
());
returnVo
.
setCouType
(
vo
.
getType
());
returnVo
.
setCouType
(
vo
.
getType
());
...
@@ -249,8 +257,7 @@ public class GoblinOrderUtils {
...
@@ -249,8 +257,7 @@ public class GoblinOrderUtils {
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
SQL_COUPON
.
getKey
(),
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
SQL_COUPON
.
getKey
(),
SqlMapping
.
get
(
"goblin_user_coupon.updateState"
,
vo
.
getState
(),
vo
.
getUsedFor
(),
LocalDateTime
.
now
(),
vo
.
getUcouponId
()));
SqlMapping
.
get
(
"goblin_user_coupon.updateState"
,
vo
.
getState
(),
vo
.
getUsedFor
(),
LocalDateTime
.
now
(),
vo
.
getUcouponId
()));
}
}
break
;
}
}
}
}
}
break
;
break
;
...
...
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