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
c1d06900
Commit
c1d06900
authored
Mar 13, 2021
by
chongfu.liang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除问题fix
parent
2a456244
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
5 deletions
+11
-5
shopping-cart-application-service/src/main/java/cn/freemud/service/active/impl/PlatformActiveServiceImpl.java
+4
-0
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/BuyAndGiftsPromotionService.java
+1
-1
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/CalculationSharingDiscountService.java
+5
-3
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/active/impl/PlatformActiveServiceImpl.java
View file @
c1d06900
...
@@ -23,6 +23,7 @@ import cn.freemud.service.active.ActiveService;
...
@@ -23,6 +23,7 @@ import cn.freemud.service.active.ActiveService;
import
com.freemud.application.sdk.api.productcenter.domain.ProductBeanDTO
;
import
com.freemud.application.sdk.api.productcenter.domain.ProductBeanDTO
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang.ObjectUtils
;
import
org.apache.commons.lang.ObjectUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
@@ -95,6 +96,9 @@ public class PlatformActiveServiceImpl implements ActiveService {
...
@@ -95,6 +96,9 @@ public class PlatformActiveServiceImpl implements ActiveService {
.
get
();
.
get
();
CartGoods
cartGood
=
new
CartGoods
();
CartGoods
cartGood
=
new
CartGoods
();
cartGood
.
setGoodsId
(
goods
.
getGoodsId
());
cartGood
.
setGoodsId
(
goods
.
getGoodsId
());
if
(
StringUtils
.
isNotBlank
(
goods
.
getCartGoodsUid
())
&&
ActivityTypeEnum
.
TYPE_1040
.
getCode
().
equals
(
discount
.
getType
())){
cartGood
.
setCartGoodsUid
(
goods
.
getCartGoodsUid
());
}
cartGood
.
setGoodsType
(
1
);
cartGood
.
setGoodsType
(
1
);
cartGood
.
setSpuId
(
goods
.
getGoodsId
());
cartGood
.
setSpuId
(
goods
.
getGoodsId
());
cartGood
.
setSkuId
(
goods
.
getGoodsId
());
cartGood
.
setSkuId
(
goods
.
getGoodsId
());
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/BuyAndGiftsPromotionService.java
View file @
c1d06900
...
@@ -97,7 +97,7 @@ public class BuyAndGiftsPromotionService implements IPromotionService {
...
@@ -97,7 +97,7 @@ public class BuyAndGiftsPromotionService implements IPromotionService {
cartGoods
.
setOriginalGoodsUid
(
sendGoods
.
getOriginalGoodsUid
());
cartGoods
.
setOriginalGoodsUid
(
sendGoods
.
getOriginalGoodsUid
());
this
.
setGiftExtra
(
cartGoods
,
product
,
cartGoodsList
);
this
.
setGiftExtra
(
cartGoods
,
product
,
cartGoodsList
);
CartGoods
fatherGoods
=
cartGoodsList
.
stream
().
filter
(
p
->
p
.
getCartGoodsUid
().
equals
(
sendGoods
.
getOriginalGoodsUid
())
&&
ObjectUtils
.
equals
(
p
.
getQty
(),
1
)).
findFirst
().
orElse
(
null
);
CartGoods
fatherGoods
=
cartGoodsList
.
stream
().
filter
(
p
->
p
.
getCartGoodsUid
().
equals
(
sendGoods
.
getOriginalGoodsUid
())
&&
ObjectUtils
.
equals
(
p
.
getQty
(),
0
)).
findFirst
().
orElse
(
null
);
if
(
fatherGoods
!=
null
){
if
(
fatherGoods
!=
null
){
cartGoods
.
setCartGoodsUid
(
fatherGoods
.
getCartGoodsUid
());
cartGoods
.
setCartGoodsUid
(
fatherGoods
.
getCartGoodsUid
());
}
}
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/CalculationSharingDiscountService.java
View file @
c1d06900
...
@@ -217,12 +217,14 @@ public class CalculationSharingDiscountService {
...
@@ -217,12 +217,14 @@ public class CalculationSharingDiscountService {
cartGoods
.
setActivityType
(
ActivityTypeEnum
.
TYPE_104
.
getCode
());
cartGoods
.
setActivityType
(
ActivityTypeEnum
.
TYPE_104
.
getCode
());
cartGoods
.
setActualQty
(
cartGoods
.
getQty
());
cartGoods
.
setActualQty
(
cartGoods
.
getQty
());
cartGoods
.
setQty
(
qtyMap
.
get
(
key
));
cartGoods
.
setQty
(
qtyMap
.
get
(
key
));
if
(
ObjectUtils
.
equals
(
cartGoods
.
getQty
(),
0
)){
if
(
ObjectUtils
.
equals
(
cartGoods
.
getQty
(),
0
)){
Ca
rtGoods
sendGoods
=
cartGoodsList
.
stream
().
filter
(
p
->
cartGoods
.
getCartGoodsUid
().
equals
(
p
.
getOriginalGoodsUid
())).
findFirst
().
orElse
(
null
);
Ca
lculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
goods
=
sharingDiscountResponseDto
.
getResult
().
getGoods
()
.
stream
().
filter
(
p
->
cartGoods
.
getCartGoodsUid
().
equals
(
p
.
getOriginalGoodsUid
())).
findFirst
().
orElse
(
null
);
if
(
cartG
oods
!=
null
){
if
(
g
oods
!=
null
){
sendG
oods
.
setCartGoodsUid
(
cartGoods
.
getCartGoodsUid
());
g
oods
.
setCartGoodsUid
(
cartGoods
.
getCartGoodsUid
());
}
}
}
}
}
}
}
}
}
}
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/promotion/GiftSharingService.java
View file @
c1d06900
...
@@ -94,7 +94,7 @@ public class GiftSharingService {
...
@@ -94,7 +94,7 @@ public class GiftSharingService {
List
<
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
.
SendActivity
.
SendGoods
>
sendGoodsList
=
new
ArrayList
<>();
List
<
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
.
SendActivity
.
SendGoods
>
sendGoodsList
=
new
ArrayList
<>();
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
.
SendActivity
.
SendGoods
sendGoodsInfo
=
new
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
.
SendActivity
.
SendGoods
();
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
.
SendActivity
.
SendGoods
sendGoodsInfo
=
new
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
.
SendActivity
.
SendGoods
();
sendGoodsInfo
.
setGoodsId
(
discount
.
getGoodsId
());
sendGoodsInfo
.
setGoodsId
(
discount
.
getGoodsId
());
sendGoodsInfo
.
setOriginalGoodsUid
(
goods
.
get
Original
GoodsUid
());
sendGoodsInfo
.
setOriginalGoodsUid
(
goods
.
get
Cart
GoodsUid
());
sendGoodsInfo
.
setSendNumber
(
discount
.
getActualGoodsNumber
());
sendGoodsInfo
.
setSendNumber
(
discount
.
getActualGoodsNumber
());
sendGoodsList
.
add
(
sendGoodsInfo
);
sendGoodsList
.
add
(
sendGoodsInfo
);
sendGoods
.
setSendGoods
(
sendGoodsList
);
sendGoods
.
setSendGoods
(
sendGoodsList
);
...
...
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