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
jenkins
order-group
Commits
364550d2
Commit
364550d2
authored
Mar 26, 2020
by
姜海波
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整浮点
parent
b1f522c3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
shopping-cart-application-service/src/main/java/cn/freemud/constant/ApplicationConstant.java
+2
-2
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartNewServiceImpl.java
+5
-6
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/constant/ApplicationConstant.java
View file @
364550d2
...
@@ -18,7 +18,7 @@ public class ApplicationConstant {
...
@@ -18,7 +18,7 @@ public class ApplicationConstant {
public
final
static
String
BURYINGPOINT
=
"POINT"
;
public
final
static
String
BURYINGPOINT
=
"POINT"
;
public
final
static
String
DELIVERY_DISCOUNT_DESC1
=
"订单满%
d元 减%d
配送费"
;
public
final
static
String
DELIVERY_DISCOUNT_DESC1
=
"订单满%
s元 减%s
配送费"
;
public
final
static
String
DELIVERY_DISCOUNT_DESC2
=
"订单满%
d
元 免配送费"
;
public
final
static
String
DELIVERY_DISCOUNT_DESC2
=
"订单满%
s
元 免配送费"
;
public
final
static
String
DELIVERY_DISCOUNT_DESC3
=
"另需配送费%s元"
;
public
final
static
String
DELIVERY_DISCOUNT_DESC3
=
"另需配送费%s元"
;
}
}
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartNewServiceImpl.java
View file @
364550d2
...
@@ -1006,7 +1006,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
...
@@ -1006,7 +1006,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
*/
*/
if
(
BusinessTypeEnum
.
SAAS_DELIVERY
.
getCode
().
equals
(
menuType
))
{
if
(
BusinessTypeEnum
.
SAAS_DELIVERY
.
getCode
().
equals
(
menuType
))
{
DecimalFormat
df
=
new
DecimalFormat
(
"###.##"
);
List
<
ActivityTypeEnum
>
activityTypeEnums
=
new
LinkedList
<>();
List
<
ActivityTypeEnum
>
activityTypeEnums
=
new
LinkedList
<>();
activityTypeEnums
.
add
(
ActivityTypeEnum
.
TYPE_14
);
activityTypeEnums
.
add
(
ActivityTypeEnum
.
TYPE_14
);
...
@@ -1032,10 +1032,10 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
...
@@ -1032,10 +1032,10 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
if
(
discount
!=
null
){
if
(
discount
!=
null
){
if
(
beanDto
.
getBenefitType
()
==
1
){
if
(
beanDto
.
getBenefitType
()
==
1
){
String
desc
=
DELIVERY_DISCOUNT_DESC2
;
String
desc
=
DELIVERY_DISCOUNT_DESC2
;
shoppingCartGoodsResponseVo
.
setDeliveryDiscountDesc
(
String
.
format
(
desc
,
beanDto
.
getThresholdAmount
()
/
100
));
shoppingCartGoodsResponseVo
.
setDeliveryDiscountDesc
(
String
.
format
(
desc
,
df
.
format
(
beanDto
.
getThresholdAmount
().
doubleValue
()
/
100
)
));
}
else
{
}
else
{
String
desc
=
DELIVERY_DISCOUNT_DESC1
;
String
desc
=
DELIVERY_DISCOUNT_DESC1
;
shoppingCartGoodsResponseVo
.
setDeliveryDiscountDesc
(
String
.
format
(
desc
,
beanDto
.
getThresholdAmount
()
/
100
,
beanDto
.
getDiscountAmount
()
/
100
));
shoppingCartGoodsResponseVo
.
setDeliveryDiscountDesc
(
String
.
format
(
desc
,
df
.
format
(
beanDto
.
getThresholdAmount
().
doubleValue
()
/
100
)
,
df
.
format
(
beanDto
.
getDiscountAmount
().
doubleValue
()
/
100
)
));
}
}
shoppingCartGoodsResponseVo
.
setDeliveryAmount
(
calculationDiscountResult
.
getDeliveryAmount
());
shoppingCartGoodsResponseVo
.
setDeliveryAmount
(
calculationDiscountResult
.
getDeliveryAmount
());
shoppingCartGoodsResponseVo
.
setDiscountDeliveryAmount
(
calculationDiscountResult
.
getDistributionFee
());
shoppingCartGoodsResponseVo
.
setDiscountDeliveryAmount
(
calculationDiscountResult
.
getDistributionFee
());
...
@@ -1047,10 +1047,10 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
...
@@ -1047,10 +1047,10 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
if
(
beanDto
.
getBenefitType
()
==
1
){
if
(
beanDto
.
getBenefitType
()
==
1
){
String
desc
=
DELIVERY_DISCOUNT_DESC2
;
String
desc
=
DELIVERY_DISCOUNT_DESC2
;
shoppingCartGoodsResponseVo
.
setDeliveryDiscountDesc
(
String
.
format
(
desc
,
beanDto
.
getThresholdAmount
()
/
100
));
shoppingCartGoodsResponseVo
.
setDeliveryDiscountDesc
(
String
.
format
(
desc
,
df
.
format
(
beanDto
.
getThresholdAmount
().
doubleValue
()
/
100
)
));
}
else
{
}
else
{
String
desc
=
DELIVERY_DISCOUNT_DESC1
;
String
desc
=
DELIVERY_DISCOUNT_DESC1
;
shoppingCartGoodsResponseVo
.
setDeliveryDiscountDesc
(
String
.
format
(
desc
,
beanDto
.
getThresholdAmount
()
/
100
,
beanDto
.
getDiscountAmount
()
/
100
));
shoppingCartGoodsResponseVo
.
setDeliveryDiscountDesc
(
String
.
format
(
desc
,
df
.
format
(
beanDto
.
getThresholdAmount
().
doubleValue
()
/
100
),
df
.
format
(
beanDto
.
getDiscountAmount
().
doubleValue
()
/
100
)
));
}
}
shoppingCartGoodsResponseVo
.
setDeliveryAmount
(
deliveryAmount
);
shoppingCartGoodsResponseVo
.
setDeliveryAmount
(
deliveryAmount
);
...
@@ -1058,7 +1058,6 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
...
@@ -1058,7 +1058,6 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
shoppingCartGoodsResponseVo
.
setIsDiscountDelivery
(
false
);
shoppingCartGoodsResponseVo
.
setIsDiscountDelivery
(
false
);
}
else
{
}
else
{
DecimalFormat
df
=
new
DecimalFormat
(
"###.##"
);
String
desc
=
DELIVERY_DISCOUNT_DESC3
;
String
desc
=
DELIVERY_DISCOUNT_DESC3
;
shoppingCartGoodsResponseVo
.
setDeliveryDiscountDesc
(
String
.
format
(
desc
,
df
.
format
(
deliveryAmount
.
doubleValue
()
/
100
)));
shoppingCartGoodsResponseVo
.
setDeliveryDiscountDesc
(
String
.
format
(
desc
,
df
.
format
(
deliveryAmount
.
doubleValue
()
/
100
)));
shoppingCartGoodsResponseVo
.
setDeliveryAmount
(
deliveryAmount
);
shoppingCartGoodsResponseVo
.
setDeliveryAmount
(
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