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
8ac26bdc
Commit
8ac26bdc
authored
Sep 24, 2020
by
xiaoer.li@freemud.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对接促销算价Alpha->fix
parent
7aa541ca
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
8 deletions
+14
-8
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/CalculationCommonService.java
+10
-7
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/promotion/FullSharingService.java
+3
-0
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/promotion/GiftSharingService.java
+1
-1
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/CalculationCommonService.java
View file @
8ac26bdc
...
...
@@ -56,17 +56,20 @@ public class CalculationCommonService {
/**
* 使用促销算价赋值行记录
*/
List
<
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
>
goods
=
discountResult
.
getGoods
();
long
totalOriginalAmount
=
0L
,
totalAmount
=
0L
,
totalPackageAmount
=
0L
;
long
originalAmount
=
0L
,
amount
=
0L
,
packageAmount
=
0L
;
List
<
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
>
goods
=
null
;
if
(
discountResult
!=
null
&&
CollectionUtils
.
isNotEmpty
(
discountResult
.
getGoods
()))
{
goods
=
discountResult
.
getGoods
();
}
long
totalOriginalAmount
=
0L
,
totalAmount
=
0L
,
totalPackageAmount
=
0L
;
long
originalAmount
=
0L
,
amount
=
0L
,
packageAmount
=
0L
;
for
(
CartGoods
cartGoods
:
cartGoodsList
)
{
originalAmount
=
0L
;
amount
=
0L
;
packageAmount
=
0L
;
packageAmount
=
0L
;
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
find
=
goods
.
stream
().
filter
((
k
)
->
k
.
getCartGoodsUid
().
equals
(
cartGoods
.
getCartGoodsUid
())).
findFirst
().
get
();
if
(
find
==
null
)
continue
;
if
(
find
==
null
)
continue
;
//成交价行记录
amount
+=
find
.
getRealAmount
()
*
cartGoods
.
getQty
();
amount
+=
find
.
getRealAmount
()
*
cartGoods
.
getQty
();
cartGoods
.
setAmount
(
amount
);
totalAmount
+=
amount
;
//原价行记录
...
...
@@ -454,7 +457,7 @@ public class CalculationCommonService {
List
<
Integer
>
types
=
new
ArrayList
<>();
types
.
add
(
ActivityTypeEnum
.
TYPE_2
.
getCode
());
types
.
add
(
ActivityTypeEnum
.
TYPE_1
.
getCode
());
if
(
CollectionUtils
.
isEmpty
(
discountResult
.
getGoods
()))
return
;
if
(
discountResult
==
null
||
CollectionUtils
.
isEmpty
(
discountResult
.
getGoods
()))
return
;
List
<
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
>
goodsList
=
discountResult
.
getGoods
()
.
stream
()
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/promotion/FullSharingService.java
View file @
8ac26bdc
...
...
@@ -45,6 +45,9 @@ public class FullSharingService {
,
ShoppingCartGoodsResponseVo
shoppingCartGoodsResponseVo
,
ActivityQueryDto
activityQueryDto
)
{
if
(
discountResult
==
null
||
CollectionUtils
.
isEmpty
(
discountResult
.
getGoods
()))
{
return
;
}
shoppingCartGoodsResponseVo
.
setActivityTip
(
new
ActivityTip
());
List
<
ActivityTypeEnum
>
activityTypeEnums
=
new
LinkedList
<>();
/**
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/promotion/GiftSharingService.java
View file @
8ac26bdc
...
...
@@ -46,7 +46,7 @@ public class GiftSharingService {
,
ShoppingCartInfoRequestVo
shoppingCartInfoRequestVo
,
ActivityQueryDto
activityQueryDto
)
{
if
(
CollectionUtils
.
isEmpty
(
discountResult
.
getSendGoods
()))
{
if
(
discountResult
==
null
||
CollectionUtils
.
isEmpty
(
discountResult
.
getSendGoods
()))
{
return
;
}
String
menuType
=
shoppingCartInfoRequestVo
==
null
?
null
:
shoppingCartInfoRequestVo
.
getMenuType
();
...
...
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