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
f84efaf2
Commit
f84efaf2
authored
Jul 14, 2021
by
ping.wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
微商城快递到付返回前端标识
parent
71806011
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
8 deletions
+33
-8
shopping-cart-application-service/src/main/java/cn/freemud/entities/dto/delivery/DeliveryFeeInfo.java
+12
-0
shopping-cart-application-service/src/main/java/cn/freemud/entities/vo/ShoppingCartGoodsResponseVo.java
+5
-0
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartMallServiceImpl.java
+16
-8
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/entities/dto/delivery/DeliveryFeeInfo.java
0 → 100644
View file @
f84efaf2
package
cn
.
freemud
.
entities
.
dto
.
delivery
;
import
lombok.Data
;
@Data
public
class
DeliveryFeeInfo
{
private
Long
deliveryAmount
;
private
Integer
deliveryType
;
}
shopping-cart-application-service/src/main/java/cn/freemud/entities/vo/ShoppingCartGoodsResponseVo.java
View file @
f84efaf2
...
@@ -96,6 +96,11 @@ public class ShoppingCartGoodsResponseVo extends ShoppingCartGoodsBaseResponseV
...
@@ -96,6 +96,11 @@ public class ShoppingCartGoodsResponseVo extends ShoppingCartGoodsBaseResponseV
private
Long
deliveryAmount
;
private
Long
deliveryAmount
;
/**
/**
* 微商城配送类型 到付
*/
private
Integer
deliveryType
;
/**
* 减免后配送费
* 减免后配送费
*/
*/
private
Long
discountDeliveryAmount
;
private
Long
discountDeliveryAmount
;
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartMallServiceImpl.java
View file @
f84efaf2
...
@@ -23,6 +23,7 @@ import cn.freemud.entities.dto.*;
...
@@ -23,6 +23,7 @@ import cn.freemud.entities.dto.*;
import
cn.freemud.entities.dto.activity.ActivityQueryDto
;
import
cn.freemud.entities.dto.activity.ActivityQueryDto
;
import
cn.freemud.entities.dto.calculate.CalculationSharingDiscountRequestDto
;
import
cn.freemud.entities.dto.calculate.CalculationSharingDiscountRequestDto
;
import
cn.freemud.entities.dto.calculate.CalculationSharingDiscountResponseDto
;
import
cn.freemud.entities.dto.calculate.CalculationSharingDiscountResponseDto
;
import
cn.freemud.entities.dto.delivery.DeliveryFeeInfo
;
import
cn.freemud.entities.dto.shoppingCart.ShoppingCartGoodsDto
;
import
cn.freemud.entities.dto.shoppingCart.ShoppingCartGoodsDto
;
import
cn.freemud.entities.dto.user.GetSessionUserInfoDto
;
import
cn.freemud.entities.dto.user.GetSessionUserInfoDto
;
import
cn.freemud.entities.ecology.VirtualBindStoreResponse
;
import
cn.freemud.entities.ecology.VirtualBindStoreResponse
;
...
@@ -416,11 +417,11 @@ public class ShoppingCartMallServiceImpl implements ShoppingCartNewService {
...
@@ -416,11 +417,11 @@ public class ShoppingCartMallServiceImpl implements ShoppingCartNewService {
buildCoupons
(
coupons
,
shoppingCartInfoRequestVo
.
getCouponCodes
());
buildCoupons
(
coupons
,
shoppingCartInfoRequestVo
.
getCouponCodes
());
DeliveryFeeInfo
deliveryFeeInfo
=
calculateDeliveryAmount
(
partnerId
,
shoppingCartInfoRequestVo
.
getProvince
(),
cartGoodsList
);
Long
deliveryAmount
=
deliveryFeeInfo
.
getDeliveryAmount
();
shoppingCartGoodsResponseVo
.
setDeliveryType
(
deliveryFeeInfo
.
getDeliveryType
());
Long
deliveryAmount
=
calculateDeliveryAmount
(
partnerId
,
shoppingCartInfoRequestVo
.
getProvince
(),
cartGoodsList
);
ActivityQueryDto
activityQueryDto
=
activityAdapter
.
getActivityQueryDto
(
partnerId
,
storeId
,
userId
,
appId
,
shoppingCartInfoRequestVo
.
getOrderType
());
ActivityQueryDto
activityQueryDto
=
activityAdapter
.
getActivityQueryDto
(
partnerId
,
storeId
,
userId
,
appId
,
shoppingCartInfoRequestVo
.
getOrderType
());
CouponPromotionVO
couponPromotionVO
=
couponAdapter
.
getCouponPromotionVO
(
shoppingCartInfoRequestVo
,
userLoginInfoDto
);
CouponPromotionVO
couponPromotionVO
=
couponAdapter
.
getCouponPromotionVO
(
shoppingCartInfoRequestVo
,
userLoginInfoDto
);
List
<
ShoppingCartInfoRequestVo
.
SendGoods
>
sendGoodsList
=
shoppingCartInfoRequestVo
.
getSendGoods
();
List
<
ShoppingCartInfoRequestVo
.
SendGoods
>
sendGoodsList
=
shoppingCartInfoRequestVo
.
getSendGoods
();
List
<
ShoppingCartInfoRequestVo
.
SendGoods
>
sendGoods
=
new
ArrayList
<>();
List
<
ShoppingCartInfoRequestVo
.
SendGoods
>
sendGoods
=
new
ArrayList
<>();
...
@@ -582,7 +583,8 @@ public class ShoppingCartMallServiceImpl implements ShoppingCartNewService {
...
@@ -582,7 +583,8 @@ public class ShoppingCartMallServiceImpl implements ShoppingCartNewService {
buildCoupons
(
coupons
,
shoppingCartInfoRequestVo
.
getCouponCodes
());
buildCoupons
(
coupons
,
shoppingCartInfoRequestVo
.
getCouponCodes
());
Long
deliveryAmount
=
calculateDeliveryAmount
(
partnerId
,
shoppingCartInfoRequestVo
.
getProvince
(),
cartGoodsList
);
DeliveryFeeInfo
deliveryFeeInfo
=
calculateDeliveryAmount
(
partnerId
,
shoppingCartInfoRequestVo
.
getProvince
(),
cartGoodsList
);
Long
deliveryAmount
=
deliveryFeeInfo
.
getDeliveryAmount
();
ActivityQueryDto
activityQueryDto
=
activityAdapter
.
getActivityQueryDto
(
partnerId
,
storeId
,
userId
,
appId
,
shoppingCartInfoRequestVo
.
getOrderType
());
ActivityQueryDto
activityQueryDto
=
activityAdapter
.
getActivityQueryDto
(
partnerId
,
storeId
,
userId
,
appId
,
shoppingCartInfoRequestVo
.
getOrderType
());
...
@@ -964,11 +966,13 @@ public class ShoppingCartMallServiceImpl implements ShoppingCartNewService {
...
@@ -964,11 +966,13 @@ public class ShoppingCartMallServiceImpl implements ShoppingCartNewService {
return
oldCoupons
;
return
oldCoupons
;
}
}
public
Long
calculateDeliveryAmount
(
String
partnerId
,
String
province
,
List
<
CartGoods
>
cartGoodsList
)
{
public
DeliveryFeeInfo
calculateDeliveryAmount
(
String
partnerId
,
String
province
,
List
<
CartGoods
>
cartGoodsList
)
{
DeliveryFeeInfo
deliveryFeeInfo
=
new
DeliveryFeeInfo
();
Long
deliveryAmount
=
0L
;
Long
deliveryAmount
=
0L
;
//区code 为空则运费为0
//区code 为空则运费为0
if
(
StringUtils
.
isBlank
(
province
))
{
if
(
StringUtils
.
isBlank
(
province
))
{
return
deliveryAmount
;
deliveryFeeInfo
.
setDeliveryAmount
(
deliveryAmount
);
return
deliveryFeeInfo
;
}
}
log
.
info
(
"获取配送配逻辑 tackingNo:{},partnerId:{},province"
,
LogThreadLocal
.
getTrackingNo
(),
partnerId
,
province
);
log
.
info
(
"获取配送配逻辑 tackingNo:{},partnerId:{},province"
,
LogThreadLocal
.
getTrackingNo
(),
partnerId
,
province
);
Long
orderAmount
=
0L
;
Long
orderAmount
=
0L
;
...
@@ -986,7 +990,11 @@ public class ShoppingCartMallServiceImpl implements ShoppingCartNewService {
...
@@ -986,7 +990,11 @@ public class ShoppingCartMallServiceImpl implements ShoppingCartNewService {
if
(!
isDispatchFree
)
{
if
(!
isDispatchFree
)
{
deliveryAmount
=
Long
.
valueOf
(
null
==
queryDeliveryTemplateResponseVo
.
getData
().
getFreight
()
?
0
:
queryDeliveryTemplateResponseVo
.
getData
().
getFreight
()
);
deliveryAmount
=
Long
.
valueOf
(
null
==
queryDeliveryTemplateResponseVo
.
getData
().
getFreight
()
?
0
:
queryDeliveryTemplateResponseVo
.
getData
().
getFreight
()
);
}
}
return
deliveryAmount
;
if
(
queryDeliveryTemplateResponseVo
.
getData
()
!=
null
){
deliveryFeeInfo
.
setDeliveryType
(
1
);
}
deliveryFeeInfo
.
setDeliveryAmount
(
deliveryAmount
);
return
deliveryFeeInfo
;
}
}
/**
/**
...
...
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