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
4a68319c
Commit
4a68319c
authored
Aug 15, 2021
by
hanghang.wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
满减购物车提示语
parent
a760f939
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
17 deletions
+17
-17
shopping-cart-application-service/src/main/java/cn/freemud/demo/service/impl/AbstractAddGoodsService.java
+6
-6
shopping-cart-application-service/src/main/java/cn/freemud/demo/service/impl/MessageServiceImpl.java
+5
-5
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/FullSubtractionActivityServiceImpl.java
+5
-5
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/promotion/FullSharingService.java
+1
-1
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/demo/service/impl/AbstractAddGoodsService.java
View file @
4a68319c
...
@@ -563,7 +563,7 @@ public abstract class AbstractAddGoodsService implements AddGoodsService {
...
@@ -563,7 +563,7 @@ public abstract class AbstractAddGoodsService implements AddGoodsService {
//满足 x 元 减 Y 元 ,最高 减 Z元
//满足 x 元 减 Y 元 ,最高 减 Z元
ActivityList
notInShopping
=
new
ActivityList
();
ActivityList
notInShopping
=
new
ActivityList
();
notInShopping
.
setTipType
(
1
);
notInShopping
.
setTipType
(
ActivityPromptEnum
.
TipTypeEnum
.
ONE
.
getCode
()
);
notInShopping
.
setSatisfy
(
WebUtil
.
formatAmount
(
benefitBeanBO
.
getThresholdAmount
()
*
1.00
/
100
).
toString
());
notInShopping
.
setSatisfy
(
WebUtil
.
formatAmount
(
benefitBeanBO
.
getThresholdAmount
()
*
1.00
/
100
).
toString
());
notInShopping
.
setDeduct
(
WebUtil
.
formatAmount
(
benefitBeanBO
.
getDiscountAmount
()
*
1.00
/
100
).
toString
());
notInShopping
.
setDeduct
(
WebUtil
.
formatAmount
(
benefitBeanBO
.
getDiscountAmount
()
*
1.00
/
100
).
toString
());
notInShopping
.
setMaxDeduct
(
WebUtil
.
formatAmount
(
activityBO
.
getMaxMoney
()
*
1.00
/
100
).
toString
());
notInShopping
.
setMaxDeduct
(
WebUtil
.
formatAmount
(
activityBO
.
getMaxMoney
()
*
1.00
/
100
).
toString
());
...
@@ -585,7 +585,7 @@ public abstract class AbstractAddGoodsService implements AddGoodsService {
...
@@ -585,7 +585,7 @@ public abstract class AbstractAddGoodsService implements AddGoodsService {
for
(
int
j
=
len
-
1
;
j
>=
0
;
j
--)
{
for
(
int
j
=
len
-
1
;
j
>=
0
;
j
--)
{
benefitBeanBO
=
benefitBeanBOList
.
get
(
j
);
benefitBeanBO
=
benefitBeanBOList
.
get
(
j
);
ActivityList
notInShopping
=
new
ActivityList
();
ActivityList
notInShopping
=
new
ActivityList
();
notInShopping
.
setTipType
(
2
);
notInShopping
.
setTipType
(
ActivityPromptEnum
.
TipTypeEnum
.
TWO
.
getCode
()
);
notInShopping
.
setSatisfy
(
WebUtil
.
formatAmount
(
benefitBeanBO
.
getThresholdAmount
()
*
1.00
/
100
).
toString
());
notInShopping
.
setSatisfy
(
WebUtil
.
formatAmount
(
benefitBeanBO
.
getThresholdAmount
()
*
1.00
/
100
).
toString
());
notInShopping
.
setDeduct
(
WebUtil
.
formatAmount
(
benefitBeanBO
.
getDiscountAmount
()
*
1.00
/
100
).
toString
());
notInShopping
.
setDeduct
(
WebUtil
.
formatAmount
(
benefitBeanBO
.
getDiscountAmount
()
*
1.00
/
100
).
toString
());
activityList
.
add
(
notInShopping
);
activityList
.
add
(
notInShopping
);
...
@@ -620,7 +620,7 @@ public abstract class AbstractAddGoodsService implements AddGoodsService {
...
@@ -620,7 +620,7 @@ public abstract class AbstractAddGoodsService implements AddGoodsService {
.
append
(
activityPrompt
.
getThresholdQuantity
()
-
activityPrompt
.
getTotalQuantity
())
.
append
(
activityPrompt
.
getThresholdQuantity
()
-
activityPrompt
.
getTotalQuantity
())
.
append
(
"</span> 件"
);
.
append
(
"</span> 件"
);
// 满足 X 元 减 Y 元 还差 Z元
// 满足 X 元 减 Y 元 还差 Z元
satisfyList
.
setTipType
(
12
);
satisfyList
.
setTipType
(
ActivityPromptEnum
.
TipTypeEnum
.
ELEVEN
.
getCode
()
);
satisfyList
.
setSatisfy
(
activityPrompt
.
getThresholdQuantity
().
toString
());
satisfyList
.
setSatisfy
(
activityPrompt
.
getThresholdQuantity
().
toString
());
satisfyList
.
setDeduct
(
WebUtil
.
formatAmount
(
activityPrompt
.
getDiscountAmout
()
*
1.00
/
100
).
toString
());
satisfyList
.
setDeduct
(
WebUtil
.
formatAmount
(
activityPrompt
.
getDiscountAmout
()
*
1.00
/
100
).
toString
());
satisfyList
.
setMissing
((
activityPrompt
.
getThresholdQuantity
()
-
activityPrompt
.
getTotalQuantity
())+
""
);
satisfyList
.
setMissing
((
activityPrompt
.
getThresholdQuantity
()
-
activityPrompt
.
getTotalQuantity
())+
""
);
...
@@ -635,7 +635,7 @@ public abstract class AbstractAddGoodsService implements AddGoodsService {
...
@@ -635,7 +635,7 @@ public abstract class AbstractAddGoodsService implements AddGoodsService {
.
append
(
WebUtil
.
formatAmount
((
activityPrompt
.
getThresholdAmount
()
-
activityPrompt
.
getTotalAmount
())
*
1.00
/
100
))
.
append
(
WebUtil
.
formatAmount
((
activityPrompt
.
getThresholdAmount
()
-
activityPrompt
.
getTotalAmount
())
*
1.00
/
100
))
.
append
(
"</span> 元"
);
.
append
(
"</span> 元"
);
// 满足 X 元 减 Y 元 还差 Z元
// 满足 X 元 减 Y 元 还差 Z元
satisfyList
.
setTipType
(
3
);
satisfyList
.
setTipType
(
ActivityPromptEnum
.
TipTypeEnum
.
THREE
.
getCode
()
);
satisfyList
.
setSatisfy
(
WebUtil
.
formatAmount
(
activityPrompt
.
getThresholdAmount
()
*
1.00
/
100
).
toString
());
satisfyList
.
setSatisfy
(
WebUtil
.
formatAmount
(
activityPrompt
.
getThresholdAmount
()
*
1.00
/
100
).
toString
());
satisfyList
.
setDeduct
(
WebUtil
.
formatAmount
(
activityPrompt
.
getDiscountAmout
()
*
1.00
/
100
).
toString
());
satisfyList
.
setDeduct
(
WebUtil
.
formatAmount
(
activityPrompt
.
getDiscountAmout
()
*
1.00
/
100
).
toString
());
satisfyList
.
setMissing
(
WebUtil
.
formatAmount
((
activityPrompt
.
getThresholdAmount
()
-
activityPrompt
.
getTotalAmount
())
*
1.00
/
100
).
toString
());
satisfyList
.
setMissing
(
WebUtil
.
formatAmount
((
activityPrompt
.
getThresholdAmount
()
-
activityPrompt
.
getTotalAmount
())
*
1.00
/
100
).
toString
());
...
@@ -656,7 +656,7 @@ public abstract class AbstractAddGoodsService implements AddGoodsService {
...
@@ -656,7 +656,7 @@ public abstract class AbstractAddGoodsService implements AddGoodsService {
.
append
(
"</span> 件减 <span style=\"color:#fa5555\">"
)
.
append
(
"</span> 件减 <span style=\"color:#fa5555\">"
)
.
append
(
WebUtil
.
formatAmount
(
toDiscountAmout
*
1.00
/
100
))
.
append
(
WebUtil
.
formatAmount
(
toDiscountAmout
*
1.00
/
100
))
.
append
(
"</span> 元"
);
.
append
(
"</span> 元"
);
satisfyList
.
setTipType
(
12
);
satisfyList
.
setTipType
(
ActivityPromptEnum
.
TipTypeEnum
.
TWELVE
.
getCode
()
);
satisfyList
.
setDeduct
(
WebUtil
.
formatAmount
(
activityPrompt
.
getAlreadyDiscountAmount
()
*
1.00
/
100
).
toString
());
satisfyList
.
setDeduct
(
WebUtil
.
formatAmount
(
activityPrompt
.
getAlreadyDiscountAmount
()
*
1.00
/
100
).
toString
());
satisfyList
.
setAgainBuy
((
activityPrompt
.
getThresholdQuantity
()
-
activityPrompt
.
getTotalQuantity
())+
""
);
satisfyList
.
setAgainBuy
((
activityPrompt
.
getThresholdQuantity
()
-
activityPrompt
.
getTotalQuantity
())+
""
);
satisfyList
.
setAgianDeduct
(
WebUtil
.
formatAmount
(
toDiscountAmout
*
1.00
/
100
).
toString
());
satisfyList
.
setAgianDeduct
(
WebUtil
.
formatAmount
(
toDiscountAmout
*
1.00
/
100
).
toString
());
...
@@ -670,7 +670,7 @@ public abstract class AbstractAddGoodsService implements AddGoodsService {
...
@@ -670,7 +670,7 @@ public abstract class AbstractAddGoodsService implements AddGoodsService {
.
append
(
"</span> 元减 <span style=\"color:#fa5555\">"
)
.
append
(
"</span> 元减 <span style=\"color:#fa5555\">"
)
.
append
(
WebUtil
.
formatAmount
(
toDiscountAmout
*
1.00
/
100
))
.
append
(
WebUtil
.
formatAmount
(
toDiscountAmout
*
1.00
/
100
))
.
append
(
"</span> 元"
);
.
append
(
"</span> 元"
);
satisfyList
.
setTipType
(
4
);
satisfyList
.
setTipType
(
ActivityPromptEnum
.
TipTypeEnum
.
FOUR
.
getCode
()
);
satisfyList
.
setDeduct
(
WebUtil
.
formatAmount
(
activityPrompt
.
getAlreadyDiscountAmount
()
*
1.00
/
100
).
toString
());
satisfyList
.
setDeduct
(
WebUtil
.
formatAmount
(
activityPrompt
.
getAlreadyDiscountAmount
()
*
1.00
/
100
).
toString
());
satisfyList
.
setAgainBuy
(
WebUtil
.
formatAmount
((
activityPrompt
.
getThresholdAmount
()
-
activityPrompt
.
getTotalAmount
())
*
1.00
/
100
).
toString
());
satisfyList
.
setAgainBuy
(
WebUtil
.
formatAmount
((
activityPrompt
.
getThresholdAmount
()
-
activityPrompt
.
getTotalAmount
())
*
1.00
/
100
).
toString
());
satisfyList
.
setAgianDeduct
(
WebUtil
.
formatAmount
(
toDiscountAmout
*
1.00
/
100
).
toString
());
satisfyList
.
setAgianDeduct
(
WebUtil
.
formatAmount
(
toDiscountAmout
*
1.00
/
100
).
toString
());
...
...
shopping-cart-application-service/src/main/java/cn/freemud/demo/service/impl/MessageServiceImpl.java
View file @
4a68319c
...
@@ -60,7 +60,7 @@ public class MessageServiceImpl implements MessageService {
...
@@ -60,7 +60,7 @@ public class MessageServiceImpl implements MessageService {
ActivityList
notInShopping
=
new
ActivityList
();
ActivityList
notInShopping
=
new
ActivityList
();
if
(
ActivityPromptEnum
.
PreferentialTypeEnum
.
TO_ORDER_ITEM_QUANTITY
.
getCode
().
equals
(
activityBO
.
getCouponType
()))
{
if
(
ActivityPromptEnum
.
PreferentialTypeEnum
.
TO_ORDER_ITEM_QUANTITY
.
getCode
().
equals
(
activityBO
.
getCouponType
()))
{
messageBuilder
.
append
(
"每满 <span style=\"color:#fa5555\">"
)
messageBuilder
.
append
(
"每满 <span style=\"color:#fa5555\">"
)
.
append
(
WebUtil
.
formatAmount
(
benefitBeanBO
.
getThresholdAmount
()
*
1.00
/
100
))
.
append
(
benefitBeanBO
.
getBenefitNumber
(
))
.
append
(
"</span>件 减 <span style=\"color:#fa5555\">"
)
.
append
(
"</span>件 减 <span style=\"color:#fa5555\">"
)
.
append
(
WebUtil
.
formatAmount
(
benefitBeanBO
.
getDiscountAmount
()
*
1.00
/
100
))
.
append
(
WebUtil
.
formatAmount
(
benefitBeanBO
.
getDiscountAmount
()
*
1.00
/
100
))
.
append
(
"</span> "
)
.
append
(
"</span> "
)
...
@@ -69,8 +69,8 @@ public class MessageServiceImpl implements MessageService {
...
@@ -69,8 +69,8 @@ public class MessageServiceImpl implements MessageService {
.
append
(
"</span> 元"
);
.
append
(
"</span> 元"
);
//满足 x 元 减 Y 元 ,最高 减 Z元
//满足 x 元 减 Y 元 ,最高 减 Z元
notInShopping
.
setTipType
(
13
);
notInShopping
.
setTipType
(
ActivityPromptEnum
.
TipTypeEnum
.
THIRTEEN
.
getCode
()
);
notInShopping
.
setSatisfy
(
WebUtil
.
formatAmount
(
benefitBeanBO
.
getThresholdAmount
()
*
1.00
/
100
).
toString
());
notInShopping
.
setSatisfy
(
benefitBeanBO
.
getBenefitNumber
(
).
toString
());
notInShopping
.
setDeduct
(
WebUtil
.
formatAmount
(
benefitBeanBO
.
getDiscountAmount
()
*
1.00
/
100
).
toString
());
notInShopping
.
setDeduct
(
WebUtil
.
formatAmount
(
benefitBeanBO
.
getDiscountAmount
()
*
1.00
/
100
).
toString
());
notInShopping
.
setMaxDeduct
(
WebUtil
.
formatAmount
(
activityBO
.
getMaxMoney
()
*
1.00
/
100
).
toString
());
notInShopping
.
setMaxDeduct
(
WebUtil
.
formatAmount
(
activityBO
.
getMaxMoney
()
*
1.00
/
100
).
toString
());
notInShopping
.
setInvokeAmount
(
WebUtil
.
formatAmount
(
activityBO
.
getDelayTimes
()
*
1.00
/
100
).
toString
());
notInShopping
.
setInvokeAmount
(
WebUtil
.
formatAmount
(
activityBO
.
getDelayTimes
()
*
1.00
/
100
).
toString
());
...
@@ -117,8 +117,8 @@ public class MessageServiceImpl implements MessageService {
...
@@ -117,8 +117,8 @@ public class MessageServiceImpl implements MessageService {
benefitBeanBO
=
benefitBeanBOList
.
get
(
j
);
benefitBeanBO
=
benefitBeanBOList
.
get
(
j
);
ActivityList
notInShopping
=
new
ActivityList
();
ActivityList
notInShopping
=
new
ActivityList
();
if
(
ActivityPromptEnum
.
PreferentialTypeEnum
.
TO_ORDER_ITEM_QUANTITY
.
getCode
().
equals
(
activityBO
.
getCouponType
()))
{
if
(
ActivityPromptEnum
.
PreferentialTypeEnum
.
TO_ORDER_ITEM_QUANTITY
.
getCode
().
equals
(
activityBO
.
getCouponType
()))
{
notInShopping
.
setTipType
(
14
);
notInShopping
.
setTipType
(
ActivityPromptEnum
.
TipTypeEnum
.
FOURTEEN
.
getCode
()
);
notInShopping
.
setSatisfy
(
WebUtil
.
formatAmount
(
benefitBeanBO
.
getThresholdAmount
()
*
1.00
/
100
).
toString
());
notInShopping
.
setSatisfy
(
benefitBeanBO
.
getBenefitNumber
(
).
toString
());
notInShopping
.
setDeduct
(
WebUtil
.
formatAmount
(
benefitBeanBO
.
getDiscountAmount
()
*
1.00
/
100
).
toString
());
notInShopping
.
setDeduct
(
WebUtil
.
formatAmount
(
benefitBeanBO
.
getDiscountAmount
()
*
1.00
/
100
).
toString
());
notInShopping
.
setInvokeAmount
(
WebUtil
.
formatAmount
(
activityBO
.
getDelayTimes
()
*
1.00
/
100
).
toString
());
notInShopping
.
setInvokeAmount
(
WebUtil
.
formatAmount
(
activityBO
.
getDelayTimes
()
*
1.00
/
100
).
toString
());
}
else
{
}
else
{
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/FullSubtractionActivityServiceImpl.java
View file @
4a68319c
...
@@ -205,13 +205,13 @@ public class FullSubtractionActivityServiceImpl {
...
@@ -205,13 +205,13 @@ public class FullSubtractionActivityServiceImpl {
.
append
(
WebUtil
.
formatAmount
(
activityPrompt
.
getDiscountAmout
()
*
1.00
/
100
))
.
append
(
WebUtil
.
formatAmount
(
activityPrompt
.
getDiscountAmout
()
*
1.00
/
100
))
.
append
(
"</span> "
)
.
append
(
"</span> "
)
.
append
(
"还差 <span style=\"color:#fa5555\">"
)
.
append
(
"还差 <span style=\"color:#fa5555\">"
)
.
append
(
WebUtil
.
formatAmount
((
activityPrompt
.
getThresholdAmount
()
-
activityPrompt
.
getTotalAmount
())
*
1.00
/
100
))
.
append
(
(
activityPrompt
.
getThresholdQuantity
()
-
activityPrompt
.
getTotalQuantity
()
))
.
append
(
"</span>
元
"
);
.
append
(
"</span>
件
"
);
// 满足 X 元 减 Y 元 还差 Z元
// 满足 X 元 减 Y 元 还差 Z元
satisfyList
.
setTipType
(
11
);
satisfyList
.
setTipType
(
ActivityPromptEnum
.
TipTypeEnum
.
ELEVEN
.
getCode
()
);
satisfyList
.
setSatisfy
(
activityPrompt
.
getThresholdQuantity
().
toString
());
satisfyList
.
setSatisfy
(
activityPrompt
.
getThresholdQuantity
().
toString
());
satisfyList
.
setDeduct
(
WebUtil
.
formatAmount
(
activityPrompt
.
getDiscountAmout
()
*
1.00
/
100
).
toString
());
satisfyList
.
setDeduct
(
WebUtil
.
formatAmount
(
activityPrompt
.
getDiscountAmout
()
*
1.00
/
100
).
toString
());
satisfyList
.
setMissing
(
WebUtil
.
formatAmount
((
activityPrompt
.
getThresholdAmount
()
-
activityPrompt
.
getTotalAmount
())
*
1.00
/
100
).
toString
()
);
satisfyList
.
setMissing
(
(
activityPrompt
.
getThresholdQuantity
()
-
activityPrompt
.
getTotalQuantity
())
+
""
);
satisfyList
.
setInvokeAmount
(
WebUtil
.
formatAmount
(
activityResponseDto
.
getDelayTimes
()
*
1.00
/
100
).
toString
());
satisfyList
.
setInvokeAmount
(
WebUtil
.
formatAmount
(
activityResponseDto
.
getDelayTimes
()
*
1.00
/
100
).
toString
());
}
else
{
}
else
{
...
@@ -248,7 +248,7 @@ public class FullSubtractionActivityServiceImpl {
...
@@ -248,7 +248,7 @@ public class FullSubtractionActivityServiceImpl {
.
append
(
"</span> 件减 <span style=\"color:#fa5555\">"
)
.
append
(
"</span> 件减 <span style=\"color:#fa5555\">"
)
.
append
(
WebUtil
.
formatAmount
(
toDiscountAmout
*
1.00
/
100
))
.
append
(
WebUtil
.
formatAmount
(
toDiscountAmout
*
1.00
/
100
))
.
append
(
"</span> 元"
);
.
append
(
"</span> 元"
);
satisfyList
.
setTipType
(
12
);
satisfyList
.
setTipType
(
ActivityPromptEnum
.
TipTypeEnum
.
TWELVE
.
getCode
()
);
satisfyList
.
setDeduct
(
WebUtil
.
formatAmount
(
activityPrompt
.
getAlreadyDiscountAmount
()
*
1.00
/
100
).
toString
());
satisfyList
.
setDeduct
(
WebUtil
.
formatAmount
(
activityPrompt
.
getAlreadyDiscountAmount
()
*
1.00
/
100
).
toString
());
satisfyList
.
setAgainBuy
((
activityPrompt
.
getThresholdQuantity
()
-
activityPrompt
.
getTotalQuantity
())+
""
);
satisfyList
.
setAgainBuy
((
activityPrompt
.
getThresholdQuantity
()
-
activityPrompt
.
getTotalQuantity
())+
""
);
satisfyList
.
setAgianDeduct
(
WebUtil
.
formatAmount
(
toDiscountAmout
*
1.00
/
100
).
toString
());
satisfyList
.
setAgianDeduct
(
WebUtil
.
formatAmount
(
toDiscountAmout
*
1.00
/
100
).
toString
());
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/promotion/FullSharingService.java
View file @
4a68319c
...
@@ -398,7 +398,7 @@ public class FullSharingService {
...
@@ -398,7 +398,7 @@ public class FullSharingService {
messageBuilder
.
append
(
"已减 <span style=\"color:#fa5555\">"
)
messageBuilder
.
append
(
"已减 <span style=\"color:#fa5555\">"
)
.
append
(
WebUtil
.
formatAmount
(
activityPrompt
.
getAlreadyDiscountAmount
()
*
1.00
/
100
))
.
append
(
WebUtil
.
formatAmount
(
activityPrompt
.
getAlreadyDiscountAmount
()
*
1.00
/
100
))
.
append
(
"</span> 元 再买 <span style=\"color:#fa5555\">"
)
.
append
(
"</span> 元 再买 <span style=\"color:#fa5555\">"
)
.
append
(
WebUtil
.
formatAmount
((
activityPrompt
.
getThresholdAmount
()
-
activityPrompt
.
getTotalAmount
())
*
1.00
/
100
))
.
append
(
activityPrompt
.
getThresholdQuantity
()
-
activityPrompt
.
getTotalQuantity
(
))
.
append
(
"</span> 件减 <span style=\"color:#fa5555\">"
)
.
append
(
"</span> 件减 <span style=\"color:#fa5555\">"
)
.
append
(
WebUtil
.
formatAmount
(
toDiscountAmout
*
1.00
/
100
))
.
append
(
WebUtil
.
formatAmount
(
toDiscountAmout
*
1.00
/
100
))
.
append
(
"</span> 元"
);
.
append
(
"</span> 元"
);
...
...
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