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
37a4929d
Commit
37a4929d
authored
Oct 22, 2020
by
徐康
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/qa' into qa
parents
5630f14a
c876669d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
14 deletions
+12
-14
assortment-shoppingcart-sdk/pom.xml
+1
-1
shopping-cart-application-service/pom.xml
+1
-1
shopping-cart-application-service/src/main/java/cn/freemud/adapter/ShoppingCartConvertAdapter.java
+4
-2
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/CalculationCommonService.java
+4
-4
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/CalculationSharingDiscountService.java
+0
-3
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
+2
-3
No files found.
assortment-shoppingcart-sdk/pom.xml
View file @
37a4929d
...
...
@@ -10,7 +10,7 @@
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
assortment-shoppingcart-sdk
</artifactId>
<version>
1.
1.5.RELEASE
</version>
<version>
1.
9.12-SNAPSHOT
</version>
<dependencies>
<dependency>
...
...
shopping-cart-application-service/pom.xml
View file @
37a4929d
...
...
@@ -45,7 +45,7 @@
<dependency>
<groupId>
cn.freemud
</groupId>
<artifactId>
assortment-shoppingcart-sdk
</artifactId>
<version>
1.
1.5.RELEASE
</version>
<version>
1.
9.12-SNAPSHOT
</version>
</dependency>
<!-- 再来一单查询订单信息 -->
<dependency>
...
...
shopping-cart-application-service/src/main/java/cn/freemud/adapter/ShoppingCartConvertAdapter.java
View file @
37a4929d
...
...
@@ -499,7 +499,8 @@ public class ShoppingCartConvertAdapter {
productType
.
setSpuId
(
cartGoods
.
getSpuId
());
// 多规格商品券
productType
.
setSkuId
((
ObjectUtils
.
equals
(
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
constant
.
GoodsTypeEnum
.
SKU_GOODS
.
getGoodsType
(),
cartGoods
.
getGoodsType
())
||
ObjectUtils
.
equals
(
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
constant
.
GoodsTypeEnum
.
COUPON_GOODS
.
getGoodsType
(),
cartGoods
.
getGoodsType
()))
||
ObjectUtils
.
equals
(
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
constant
.
GoodsTypeEnum
.
COUPON_GOODS
.
getGoodsType
(),
cartGoods
.
getGoodsType
())
||
ObjectUtils
.
equals
(
GoodsTypeEnum
.
ALL_COUPON_GOODS
.
getGoodsType
(),
cartGoods
.
getGoodsType
()))
?
cartGoods
.
getSkuId
()
:
cartGoods
.
getSpuId
());
// 应产品要求
// 普通商品,取商品的finalePrice(普通商品售价);套餐商品,取originalPrice(套餐价格)
...
...
@@ -776,7 +777,8 @@ public class ShoppingCartConvertAdapter {
public
void
updateCartGoodsInfo
(
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
domain
.
CartGoods
cartGoods
,
ProductBeanDTO
spuProduct
,
Map
<
String
,
ProductBeanDTO
>
subProductTypeMap
)
{
try
{
//是否是sku商品
boolean
isSkuProduct
=
ObjectUtils
.
equals
(
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
constant
.
GoodsTypeEnum
.
SKU_GOODS
.
getGoodsType
(),
cartGoods
.
getGoodsType
());
boolean
isSkuProduct
=
ObjectUtils
.
equals
(
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
constant
.
GoodsTypeEnum
.
SKU_GOODS
.
getGoodsType
(),
cartGoods
.
getGoodsType
())
||
!
ObjectUtils
.
equals
(
cartGoods
.
getSpuId
(),
cartGoods
.
getSkuId
());
// 如果是套餐商品,更新套餐内固定商品&可选商品的详细信息
boolean
isSetMealProduct
=
ObjectUtils
.
equals
(
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
constant
.
ProductType
.
SetMeal
.
getCode
(),
spuProduct
.
getType
())
||
ObjectUtils
.
equals
(
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
constant
.
ProductType
.
IncreasedPackage
.
getCode
(),
spuProduct
.
getType
());
ProductBeanDTO
.
SkuProductBean
skuProduct
=
isSkuProduct
?
spuProduct
.
getSkuList
().
stream
().
filter
(
p
->
ObjectUtils
.
equals
(
cartGoods
.
getSkuId
(),
p
.
getSkuId
())).
findFirst
().
get
()
:
null
;
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/CalculationCommonService.java
View file @
37a4929d
...
...
@@ -104,7 +104,7 @@ public class CalculationCommonService {
Long
originPrice
=
0L
;
if
(
CollectionUtils
.
isNotEmpty
(
cartGoods
.
getProductComboList
()))
{
for
(
CartGoods
.
ComboxGoods
com
:
cartGoods
.
getProductComboList
())
{
originPrice
+=
com
.
getFinalPrice
()*
cartGoods
.
getQty
();
originPrice
+=
com
.
getFinalPrice
()
*
cartGoods
.
getQty
()
*
com
.
getQty
();
}
}
/**
...
...
@@ -397,8 +397,8 @@ public class CalculationCommonService {
List
<
ShoppingCartGoodsDto
.
CartGoodsDetailDto
>
comboLists
=
this
.
com2DetailGoods
(
gxDiscount
,
cartGoods
.
getProductComboList
(),
cartGoods
,
true
);
combs
.
addAll
(
comboLists
);
cartGoodsDetailDto
.
setProductType
(
ProductType
.
SETMEAL
.
getCode
());
originalPriceSum
=
comboLists
.
stream
().
mapToLong
(
ShoppingCartGoodsDto
.
CartGoodsDetailDto
::
getOriginalPrice
).
sum
();
cartGoodsDetailDto
.
setOriginalPrice
(
originalPriceSum
);
//
originalPriceSum = comboLists.stream().mapToLong(ShoppingCartGoodsDto.CartGoodsDetailDto::getOriginalPrice).sum();
//
cartGoodsDetailDto.setOriginalPrice(originalPriceSum);
}
/**
* 可选商品
...
...
@@ -452,7 +452,7 @@ public class CalculationCommonService {
com
.
setExtraList
(
cartGoodsExtras
);
if
(
isFixed
)
{
com
.
setOriginalPrice
(
comb
.
getFinalPrice
());
com
.
setQty
(
cartGoods
.
getQty
());
com
.
setQty
(
c
omb
.
getQty
()
*
c
artGoods
.
getQty
());
}
else
{
com
.
setQty
(
comb
.
getQty
()
*
cartGoods
.
getQty
());
com
.
setOriginalPrice
(
comb
.
getFinalPrice
());
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/CalculationSharingDiscountService.java
View file @
37a4929d
...
...
@@ -314,9 +314,6 @@ public class CalculationSharingDiscountService {
calculationSharingDiscountRequestDto
.
setChannel
(
activityChannelEnum
.
getCode
());
}
//========================== 购物车查询特有逻辑 =================================
// 到店自取包装费设为null,外卖要计算包装费,flag为1表示去结算
// 兼容老版本判断null
if
(
Objects
.
equals
(
orderType
,
CreateOrderType
.
COLLECT_GOODS
.
getCode
()))
{
calculationSharingDiscountRequestDto
.
setProductChannel
(
BusinessTypeEnum
.
SAAS_PICKUP
.
getCode
());
}
else
if
(
Objects
.
equals
(
orderType
,
CreateOrderType
.
TAKE_OUT
.
getCode
()))
{
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
View file @
37a4929d
...
...
@@ -1152,10 +1152,9 @@ public class ShoppingCartMCoffeeServiceImpl {
// cartGoods.setCartGoodsUid(spuId);
}
else
if
(
CollectionUtils
.
isNotEmpty
(
addShoppingCartGoodsRequestVo
.
getProductComboList
())
||
CollectionUtils
.
isNotEmpty
(
addShoppingCartGoodsRequestVo
.
getProductGroupList
()))
{
goodsType
=
GoodsTypeEnum
.
SET_MEAL_GOODS
.
getGoodsType
();
}
/*else if (CommonsConstant.COUPON_TYPE == addShoppingCartGoodsRequestVo.getCouponType()){
}
else
if
(
CommonsConstant
.
COUPON_TYPE
==
addShoppingCartGoodsRequestVo
.
getCouponType
()){
goodsType
=
GoodsTypeEnum
.
ALL_COUPON_GOODS
.
getGoodsType
();
}
*/
}
if
(
addShoppingCartGoodsRequestVo
.
getOperationType
()
!=
null
&&
addShoppingCartGoodsRequestVo
.
getOperationType
()
==
2
)
{
goodsType
=
GoodsTypeEnum
.
REDUCE_PRICE_GOODS
.
getGoodsType
();
}
...
...
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