Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
order-group
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
order-group-application
order-group
Commits
df2dcc00
Commit
df2dcc00
authored
Nov 19, 2020
by
xiaoer.li@freemud.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
重新调整购物车svc卡计算逻辑
parent
74381499
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
5 deletions
+18
-5
shopping-cart-application-service/src/main/java/cn/freemud/entities/vo/ShoppingCartGoodsResponseVo.java
+1
-1
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartNewServiceImpl.java
+17
-4
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/entities/vo/ShoppingCartGoodsResponseVo.java
View file @
df2dcc00
...
...
@@ -144,6 +144,6 @@ public class ShoppingCartGoodsResponseVo extends ShoppingCartGoodsBaseResponseV
/**
* svc卡支付金额
*/
private
BigDecimal
svcPayAmount
;
private
Integer
svcPayAmount
;
}
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartNewServiceImpl.java
View file @
df2dcc00
...
...
@@ -1636,18 +1636,30 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
if
(
response
.
getData
()
==
null
||
response
.
getData
().
getData
()
==
null
||
response
.
getData
().
getData
().
getCardSimpleInfos
().
size
()
>
1
)
{
throw
new
ServiceException
(
ResponseResult
.
USER_SVC_CARD_ERROR
);
}
//混合支付无需校验svc卡余额,但是配送和包装费不计算在svc卡支付
Integer
amount1
=
response
.
getData
().
getData
().
getCardSimpleInfos
().
get
(
0
).
getAmount
();
Integer
vamount
=
response
.
getData
().
getData
().
getCardSimpleInfos
().
get
(
0
).
getVamount
();
Integer
svcTotalAmount
=
amount1
+
vamount
;
//获取实际配送费
Integer
deliveryAmount
=
0
;
Integer
svcPayAmount
=
0
;
if
(
StringUtils
.
isNotBlank
(
receiveId
)
&&
shoppingCartGoodsResponseVo
.
getDiscountDeliveryAmount
()
!=
null
)
{
//Integer deliveryAmount = getDeliveryAmount(receiveId, partnerId, storeId);
deliveryAmount
=
shoppingCartGoodsResponseVo
.
getDiscountDeliveryAmount
().
intValue
();
orderAmount
+=
deliveryAmount
;
}
//混合支付无需校验svc卡余额,但是配送和包装费不计算在svc卡支付
Integer
amount1
=
response
.
getData
().
getData
().
getCardSimpleInfos
().
get
(
0
).
getAmount
();
Integer
vamount
=
response
.
getData
().
getData
().
getCardSimpleInfos
().
get
(
0
).
getVamount
();
log
.
info
(
"svcPrice:totalAmount:{},orderAmount:{},deliveryAmount:{}"
,
shoppingCartGoodsResponseVo
.
getTotalAmount
().
intValue
(),
orderAmount
,
deliveryAmount
);
if
(
svcTotalAmount
>
0
&&
svcTotalAmount
>
orderAmount
)
{
svcPayAmount
=
orderAmount
;
shoppingCartGoodsResponseVo
.
setTotalAmount
(
0L
);
}
else
if
(
svcTotalAmount
>
0
&&
svcTotalAmount
<=
orderAmount
)
{
svcPayAmount
=
svcTotalAmount
;
shoppingCartGoodsResponseVo
.
setTotalAmount
(
orderAmount
.
longValue
()-
svcPayAmount
.
longValue
());
}
/**
BigDecimal svcPayAmount = BigDecimal.ZERO;
//本金+赠送金额
if (orderAmount >= amount1 + vamount) {
//throw new ServiceException(ResponseResult.USER_SVC_CARD_AMOUNT_DEFICIENCY);
svcPayAmount = new BigDecimal(amount1 + vamount).divide(new BigDecimal(100)).setScale(2, BigDecimal.ROUND_HALF_UP);
...
...
@@ -1657,6 +1669,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
svcPayAmount = new BigDecimal(orderAmount - deliveryAmount).divide(new BigDecimal(100)).setScale(2, BigDecimal.ROUND_HALF_UP);
shoppingCartGoodsResponseVo.setTotalAmount(deliveryAmount.longValue());
}
*/
shoppingCartGoodsResponseVo
.
setSvcPayAmount
(
svcPayAmount
);
shoppingCartGoodsResponseVo
.
setSvcDiscountDesc
(
"储值卡支付¥"
+
svcPayAmount
);
//BigDecimal bigDecimal = new BigDecimal(orderAmount);
...
...
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