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
3cf90c42
Commit
3cf90c42
authored
Feb 19, 2021
by
chongfu.liang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加运费
parent
06f64d32
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
7 deletions
+17
-7
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/bo/goods/CalCostBO.java
+2
-0
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/bo/goods/DistributeBO.java
+2
-0
shopping-cart-application-service/src/main/java/cn/freemud/demo/service/impl/AbstractApportionService.java
+6
-3
shopping-cart-application-service/src/main/java/cn/freemud/demo/service/impl/AbstractListCartGoodsService.java
+5
-4
shopping-cart-application-service/src/main/java/cn/freemud/demo/service/impl/PlatformApportionService.java
+1
-0
shopping-cart-application-service/src/main/java/cn/freemud/demo/service/impl/PlatformListCartGoodsService.java
+1
-0
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/bo/goods/CalCostBO.java
View file @
3cf90c42
...
@@ -22,6 +22,8 @@ public class CalCostBO {
...
@@ -22,6 +22,8 @@ public class CalCostBO {
*/
*/
private
Boolean
changed
=
false
;
private
Boolean
changed
=
false
;
private
Long
deliveryAmount
;
private
HashMap
<
String
,
CheckSpqInfoResponseDto
>
validCouponMap
;
private
HashMap
<
String
,
CheckSpqInfoResponseDto
>
validCouponMap
;
private
ShoppingCartContext
shoppingCartContext
;
private
ShoppingCartContext
shoppingCartContext
;
...
...
shopping-cart-application-service/src/main/java/cn/freemud/demo/entities/bo/goods/DistributeBO.java
View file @
3cf90c42
...
@@ -16,6 +16,8 @@ public class DistributeBO {
...
@@ -16,6 +16,8 @@ public class DistributeBO {
* 购物车中商品价格或有效性是否发生变化
* 购物车中商品价格或有效性是否发生变化
*/
*/
private
Boolean
changed
=
false
;
private
Boolean
changed
=
false
;
private
Long
deliveryAmount
;
List
<
CartGoods
>
cartGoods
;
List
<
CartGoods
>
cartGoods
;
...
...
shopping-cart-application-service/src/main/java/cn/freemud/demo/service/impl/AbstractApportionService.java
View file @
3cf90c42
...
@@ -363,6 +363,7 @@ public class AbstractApportionService implements GetShoppingCartGoodsApportionSe
...
@@ -363,6 +363,7 @@ public class AbstractApportionService implements GetShoppingCartGoodsApportionSe
distributeBO
.
setCartGoods
(
calCostBO
.
getCartGoods
());
distributeBO
.
setCartGoods
(
calCostBO
.
getCartGoods
());
distributeBO
.
setChanged
(
calCostBO
.
getChanged
());
distributeBO
.
setChanged
(
calCostBO
.
getChanged
());
distributeBO
.
setToastMsg
(
calCostBO
.
getToastMsg
());
distributeBO
.
setToastMsg
(
calCostBO
.
getToastMsg
());
distributeBO
.
setDeliveryAmount
(
calCostBO
.
getDeliveryAmount
());
return
distributeBO
;
return
distributeBO
;
}
}
...
@@ -501,7 +502,7 @@ public class AbstractApportionService implements GetShoppingCartGoodsApportionSe
...
@@ -501,7 +502,7 @@ public class AbstractApportionService implements GetShoppingCartGoodsApportionSe
DeliveryBO
delivery
=
null
;
DeliveryBO
delivery
=
null
;
if
(
BusinessTypeEnum
.
SAAS_DELIVERY
.
getCode
().
equals
(
baseRequestDTO
.
getMenuType
()))
{
if
(
BusinessTypeEnum
.
SAAS_DELIVERY
.
getCode
().
equals
(
baseRequestDTO
.
getMenuType
()))
{
delivery
=
this
.
delivery
(
distributeBO
.
getCalculationDiscountBO
(),
baseRequestDTO
,
delivery
=
this
.
delivery
(
distributeBO
.
getCalculationDiscountBO
(),
baseRequestDTO
,
activityQueryDto
);
activityQueryDto
,
distributeBO
.
getDeliveryAmount
()
);
}
}
/**
/**
...
@@ -736,12 +737,14 @@ public class AbstractApportionService implements GetShoppingCartGoodsApportionSe
...
@@ -736,12 +737,14 @@ public class AbstractApportionService implements GetShoppingCartGoodsApportionSe
}
}
public
DeliveryBO
delivery
(
CalculationDiscountBO
calculationDiscountBO
,
ShoppingCartGoodsApportionBO
baseRequestDTO
public
DeliveryBO
delivery
(
CalculationDiscountBO
calculationDiscountBO
,
ShoppingCartGoodsApportionBO
baseRequestDTO
,
ActivityQueryDto
activityQueryDto
,
ActivityQueryDto
activityQueryDto
,
Long
calDeliveryAmount
)
{
)
{
CalculationDiscountBO
.
CalculationDiscountResult
discountResult
=
null
;
CalculationDiscountBO
.
CalculationDiscountResult
discountResult
=
null
;
Long
deliveryAmount
=
0L
;
Long
deliveryAmount
=
0L
;
if
(
calDeliveryAmount
!=
null
){
deliveryAmount
=
calDeliveryAmount
;
}
if
(
calculationDiscountBO
!=
null
){
if
(
calculationDiscountBO
!=
null
){
deliveryAmount
=
calculationDiscountBO
.
getDistributionFee
();
discountResult
=
calculationDiscountBO
.
getResult
();
discountResult
=
calculationDiscountBO
.
getResult
();
}
}
...
...
shopping-cart-application-service/src/main/java/cn/freemud/demo/service/impl/AbstractListCartGoodsService.java
View file @
3cf90c42
...
@@ -299,6 +299,7 @@ public class AbstractListCartGoodsService implements ListCartGoodsService {
...
@@ -299,6 +299,7 @@ public class AbstractListCartGoodsService implements ListCartGoodsService {
distributeBO
.
setCartGoods
(
calCostBO
.
getCartGoods
());
distributeBO
.
setCartGoods
(
calCostBO
.
getCartGoods
());
distributeBO
.
setChanged
(
calCostBO
.
getChanged
());
distributeBO
.
setChanged
(
calCostBO
.
getChanged
());
distributeBO
.
setToastMsg
(
calCostBO
.
getToastMsg
());
distributeBO
.
setToastMsg
(
calCostBO
.
getToastMsg
());
distributeBO
.
setDeliveryAmount
(
calCostBO
.
getDeliveryAmount
());
return
distributeBO
;
return
distributeBO
;
}
}
...
@@ -483,7 +484,7 @@ public class AbstractListCartGoodsService implements ListCartGoodsService {
...
@@ -483,7 +484,7 @@ public class AbstractListCartGoodsService implements ListCartGoodsService {
DeliveryBO
delivery
=
null
;
DeliveryBO
delivery
=
null
;
if
(
BusinessTypeEnum
.
SAAS_DELIVERY
.
getCode
().
equals
(
baseRequestDTO
.
getMenuType
()))
{
if
(
BusinessTypeEnum
.
SAAS_DELIVERY
.
getCode
().
equals
(
baseRequestDTO
.
getMenuType
()))
{
delivery
=
this
.
delivery
(
distributeBO
.
getCalculationDiscountBO
(),
baseRequestDTO
,
delivery
=
this
.
delivery
(
distributeBO
.
getCalculationDiscountBO
(),
baseRequestDTO
,
activityQueryDto
);
activityQueryDto
,
distributeBO
.
getDeliveryAmount
()
);
}
}
/**
/**
...
@@ -607,7 +608,7 @@ public class AbstractListCartGoodsService implements ListCartGoodsService {
...
@@ -607,7 +608,7 @@ public class AbstractListCartGoodsService implements ListCartGoodsService {
}
}
public
DeliveryBO
delivery
(
CalculationDiscountBO
calculationDiscountBO
,
ListCartGoodsBO
baseRequestDTO
public
DeliveryBO
delivery
(
CalculationDiscountBO
calculationDiscountBO
,
ListCartGoodsBO
baseRequestDTO
,
ActivityQueryDto
activityQueryDto
)
{
,
ActivityQueryDto
activityQueryDto
,
Long
calDeliveryAmount
)
{
DeliveryBO
deliveryBO
=
new
DeliveryBO
();
DeliveryBO
deliveryBO
=
new
DeliveryBO
();
DecimalFormat
df
=
new
DecimalFormat
(
"###.##"
);
DecimalFormat
df
=
new
DecimalFormat
(
"###.##"
);
List
<
ActivityTypeEnum
>
activityTypeEnums
=
new
LinkedList
<>();
List
<
ActivityTypeEnum
>
activityTypeEnums
=
new
LinkedList
<>();
...
@@ -625,8 +626,8 @@ public class AbstractListCartGoodsService implements ListCartGoodsService {
...
@@ -625,8 +626,8 @@ public class AbstractListCartGoodsService implements ListCartGoodsService {
CalculationDiscountBO
.
CalculationDiscountResult
.
Discount
discount
=
null
;
CalculationDiscountBO
.
CalculationDiscountResult
.
Discount
discount
=
null
;
CalculationDiscountBO
.
CalculationDiscountResult
discountResult
=
null
;
CalculationDiscountBO
.
CalculationDiscountResult
discountResult
=
null
;
Long
deliveryAmount
=
0L
;
Long
deliveryAmount
=
0L
;
if
(
cal
culationDiscountBO
!=
null
){
if
(
cal
DeliveryAmount
!=
null
){
deliveryAmount
=
cal
culationDiscountBO
.
getDistributionFee
()
;
deliveryAmount
=
cal
DeliveryAmount
;
}
}
if
(
calculationDiscountBO
!=
null
&&
calculationDiscountBO
.
getResult
()
!=
null
&&
CollectionUtils
.
isNotEmpty
(
calculationDiscountBO
.
getResult
().
getDiscounts
()))
{
if
(
calculationDiscountBO
!=
null
&&
calculationDiscountBO
.
getResult
()
!=
null
&&
CollectionUtils
.
isNotEmpty
(
calculationDiscountBO
.
getResult
().
getDiscounts
()))
{
discountResult
=
calculationDiscountBO
.
getResult
();
discountResult
=
calculationDiscountBO
.
getResult
();
...
...
shopping-cart-application-service/src/main/java/cn/freemud/demo/service/impl/PlatformApportionService.java
View file @
3cf90c42
...
@@ -152,6 +152,7 @@ public class PlatformApportionService extends AbstractApportionService {
...
@@ -152,6 +152,7 @@ public class PlatformApportionService extends AbstractApportionService {
}
}
calCostBO
.
setValidCouponMap
(
discountResultBO
.
getValidCouponMap
());
calCostBO
.
setValidCouponMap
(
discountResultBO
.
getValidCouponMap
());
calCostBO
.
setCartGoods
(
discountResultBO
.
getCartGoods
());
calCostBO
.
setCartGoods
(
discountResultBO
.
getCartGoods
());
calCostBO
.
setDeliveryAmount
(
deliveryAmount
);
return
calCostBO
;
return
calCostBO
;
}
}
...
...
shopping-cart-application-service/src/main/java/cn/freemud/demo/service/impl/PlatformListCartGoodsService.java
View file @
3cf90c42
...
@@ -163,6 +163,7 @@ public class PlatformListCartGoodsService extends AbstractListCartGoodsService {
...
@@ -163,6 +163,7 @@ public class PlatformListCartGoodsService extends AbstractListCartGoodsService {
}
}
calCostBO
.
setValidCouponMap
(
discountResultBO
.
getValidCouponMap
());
calCostBO
.
setValidCouponMap
(
discountResultBO
.
getValidCouponMap
());
calCostBO
.
setCartGoods
(
discountResultBO
.
getCartGoods
());
calCostBO
.
setCartGoods
(
discountResultBO
.
getCartGoods
());
calCostBO
.
setDeliveryAmount
(
deliveryAmount
);
return
calCostBO
;
return
calCostBO
;
}
}
...
...
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