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
61d66592
Commit
61d66592
authored
Dec 15, 2020
by
chongfu.liang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/qa' into qa
parents
0494e875
c7c0cb19
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
33 additions
and
23 deletions
+33
-23
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
+1
-1
order-application-service/src/main/java/cn/freemud/entities/dto/shoppingCart/ShoppingCartGoodsDto.java
+1
-1
order-application-service/src/main/java/cn/freemud/service/impl/OrderServiceImpl.java
+2
-4
shopping-cart-application-service/src/main/java/cn/freemud/adapter/ShoppingCartConvertAdapter.java
+7
-3
shopping-cart-application-service/src/main/java/cn/freemud/entities/dto/shoppingCart/ShoppingCartGoodsDto.java
+1
-1
shopping-cart-application-service/src/main/java/cn/freemud/factory/AbstractShoppingCartImpl.java
+3
-0
shopping-cart-application-service/src/main/java/cn/freemud/service/shoppingCart/impl/CocoShoppingCartRelationServiceImpl.java
+18
-13
No files found.
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
View file @
61d66592
...
@@ -2493,7 +2493,7 @@ public class OrderAdapter {
...
@@ -2493,7 +2493,7 @@ public class OrderAdapter {
createOrderProductDemoDto
.
setPicture
(
cartGoodsDetailDto
.
getPicture
());
createOrderProductDemoDto
.
setPicture
(
cartGoodsDetailDto
.
getPicture
());
createOrderProductDemoDto
.
setAddInfo
(
cartGoodsDetailDto
.
getAttributeNames
());
createOrderProductDemoDto
.
setAddInfo
(
cartGoodsDetailDto
.
getAttributeNames
());
createOrderProductDemoDto
.
setDiscountId
(
cartGoodsDetailDto
.
getCouponCode
());
createOrderProductDemoDto
.
setDiscountId
(
cartGoodsDetailDto
.
getCouponCode
());
if
(
!
cartGoodsDetailDto
.
getIsTableware
()
)
{
if
(
cartGoodsDetailDto
.
getIsTableware
()
==
0
)
{
createOrderProductDemoDto
.
setProductType
(
productType
);
createOrderProductDemoDto
.
setProductType
(
productType
);
}
else
{
}
else
{
createOrderProductDemoDto
.
setProductType
(
ProductTypeEnum
.
TABLEWARE_PRODUCT
.
getCode
());
createOrderProductDemoDto
.
setProductType
(
ProductTypeEnum
.
TABLEWARE_PRODUCT
.
getCode
());
...
...
order-application-service/src/main/java/cn/freemud/entities/dto/shoppingCart/ShoppingCartGoodsDto.java
View file @
61d66592
...
@@ -199,7 +199,7 @@ public class ShoppingCartGoodsDto {
...
@@ -199,7 +199,7 @@ public class ShoppingCartGoodsDto {
/**
/**
* 是否餐具商品
* 是否餐具商品
*/
*/
private
Boolean
isTableware
=
false
;
private
Integer
isTableware
=
0
;
/**
/**
* 商品重量
* 商品重量
*/
*/
...
...
order-application-service/src/main/java/cn/freemud/service/impl/OrderServiceImpl.java
View file @
61d66592
...
@@ -2752,10 +2752,8 @@ public class OrderServiceImpl implements Orderservice {
...
@@ -2752,10 +2752,8 @@ public class OrderServiceImpl implements Orderservice {
// 拼单人数大于1人时参加拼单补贴
// 拼单人数大于1人时参加拼单补贴
if
(
null
!=
orderBean
.
getProductList
()
&&
orderBean
.
getProductList
().
stream
().
map
(
QueryOrdersResponse
.
DataBean
.
OrderBean
.
ProductBean
::
getUserId
).
distinct
().
collect
(
Collectors
.
toList
()).
size
()
>
1
)
{
if
(
null
!=
orderBean
.
getProductList
()
&&
orderBean
.
getProductList
().
stream
().
map
(
QueryOrdersResponse
.
DataBean
.
OrderBean
.
ProductBean
::
getUserId
).
distinct
().
collect
(
Collectors
.
toList
()).
size
()
>
1
)
{
Map
<
String
,
String
>
goodsTagMap
=
this
.
goodsTagMap
();
Map
<
String
,
String
>
goodsTagMap
=
this
.
goodsTagMap
();
if
(
null
!=
goodsTagMap
&&
!
goodsTagMap
.
isEmpty
())
{
String
goodsTag
=
goodsTagMap
.
get
(
orderBean
.
getCompanyId
());
// 根据商户号获取
request
.
setGoodsTag
(
StringUtils
.
isBlank
(
goodsTag
)
?
collageGoodsTag
:
goodsTag
);
request
.
setGoodsTag
(
goodsTagMap
.
get
(
orderBean
.
getCompanyId
())
==
null
?
collageGoodsTag
:
goodsTagMap
.
get
(
orderBean
.
getCompanyId
()));
}
}
}
}
}
// add by miaohui for 拼单群收款判断拼单人数大于1时参与微信平台补贴活动,创建预支付时上送goodsTag,后续抽成促销服务活动时删除此逻辑 end
// add by miaohui for 拼单群收款判断拼单人数大于1时参与微信平台补贴活动,创建预支付时上送goodsTag,后续抽成促销服务活动时删除此逻辑 end
...
...
shopping-cart-application-service/src/main/java/cn/freemud/adapter/ShoppingCartConvertAdapter.java
View file @
61d66592
...
@@ -132,7 +132,7 @@ public class ShoppingCartConvertAdapter {
...
@@ -132,7 +132,7 @@ public class ShoppingCartConvertAdapter {
log
.
info
(
mcCafeTablewareSkuId
);
log
.
info
(
mcCafeTablewareSkuId
);
log
.
info
(
"============================="
);
log
.
info
(
"============================="
);
if
(
mcCafeTablewareSkuId
.
equals
(
cartGoods
.
getSkuId
()))
{
if
(
mcCafeTablewareSkuId
.
equals
(
cartGoods
.
getSkuId
()))
{
cartGoodsDetailDto
.
setIsTableWare
(
true
);
cartGoodsDetailDto
.
setIsTableWare
(
1
);
}
}
if
(
GoodsTypeEnum
.
SET_MEAL_GOODS
.
getGoodsType
().
equals
(
cartGoods
.
getGoodsType
()))
{
if
(
GoodsTypeEnum
.
SET_MEAL_GOODS
.
getGoodsType
().
equals
(
cartGoods
.
getGoodsType
()))
{
cartGoodsDetailDto
.
setProductType
(
ProductType
.
SETMEAL
.
getCode
());
cartGoodsDetailDto
.
setProductType
(
ProductType
.
SETMEAL
.
getCode
());
...
@@ -964,8 +964,12 @@ public class ShoppingCartConvertAdapter {
...
@@ -964,8 +964,12 @@ public class ShoppingCartConvertAdapter {
Long
comboxGoodsOriginalPrice
=
cartGoods
.
getProductComboList
().
stream
().
mapToLong
(
t
->
t
.
getOriginalAmount
()).
sum
();
Long
comboxGoodsOriginalPrice
=
cartGoods
.
getProductComboList
().
stream
().
mapToLong
(
t
->
t
.
getOriginalAmount
()).
sum
();
Long
groupGoodsOriginalPrice
=
cartGoods
.
getProductGroupList
().
stream
().
mapToLong
(
t
->
t
.
getOriginalAmount
()).
sum
();
Long
groupGoodsOriginalPrice
=
cartGoods
.
getProductGroupList
().
stream
().
mapToLong
(
t
->
t
.
getOriginalAmount
()).
sum
();
Long
groupGoodsFinalPrice
=
cartGoods
.
getProductGroupList
().
stream
().
mapToLong
(
t
->
t
.
getFinalPrice
()).
sum
();
Long
groupGoodsFinalPrice
=
cartGoods
.
getProductGroupList
().
stream
().
mapToLong
(
t
->
t
.
getFinalPrice
()).
sum
();
cartGoods
.
setOriginalPrice
(
null
!=
cartGoods
.
getOriginalPrice
()?
cartGoods
.
getOriginalPrice
()
:
if
(
isSetMealProduct
&&
isSkuProduct
)
{
comboxGoodsOriginalPrice
);
cartGoods
.
setOriginalPrice
(
null
!=
spuProduct
.
getFinalPrice
()
?
spuProduct
.
getFinalPrice
()
:
comboxGoodsOriginalPrice
);
}
else
{
cartGoods
.
setOriginalPrice
(
null
!=
cartGoods
.
getOriginalPrice
()
?
cartGoods
.
getOriginalPrice
()
:
comboxGoodsOriginalPrice
);
}
cartGoods
.
setOriginalAmount
((
cartGoods
.
getOriginalPrice
()+
groupGoodsOriginalPrice
)*
cartGoods
.
getQty
());
cartGoods
.
setOriginalAmount
((
cartGoods
.
getOriginalPrice
()+
groupGoodsOriginalPrice
)*
cartGoods
.
getQty
());
//咨询商品服务,套餐售价取originalPrice
//咨询商品服务,套餐售价取originalPrice
cartGoods
.
setFinalPrice
(
null
!=
cartGoods
.
getOriginalPrice
()
?
cartGoods
.
getOriginalPrice
()
:
cartGoods
.
setFinalPrice
(
null
!=
cartGoods
.
getOriginalPrice
()
?
cartGoods
.
getOriginalPrice
()
:
...
...
shopping-cart-application-service/src/main/java/cn/freemud/entities/dto/shoppingCart/ShoppingCartGoodsDto.java
View file @
61d66592
...
@@ -257,7 +257,7 @@ public class ShoppingCartGoodsDto {
...
@@ -257,7 +257,7 @@ public class ShoppingCartGoodsDto {
/**
/**
* 是否餐具商品
* 是否餐具商品
*/
*/
private
Boolean
isTableWare
=
false
;
private
Integer
isTableWare
=
0
;
/**
/**
* 商品货号
* 商品货号
*/
*/
...
...
shopping-cart-application-service/src/main/java/cn/freemud/factory/AbstractShoppingCartImpl.java
View file @
61d66592
...
@@ -354,6 +354,9 @@ public abstract class AbstractShoppingCartImpl implements ShoppingCartNewService
...
@@ -354,6 +354,9 @@ public abstract class AbstractShoppingCartImpl implements ShoppingCartNewService
*/
*/
public
void
updateShoppingCartGoodsDiscount
(
CouponPromotionVO
couponPromotionVO
,
ActivityQueryDto
activityQueryDto
,
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
calculationDiscountResult
,
List
<
CartGoods
>
cartGoodsList
public
void
updateShoppingCartGoodsDiscount
(
CouponPromotionVO
couponPromotionVO
,
ActivityQueryDto
activityQueryDto
,
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
calculationDiscountResult
,
List
<
CartGoods
>
cartGoodsList
,
ShoppingCartGoodsResponseVo
shoppingCartGoodsResponseVo
,
ShoppingCartInfoRequestVo
shoppingCartInfoRequestVo
,
UserLoginInfoDto
userLoginInfoDto
,
String
menuType
,
Long
deliveryAmount
)
{
,
ShoppingCartGoodsResponseVo
shoppingCartGoodsResponseVo
,
ShoppingCartInfoRequestVo
shoppingCartInfoRequestVo
,
UserLoginInfoDto
userLoginInfoDto
,
String
menuType
,
Long
deliveryAmount
)
{
log
.
info
(
"pindantest cuxiao->"
+
calculationDiscountResult
);
log
.
info
(
"pindantest cartGoodsList->"
+
cartGoodsList
);
log
.
info
(
"pindantest activityQueryDto->"
+
activityQueryDto
);
//默认计算优惠
//默认计算优惠
DefaultPromotionService
defaultPromotionService
=
(
DefaultPromotionService
)
PromotionFactory
.
getPromotionService
(
ShoppingCartPromotionEnum
.
DEFAULT_PROMOTION
);
DefaultPromotionService
defaultPromotionService
=
(
DefaultPromotionService
)
PromotionFactory
.
getPromotionService
(
ShoppingCartPromotionEnum
.
DEFAULT_PROMOTION
);
defaultPromotionService
.
updateShoppingCartGoodsDiscount
(
couponPromotionVO
,
activityQueryDto
,
calculationDiscountResult
,
cartGoodsList
,
shoppingCartGoodsResponseVo
,
userLoginInfoDto
,
shoppingCartInfoRequestVo
);
defaultPromotionService
.
updateShoppingCartGoodsDiscount
(
couponPromotionVO
,
activityQueryDto
,
calculationDiscountResult
,
cartGoodsList
,
shoppingCartGoodsResponseVo
,
userLoginInfoDto
,
shoppingCartInfoRequestVo
);
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/shoppingCart/impl/CocoShoppingCartRelationServiceImpl.java
View file @
61d66592
...
@@ -140,7 +140,7 @@ public class CocoShoppingCartRelationServiceImpl implements ShoppingCartRelation
...
@@ -140,7 +140,7 @@ public class CocoShoppingCartRelationServiceImpl implements ShoppingCartRelation
}
}
public
CartGoods
buildNewLine
(
CartGoods
cgs
,
Integer
activityType
,
Integer
qty
,
Long
newPrice
,
String
goodsId
){
public
CartGoods
buildNewLine
(
CartGoods
cgs
,
Integer
activityType
,
Integer
qty
,
Long
newPrice
,
String
goodsId
,
Long
originalPrice
){
CartGoods
newCartGoods
=
new
CartGoods
();
CartGoods
newCartGoods
=
new
CartGoods
();
// 购物车的行设置和原来的行一致,便于前端在更新商品数量的时候。能够根据购物车行聚合商品数量
// 购物车的行设置和原来的行一致,便于前端在更新商品数量的时候。能够根据购物车行聚合商品数量
// 因为半价行是从主行中拆出来的
// 因为半价行是从主行中拆出来的
...
@@ -153,11 +153,11 @@ public class CocoShoppingCartRelationServiceImpl implements ShoppingCartRelation
...
@@ -153,11 +153,11 @@ public class CocoShoppingCartRelationServiceImpl implements ShoppingCartRelation
newCartGoods
.
setSkuId
(
cgs
.
getSkuId
());
newCartGoods
.
setSkuId
(
cgs
.
getSkuId
());
newCartGoods
.
setSpecProductId
(
cgs
.
getSpecProductId
());
newCartGoods
.
setSpecProductId
(
cgs
.
getSpecProductId
());
// 价格只用一个商品的价格
// 价格只用一个商品的价格
newCartGoods
.
setOriginalPrice
(
cgs
.
getOriginalPrice
()
);
newCartGoods
.
setOriginalPrice
(
originalPrice
);
// 价格只用一个商品的价格
// 价格只用一个商品的价格
newCartGoods
.
setPackPrice
(
cgs
.
getPackPrice
());
newCartGoods
.
setPackPrice
(
cgs
.
getPackPrice
());
// 价格只用一个商品的价格
// 价格只用一个商品的价格
newCartGoods
.
setOriginalAmount
(
cgs
.
getOriginalPrice
()
);
newCartGoods
.
setOriginalAmount
(
originalPrice
);
// 价格只用一个商品的价格
// 价格只用一个商品的价格
newCartGoods
.
setFinalPrice
(
newPrice
);
newCartGoods
.
setFinalPrice
(
newPrice
);
// 价格只用一个商品的价格
// 价格只用一个商品的价格
...
@@ -219,9 +219,9 @@ public class CocoShoppingCartRelationServiceImpl implements ShoppingCartRelation
...
@@ -219,9 +219,9 @@ public class CocoShoppingCartRelationServiceImpl implements ShoppingCartRelation
// 构建半价行
// 构建半价行
CartGoods
cartGoods
=
new
CartGoods
();
CartGoods
cartGoods
=
new
CartGoods
();
if
(
i
<
2
){
if
(
i
<
2
){
cartGoods
=
buildNewLine
(
product
,
ActivityTypeEnum
.
TYPE_53
.
getCode
(),
1
,
product
.
getFinalPrice
(),
product
.
getGoodsId
());
cartGoods
=
buildNewLine
(
product
,
ActivityTypeEnum
.
TYPE_53
.
getCode
(),
1
,
product
.
getFinalPrice
(),
product
.
getGoodsId
()
,
null
);
}
else
{
}
else
{
cartGoods
=
buildNewLine
(
product
,
ActivityTypeEnum
.
TYPE_53
.
getCode
(),
1
,
product
.
getFinalPrice
(),
null
);
cartGoods
=
buildNewLine
(
product
,
ActivityTypeEnum
.
TYPE_53
.
getCode
(),
1
,
product
.
getFinalPrice
(),
null
,
null
);
}
}
newProducts
.
add
(
cartGoods
);
newProducts
.
add
(
cartGoods
);
...
@@ -286,16 +286,21 @@ public class CocoShoppingCartRelationServiceImpl implements ShoppingCartRelation
...
@@ -286,16 +286,21 @@ public class CocoShoppingCartRelationServiceImpl implements ShoppingCartRelation
List
<
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
.
SmallMaterial
>
smallMaterial
=
goodsDiscountsMap
.
get
(
product
.
getCartGoodsUid
()).
getSmallMaterial
();
List
<
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
.
SmallMaterial
>
smallMaterial
=
goodsDiscountsMap
.
get
(
product
.
getCartGoodsUid
()).
getSmallMaterial
();
Integer
smallMaterialOriTotal
=
0
;
Integer
smallMaterialOriTotal
=
0
;
Long
halfSmallMaterialOriTotal
=
0L
;
Long
halfSmallMaterialOriTotal
=
0L
;
for
(
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
.
SmallMaterial
sm
:
smallMaterial
){
if
(
smallMaterial
!=
null
&&
!
smallMaterial
.
isEmpty
()){
List
<
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
.
GoodsDiscount
>
smDiscounts
=
sm
.
getDiscounts
();
for
(
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
.
SmallMaterial
sm
:
smallMaterial
){
for
(
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
.
GoodsDiscount
smDiscount
:
smDiscounts
){
List
<
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
.
GoodsDiscount
>
smDiscounts
=
sm
.
getDiscounts
();
if
(
ObjectUtils
.
equals
(
smDiscount
.
getType
(),
ActivityTypeEnum
.
TYPE_53
.
getCode
())){
if
(
smDiscounts
!=
null
&&
!
smDiscounts
.
isEmpty
()){
halfSmallMaterialOriTotal
=
halfSmallMaterialOriTotal
+
smDiscount
.
getSignleDiscount
();
for
(
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
.
GoodsDiscount
smDiscount
:
smDiscounts
){
if
(
ObjectUtils
.
equals
(
smDiscount
.
getType
(),
ActivityTypeEnum
.
TYPE_53
.
getCode
())){
halfSmallMaterialOriTotal
=
halfSmallMaterialOriTotal
+
smDiscount
.
getSignleDiscount
();
}
}
}
}
smallMaterialOriTotal
=
smallMaterialOriTotal
+
sm
.
getOriginalPrice
();
}
}
smallMaterialOriTotal
=
smallMaterialOriTotal
+
sm
.
getOriginalPrice
();
}
}
// 商品的单价 = 商品单价+小料单价
// 商品的单价 = 商品单价+小料单价
Long
originalPrice
=
(
new
Long
(
smallMaterialOriTotal
)
+
product
.
getOriginalPrice
());
Long
originalPrice
=
(
new
Long
(
smallMaterialOriTotal
)
+
product
.
getOriginalPrice
());
...
@@ -317,7 +322,7 @@ public class CocoShoppingCartRelationServiceImpl implements ShoppingCartRelation
...
@@ -317,7 +322,7 @@ public class CocoShoppingCartRelationServiceImpl implements ShoppingCartRelation
// 现单价 = 商品原单价+小料原单价-商品现单价小料现单价
// 现单价 = 商品原单价+小料原单价-商品现单价小料现单价
Long
newPrice
=
originalPrice
-
discountAmount
-
halfSmallMaterialOriTotal
;
Long
newPrice
=
originalPrice
-
discountAmount
-
halfSmallMaterialOriTotal
;
// 构建半价行
// 构建半价行
CartGoods
cartGoods
=
buildNewLine
(
product
,
ActivityTypeEnum
.
TYPE_53
.
getCode
(),
1
,
newPrice
,
product
.
getGoodsId
());
CartGoods
cartGoods
=
buildNewLine
(
product
,
ActivityTypeEnum
.
TYPE_53
.
getCode
(),
1
,
newPrice
,
product
.
getGoodsId
()
,
originalPrice
);
halfProduct
.
add
(
cartGoods
);
halfProduct
.
add
(
cartGoods
);
}
}
}
}
...
@@ -354,7 +359,7 @@ public class CocoShoppingCartRelationServiceImpl implements ShoppingCartRelation
...
@@ -354,7 +359,7 @@ public class CocoShoppingCartRelationServiceImpl implements ShoppingCartRelation
// 商品的单价 = 商品单价+小料单价
// 商品的单价 = 商品单价+小料单价
product
.
setOriginalPrice
(
originalPrice
);
product
.
setOriginalPrice
(
originalPrice
);
// 商品现单价 = 商品现单价+小料现单价
// 商品现单价 = 商品现单价+小料现单价
product
.
setFinalPrice
(
new
Long
(
smallMaterialOriTotal
)
+
product
.
getFinalPrice
());
//
product.setFinalPrice(new Long(smallMaterialOriTotal) + product.getFinalPrice());
newProducts
.
add
(
product
);
newProducts
.
add
(
product
);
}
}
...
...
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