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
3737fabd
Commit
3737fabd
authored
Feb 18, 2021
by
chongfu.liang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
集点fix
parent
6a22e638
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
2 deletions
+25
-2
shopping-cart-application-service/src/main/java/cn/freemud/demo/service/impl/AbstractApportionService.java
+25
-2
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/demo/service/impl/AbstractApportionService.java
View file @
3737fabd
...
@@ -17,9 +17,12 @@ import cn.freemud.demo.manager.product.ProductManager;
...
@@ -17,9 +17,12 @@ import cn.freemud.demo.manager.product.ProductManager;
import
cn.freemud.demo.manager.promotion.PromotionManager
;
import
cn.freemud.demo.manager.promotion.PromotionManager
;
import
cn.freemud.demo.service.GetShoppingCartGoodsApportionService
;
import
cn.freemud.demo.service.GetShoppingCartGoodsApportionService
;
import
cn.freemud.entities.dto.ActivityCalculationDiscountRequestDto
;
import
cn.freemud.entities.dto.ActivityCalculationDiscountRequestDto
;
import
cn.freemud.entities.dto.ActivityCalculationDiscountResponseDto
;
import
cn.freemud.entities.dto.CheckSpqInfoResponseDto
;
import
cn.freemud.entities.dto.CheckSpqInfoResponseDto
;
import
cn.freemud.entities.dto.activity.ActivityDiscountsDto
;
import
cn.freemud.entities.dto.activity.ActivityDiscountsDto
;
import
cn.freemud.entities.dto.activity.ActivityQueryDto
;
import
cn.freemud.entities.dto.activity.ActivityQueryDto
;
import
cn.freemud.entities.dto.calculate.CalculationSharingDiscountResponseDto
;
import
cn.freemud.entities.dto.shoppingCart.SendPoint
;
import
cn.freemud.entities.vo.*
;
import
cn.freemud.entities.vo.*
;
import
cn.freemud.enums.*
;
import
cn.freemud.enums.*
;
import
cn.freemud.interceptor.ServiceException
;
import
cn.freemud.interceptor.ServiceException
;
...
@@ -506,8 +509,14 @@ public class AbstractApportionService implements GetShoppingCartGoodsApportionSe
...
@@ -506,8 +509,14 @@ public class AbstractApportionService implements GetShoppingCartGoodsApportionSe
*/
*/
Long
packAmount
=
this
.
getPackAmount
(
baseRequestDTO
,
shoppingGoodsAmountBO
);
Long
packAmount
=
this
.
getPackAmount
(
baseRequestDTO
,
shoppingGoodsAmountBO
);
if
(
discountResult
!=
null
&&
discountResult
.
getSendPointVo
()!=
null
)
{
if
(
discountResult
!=
null
)
{
shoppingCartGoodsBO
.
setSendPoint
(
discountResult
.
getSendPointVo
());
List
<
Integer
>
activityTypes
=
discountResult
.
getDiscounts
().
stream
().
map
(
CalculationDiscountBO
.
CalculationDiscountResult
.
Discount
::
getType
).
collect
(
Collectors
.
toList
());
if
(
activityTypes
.
contains
(
221
))
{
CalculationDiscountBO
.
CalculationDiscountResult
.
Discount
discountDTO
=
discountResult
.
getDiscounts
().
stream
().
filter
(
d
->
221
==
d
.
getType
()).
findFirst
().
get
();
SendPoint
sendPoint
=
convert2SendPoint
(
discountDTO
);
shoppingCartGoodsBO
.
setSendPoint
(
sendPoint
);
}
}
}
shoppingCartGoodsBO
.
setOriginalTotalAmount
(
shoppingGoodsAmountBO
.
getOriginalTotalAmount
());
shoppingCartGoodsBO
.
setOriginalTotalAmount
(
shoppingGoodsAmountBO
.
getOriginalTotalAmount
());
...
@@ -560,7 +569,21 @@ public class AbstractApportionService implements GetShoppingCartGoodsApportionSe
...
@@ -560,7 +569,21 @@ public class AbstractApportionService implements GetShoppingCartGoodsApportionSe
return
shoppingCartGoodsBO
;
return
shoppingCartGoodsBO
;
}
}
private
SendPoint
convert2SendPoint
(
CalculationDiscountBO
.
CalculationDiscountResult
.
Discount
discountDTO
)
{
SendPoint
sendPointNew
=
new
SendPoint
();
CalculationDiscountBO
.
CalculationDiscountResult
.
SendPointDto
sendPointVo
=
discountDTO
.
getSendPointVo
();
if
(
sendPointVo
!=
null
)
{
sendPointNew
.
setMaxNum
(
sendPointVo
.
getMaxNum
());
sendPointNew
.
setSendPoint
(
sendPointVo
.
getSendPoint
());
sendPointNew
.
setValidityDateDays
(
sendPointVo
.
getValidityDateDays
());
sendPointNew
.
setActivityCode
(
discountDTO
.
getActivityCode
());
sendPointNew
.
setEndTime
(
discountDTO
.
getEndTime
());
sendPointNew
.
setStoreLevel
(
sendPointVo
.
getStoreLevel
());
return
sendPointNew
;
}
return
null
;
}
/**
/**
* 库存扣减加价购商品 要过滤掉没有换购的商品
* 库存扣减加价购商品 要过滤掉没有换购的商品
...
...
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