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
1d84eac8
Commit
1d84eac8
authored
Mar 09, 2021
by
xiaoer.li@freemud.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify:新的促销提示语
parent
6996a02b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
8 deletions
+21
-8
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/promotion/FullSharingService.java
+21
-8
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/promotion/FullSharingService.java
View file @
1d84eac8
package
cn
.
freemud
.
service
.
impl
.
calculate
.
promotion
;
package
cn
.
freemud
.
service
.
impl
.
calculate
.
promotion
;
import
cn.freemud.entities.dto.ActivityCalculationDiscountResponseDto
;
import
cn.freemud.entities.dto.ActivityResponseDto
;
import
cn.freemud.entities.dto.ActivityResponseDto
;
import
cn.freemud.entities.dto.BenefitBeanDto
;
import
cn.freemud.entities.dto.BenefitBeanDto
;
import
cn.freemud.entities.dto.PromotionMessageDto
;
import
cn.freemud.entities.dto.PromotionMessageDto
;
...
@@ -291,8 +292,8 @@ public class FullSharingService {
...
@@ -291,8 +292,8 @@ public class FullSharingService {
List
<
ActivityList
.
SendGoods
>
sends
=
new
ArrayList
();
List
<
ActivityList
.
SendGoods
>
sends
=
new
ArrayList
();
for
(
int
i
=
len
-
1
;
i
>=
0
;
i
--)
{
for
(
int
i
=
len
-
1
;
i
>=
0
;
i
--)
{
ActivityList
.
SendGoods
goods
=
new
ActivityList
.
SendGoods
();
ActivityList
.
SendGoods
goods
=
new
ActivityList
.
SendGoods
();
goods
.
setQty
(
goods
.
getQty
());
goods
.
setQty
(
beanDto
.
getSendGoodsList
().
get
(
i
).
getSendNumber
());
goods
.
setGoodsName
(
goods
.
getGoodsName
());
goods
.
setGoodsName
(
beanDto
.
getSendGoodsList
().
get
(
i
)
.
getGoodsName
());
sends
.
add
(
goods
);
sends
.
add
(
goods
);
}
}
notInShopping
.
setSends
(
sends
);
notInShopping
.
setSends
(
sends
);
...
@@ -313,8 +314,8 @@ public class FullSharingService {
...
@@ -313,8 +314,8 @@ public class FullSharingService {
ActivityList
satisfyList
=
new
ActivityList
();
ActivityList
satisfyList
=
new
ActivityList
();
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
ActivityPrompt
activityPrompt
=
activityPrompts
.
get
(
0
);
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
ActivityPrompt
activityPrompt
=
activityPrompts
.
get
(
0
);
if
(
activityPrompt
.
getAlreadyDiscountAmount
()
==
null
if
(
Objects
.
equals
(
ActivityTypeEnum
.
TYPE_11
.
getCode
(),
activityResponseDto
.
getActivityType
())
||
GiftTypeEnum
.
TYPE_2
.
equals
(
activityResponseDto
.
getActivitySubType
()))
{
||
activityPrompt
.
getAlreadyDiscountAmount
()
==
0
)
{
if
(
activityPrompt
.
getAlreadyDiscountAmount
()
==
null
||
activityPrompt
.
getAlreadyDiscountAmount
()
==
0
)
{
messageBuilder
.
append
(
"满 <span style=\"color:#fa5555\">"
)
messageBuilder
.
append
(
"满 <span style=\"color:#fa5555\">"
)
.
append
(
WebUtil
.
formatAmount
(
activityPrompt
.
getThresholdAmount
()
*
1.00
/
100
))
.
append
(
WebUtil
.
formatAmount
(
activityPrompt
.
getThresholdAmount
()
*
1.00
/
100
))
.
append
(
"</span> 减 <span style=\"color:#fa5555\">"
)
.
append
(
"</span> 减 <span style=\"color:#fa5555\">"
)
...
@@ -348,22 +349,34 @@ public class FullSharingService {
...
@@ -348,22 +349,34 @@ public class FullSharingService {
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
());
}
}
}
if
(
Objects
.
equals
(
ActivityTypeEnum
.
TYPE_230
.
getCode
(),
activityResponseDto
.
getActivityType
())
&&
CollectionUtils
.
isNotEmpty
(
activityPrompt
.
getSendGoods
()))
{
if
(
Objects
.
equals
(
ActivityTypeEnum
.
TYPE_230
.
getCode
(),
activityResponseDto
.
getActivityType
())
&&
CollectionUtils
.
isNotEmpty
(
activityPrompt
.
getSendGoods
()))
{
satisfyList
.
setTipType
(
10
);
satisfyList
.
setTipType
(
10
);
ActivityList
.
SendGoods
send
=
new
ActivityList
.
SendGoods
();
send
.
setQty
(
activityPrompt
.
getSendGoods
().
get
(
0
).
getSendNumber
());
send
.
setGoodsName
(
activityPrompt
.
getSendGoods
().
get
(
0
).
getGoodsName
());
List
<
ActivityList
.
SendGoods
>
sends
=
new
ArrayList
();
List
<
ActivityList
.
SendGoods
>
sends
=
new
ArrayList
();
for
(
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
SendGoods
sendGood
:
activityPrompt
.
getSendGoods
())
{
ActivityList
.
SendGoods
send
=
new
ActivityList
.
SendGoods
();
send
.
setGoodsName
(
sendGood
.
getGoodsName
());
send
.
setQty
(
sendGood
.
getSendNumber
());
sends
.
add
(
send
);
sends
.
add
(
send
);
}
satisfyList
.
setSends
(
sends
);
satisfyList
.
setSends
(
sends
);
satisfyList
.
setSatisfy
(
WebUtil
.
formatAmount
(
activityPrompt
.
getThresholdAmount
()
*
1.00
/
100
).
toString
());
satisfyList
.
setMissing
(
WebUtil
.
formatAmount
((
activityPrompt
.
getThresholdAmount
()
-
activityPrompt
.
getTotalAmount
())
*
1.00
/
100
).
toString
());
if
(
GiftTypeEnum
.
TYPE_1
.
equals
(
activityResponseDto
.
getActivitySubType
()))
{
if
(
GiftTypeEnum
.
TYPE_1
.
equals
(
activityResponseDto
.
getActivitySubType
()))
{
satisfyList
.
setTipType
(
8
);
satisfyList
.
setTipType
(
8
);
}
}
else
{
else
{
satisfyList
.
setTipType
(
9
);
satisfyList
.
setTipType
(
9
);
}
}
if
(
activityPrompt
.
getTotalAmount
()>=
activityPrompt
.
getThresholdAmount
())
{
if
(
GiftTypeEnum
.
TYPE_1
.
equals
(
activityResponseDto
.
getActivitySubType
()))
{
satisfyList
.
setTipType
(
6
);
}
else
{
satisfyList
.
setTipType
(
6
);
}
}
}
}
activityList
.
add
(
satisfyList
);
activityList
.
add
(
satisfyList
);
}
}
...
...
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