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
2422ebb8
Commit
2422ebb8
authored
Jun 08, 2020
by
xiaoer.li@freemud.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'remotes/origin/feature/1.9.25__门店超出配送范围问题'
parents
63b0acc4
39a37184
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
12 deletions
+17
-12
shopping-cart-application-service/pom.xml
+1
-1
shopping-cart-application-service/src/main/java/cn/freemud/entities/vo/ShoppingCartGoodsResponseVo.java
+4
-1
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartNewServiceImpl.java
+12
-10
No files found.
shopping-cart-application-service/pom.xml
View file @
2422ebb8
...
...
@@ -59,7 +59,7 @@
</dependency>
<dependency>
<groupId>
com.freemud.application.service.sdk
</groupId>
<version>
2.
6
.1-SNAPSHOT
</version>
<version>
2.
8
.1-SNAPSHOT
</version>
<artifactId>
storecenter-sdk
</artifactId>
</dependency>
...
...
shopping-cart-application-service/src/main/java/cn/freemud/entities/vo/ShoppingCartGoodsResponseVo.java
View file @
2422ebb8
...
...
@@ -120,5 +120,8 @@ public class ShoppingCartGoodsResponseVo extends ShoppingCartGoodsBaseResponseV
*/
private
String
discountDeliveryActivityCode
;
/**
* 配送费为零的原因:0:正常,1:超出配送范围
*/
private
Integer
deliveryFeeZeroReason
;
}
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartNewServiceImpl.java
View file @
2422ebb8
...
...
@@ -264,7 +264,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
spuId
,
allCartGoodsList
,
productBeanListSpuClass
);
}
Long
deliveryAmount
=
calculateDeliveryAmount
(
receiveId
,
partnerId
,
storeId
,
userLoginInfoDto
.
getWxAppid
()
);
Long
deliveryAmount
=
calculateDeliveryAmount
(
receiveId
,
partnerId
,
storeId
,
userLoginInfoDto
.
getWxAppid
(),
shoppingCartGoodsResponseVo
);
// 获取优惠信息
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
calculationDiscountResult
...
...
@@ -357,7 +357,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
assortmentSdkService
.
setShoppingCart
(
partnerId
,
storeId
,
userId
,
cartGoodsList
,
updateShoppingCartGoodsQtyRequestVo
.
getSessionId
(),
""
,
shoppingCartBaseService
);
Long
deliveryAmount
=
calculateDeliveryAmount
(
receiveId
,
partnerId
,
storeId
,
userLoginInfoDto
.
getWxAppid
()
);
Long
deliveryAmount
=
calculateDeliveryAmount
(
receiveId
,
partnerId
,
storeId
,
userLoginInfoDto
.
getWxAppid
(),
shoppingCartGoodsResponseVo
);
// 获取优惠信息
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
calculationDiscountResult
=
getCalculationDiscountResult
(
menuType
,
partnerId
,
storeId
,
userId
,
appId
,
userLoginInfoDto
.
getWxAppid
(),
orderType
,
assortmentCustomerInfoVo
.
isMemberPaid
(),
cartGoodsList
,
new
ArrayList
(),
new
ArrayList
<>(),
null
,
deliveryAmount
);
...
...
@@ -458,7 +458,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
coupon
.
setActivityCode
(
activityCode
);
coupons
.
add
(
coupon
);
}
Long
deliveryAmount
=
calculateDeliveryAmount
(
receiveId
,
partnerId
,
storeId
,
userLoginInfoDto
.
getWxAppid
()
);
Long
deliveryAmount
=
calculateDeliveryAmount
(
receiveId
,
partnerId
,
storeId
,
userLoginInfoDto
.
getWxAppid
(),
shoppingCartGoodsResponseVo
);
// 获取优惠信息
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
calculationDiscountResult
=
getCalculationDiscountResult
(
menuType
,
partnerId
,
storeId
,
userId
,
appId
,
userLoginInfoDto
.
getWxAppid
(),
orderType
,
assortmentCustomerInfoVo
.
isMemberPaid
(),
cartGoodsList
,
coupons
,
null
,
shoppingCartInfoRequestVo
.
getReceiveId
(),
deliveryAmount
);
...
...
@@ -624,7 +624,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
}
}
Long
deliveryAmount
=
calculateDeliveryAmount
(
receiveId
,
partnerId
,
storeId
,
userLoginInfoDto
.
getWxAppid
()
);
Long
deliveryAmount
=
calculateDeliveryAmount
(
receiveId
,
partnerId
,
storeId
,
userLoginInfoDto
.
getWxAppid
(),
shoppingCartGoodsResponseVo
);
// 获取优惠信息
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
calculationDiscountResult
=
getCalculationDiscountResult
(
menuType
,
partnerId
,
storeId
,
userId
,
appId
,
userLoginInfoDto
.
getWxAppid
(),
orderType
,
assortmentCustomerInfoVo
.
isMemberPaid
(),
cartGoodsList
,
coupons
,
sendGoodsList
,
shoppingCartInfoRequestVo
.
getReceiveId
(),
deliveryAmount
);
...
...
@@ -1408,7 +1408,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
return
amount
;
}
private
Long
getNewDeliveryAmount
(
String
receiveId
,
String
partnerId
,
String
storeId
)
{
private
Long
getNewDeliveryAmount
(
String
receiveId
,
String
partnerId
,
String
storeId
,
ShoppingCartGoodsResponseVo
shoppingCartGoodsResponseVo
)
{
String
trackingNo
=
LogThreadLocal
.
getTrackingNo
();
Long
amount
=
0L
;
if
(
StringUtils
.
isBlank
(
receiveId
))
{
...
...
@@ -1433,6 +1433,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
if
(
queryDeliverDetailResponse
.
getData
().
getDeliveryAmount
()
==
null
)
{
throw
new
ServiceException
(
ResponseResult
.
STORE_DELIVERY_AMOUNT_ERROR
);
}
shoppingCartGoodsResponseVo
.
setDeliveryFeeZeroReason
(
queryDeliverDetailResponse
.
getData
().
getDeliveryFeeZeroReason
()
!=
null
?
queryDeliverDetailResponse
.
getData
().
getDeliveryFeeZeroReason
()
:
0
);
return
queryDeliverDetailResponse
.
getData
().
getDeliveryAmount
();
}
...
...
@@ -1480,16 +1481,17 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
return
calculationDiscountResult
;
}
private
Long
calculateDeliveryAmount
(
String
receiveId
,
String
partnerId
,
String
storeId
,
String
wxappid
)
{
private
Long
calculateDeliveryAmount
(
String
receiveId
,
String
partnerId
,
String
storeId
,
String
wxappid
,
ShoppingCartGoodsResponseVo
shoppingCartGoodsResponseVo
)
{
Long
deliveryAmount
=
0L
;
if
(
StringUtils
.
isBlank
(
receiveId
))
{
if
(
StringUtils
.
isBlank
(
receiveId
))
{
return
deliveryAmount
;
}
log
.
info
(
"获取配送配逻辑 tackingNo:{},storeDeliveryUseOld:{},receiveId:{},partnerId:{},storeId:{}"
,
LogThreadLocal
.
getTrackingNo
(),
storeDeliveryUseOld
,
receiveId
,
partnerId
,
storeId
);
if
(
storeDeliveryUseOld
)
{
deliveryAmount
=
Long
.
parseLong
(
getDeliveryAmount
(
receiveId
,
partnerId
,
storeId
).
toString
());
if
(
storeDeliveryUseOld
)
{
deliveryAmount
=
Long
.
parseLong
(
getDeliveryAmount
(
receiveId
,
partnerId
,
storeId
).
toString
());
shoppingCartGoodsResponseVo
.
setDeliveryFeeZeroReason
(
0
);
}
else
{
deliveryAmount
=
getNewDeliveryAmount
(
receiveId
,
partnerId
,
storeId
);
deliveryAmount
=
getNewDeliveryAmount
(
receiveId
,
partnerId
,
storeId
,
shoppingCartGoodsResponseVo
);
}
return
deliveryAmount
;
...
...
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