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
1f4fdca9
Commit
1f4fdca9
authored
Dec 15, 2020
by
刘鹏飞
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'remotes/origin/feature/coco-payGift-刘鹏飞' into qa
parents
6e555f40
7cb91139
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
shopping-cart-application-service/src/main/java/cn/freemud/service/shoppingCart/impl/CocoShoppingCartRelationServiceImpl.java
+6
-6
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/service/shoppingCart/impl/CocoShoppingCartRelationServiceImpl.java
View file @
1f4fdca9
...
@@ -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
);
...
@@ -317,7 +317,7 @@ public class CocoShoppingCartRelationServiceImpl implements ShoppingCartRelation
...
@@ -317,7 +317,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
);
}
}
}
}
...
...
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