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
b3df8226
Commit
b3df8226
authored
Jun 07, 2021
by
徐康
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
价格问题修复
parent
2d873d03
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
0 deletions
+14
-0
shopping-cart-application-service/src/main/java/cn/freemud/entities/dto/ActivityCalculationDiscountResponseDto.java
+2
-0
shopping-cart-application-service/src/main/java/cn/freemud/entities/vo/ActivityList.java
+2
-0
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/calculation/BuySendCalculation.java
+3
-0
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/calculation/CalculationServiceImpl.java
+3
-0
shopping-cart-application-service/src/main/java/cn/freemud/utils/MoneyUtils.java
+4
-0
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/entities/dto/ActivityCalculationDiscountResponseDto.java
View file @
b3df8226
...
@@ -577,6 +577,8 @@ public class ActivityCalculationDiscountResponseDto {
...
@@ -577,6 +577,8 @@ public class ActivityCalculationDiscountResponseDto {
private
String
goodsId
;
private
String
goodsId
;
private
String
goodsName
;
private
String
goodsName
;
private
Integer
sendNumber
;
private
Integer
sendNumber
;
private
String
picture
;
private
Integer
originalPrice
;
}
}
}
}
...
...
shopping-cart-application-service/src/main/java/cn/freemud/entities/vo/ActivityList.java
View file @
b3df8226
...
@@ -64,6 +64,8 @@ public class ActivityList {
...
@@ -64,6 +64,8 @@ public class ActivityList {
@Data
@Data
public
static
class
McCafeSendGoods
extends
CartGoods
{
public
static
class
McCafeSendGoods
extends
CartGoods
{
private
Integer
isSelected
;
private
Integer
isSelected
;
private
String
originalPrice
;
private
String
finalPrice
;
}
}
}
}
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/calculation/BuySendCalculation.java
View file @
b3df8226
...
@@ -58,6 +58,9 @@ public class BuySendCalculation {
...
@@ -58,6 +58,9 @@ public class BuySendCalculation {
mcCafeSendGoods
.
setGoodsId
(
o
.
getGoodsId
());
mcCafeSendGoods
.
setGoodsId
(
o
.
getGoodsId
());
mcCafeSendGoods
.
setSpuName
(
o
.
getGoodsName
());
mcCafeSendGoods
.
setSpuName
(
o
.
getGoodsName
());
mcCafeSendGoods
.
setQty
(
o
.
getSendNumber
());
mcCafeSendGoods
.
setQty
(
o
.
getSendNumber
());
mcCafeSendGoods
.
setPic
(
o
.
getPicture
());
mcCafeSendGoods
.
setOriginalPrice
(
MoneyUtils
.
parseFen2Yuan
(
o
.
getOriginalPrice
()));
mcCafeSendGoods
.
setFinalPrice
(
MoneyUtils
.
parseFen2Yuan
(
o
.
getOriginalPrice
()));
if
(
map
.
get
(
o
.
getGoodsId
())
!=
null
)
{
if
(
map
.
get
(
o
.
getGoodsId
())
!=
null
)
{
mcCafeSendGoods
.
setIsSelected
(
1
);
mcCafeSendGoods
.
setIsSelected
(
1
);
}
}
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/calculation/CalculationServiceImpl.java
View file @
b3df8226
...
@@ -186,6 +186,9 @@ public class CalculationServiceImpl {
...
@@ -186,6 +186,9 @@ public class CalculationServiceImpl {
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
calculationDiscountResult
=
activityCalculationDiscountResponseDto
.
getResult
();
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
calculationDiscountResult
=
activityCalculationDiscountResponseDto
.
getResult
();
if
(
null
!=
calculationDiscountResult
)
{
if
(
null
!=
calculationDiscountResult
)
{
if
(
CollectionUtils
.
isNotEmpty
(
calculationDiscountResult
.
getDiscounts
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
calculationDiscountResult
.
getDiscounts
()))
{
Integer
discount
=
calculationDiscountResult
.
getDiscounts
().
stream
().
mapToInt
(
o
->
o
.
getDiscount
()).
sum
();
calculationDiscountResult
.
setTotalDiscountAmount
(
calculationDiscountResult
.
getTotalDiscountAmount
()
-
discount
);
calculationDiscountResult
.
setOriginalTotalAmount
(
calculationDiscountResult
.
getOriginalTotalAmount
()
-
discount
);
calculationDiscountResult
.
getDiscounts
().
removeIf
(
o
->
o
.
getType
()
==
230
);
calculationDiscountResult
.
getDiscounts
().
removeIf
(
o
->
o
.
getType
()
==
230
);
}
}
if
(
CollectionUtils
.
isNotEmpty
(
calculationDiscountResult
.
getGoods
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
calculationDiscountResult
.
getGoods
()))
{
...
...
shopping-cart-application-service/src/main/java/cn/freemud/utils/MoneyUtils.java
View file @
b3df8226
...
@@ -7,4 +7,8 @@ public class MoneyUtils {
...
@@ -7,4 +7,8 @@ public class MoneyUtils {
public
static
String
parseFen2Yuan
(
Long
fen
)
{
public
static
String
parseFen2Yuan
(
Long
fen
)
{
return
new
BigDecimal
(
fen
).
divide
(
new
BigDecimal
(
100
),
2
,
BigDecimal
.
ROUND_HALF_UP
).
toPlainString
();
return
new
BigDecimal
(
fen
).
divide
(
new
BigDecimal
(
100
),
2
,
BigDecimal
.
ROUND_HALF_UP
).
toPlainString
();
}
}
public
static
String
parseFen2Yuan
(
Integer
fen
)
{
return
new
BigDecimal
(
fen
).
divide
(
new
BigDecimal
(
100
),
2
,
BigDecimal
.
ROUND_HALF_UP
).
toPlainString
();
}
}
}
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