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
27351eb8
Commit
27351eb8
authored
Mar 04, 2021
by
chongfu.liang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商品券
parent
2819efca
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
10 deletions
+8
-10
shopping-cart-application-service/src/main/java/cn/freemud/demo/adapter/service/AddGoodsBOAdapter.java
+6
-1
shopping-cart-application-service/src/main/java/cn/freemud/demo/service/impl/AbstractAddGoodsService.java
+0
-8
shopping-cart-application-service/src/main/java/cn/freemud/demo/service/impl/PlatformAddGoodsService.java
+2
-1
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/demo/adapter/service/AddGoodsBOAdapter.java
View file @
27351eb8
...
@@ -109,7 +109,12 @@ public class AddGoodsBOAdapter {
...
@@ -109,7 +109,12 @@ public class AddGoodsBOAdapter {
platformProductBO
.
setQty
(
qty
);
platformProductBO
.
setQty
(
qty
);
Integer
goodsType
=
StringUtils
.
isEmpty
(
skuId
)||
ObjectUtils
.
equals
(
spuId
,
skuId
)
?
GoodsTypeEnum
.
SPU_GOODS
.
getGoodsType
()
:
GoodsTypeEnum
.
SKU_GOODS
.
getGoodsType
();
Integer
goodsType
=
StringUtils
.
isEmpty
(
skuId
)||
ObjectUtils
.
equals
(
spuId
,
skuId
)
?
GoodsTypeEnum
.
SPU_GOODS
.
getGoodsType
()
:
GoodsTypeEnum
.
SKU_GOODS
.
getGoodsType
();
if
(
spuId
.
startsWith
(
CommonsConstant
.
COUPON_PREFIX
))
{
if
(
spuId
.
startsWith
(
CommonsConstant
.
COUPON_PREFIX
))
{
goodsType
=
GoodsTypeEnum
.
COUPON_GOODS
.
getGoodsType
();
if
(
StringUtils
.
isNotBlank
(
skuId
)){
goodsType
=
GoodsTypeEnum
.
HG_COUPON_GOODS
.
getGoodsType
();
}
else
{
goodsType
=
GoodsTypeEnum
.
COUPON_GOODS
.
getGoodsType
();
}
}
else
if
(
CollectionUtils
.
isNotEmpty
(
baseRequestDTO
.
getProductComboList
())
||
CollectionUtils
.
isNotEmpty
(
baseRequestDTO
.
getProductGroupList
()))
{
}
else
if
(
CollectionUtils
.
isNotEmpty
(
baseRequestDTO
.
getProductComboList
())
||
CollectionUtils
.
isNotEmpty
(
baseRequestDTO
.
getProductGroupList
()))
{
goodsType
=
GoodsTypeEnum
.
SET_MEAL_GOODS
.
getGoodsType
();
goodsType
=
GoodsTypeEnum
.
SET_MEAL_GOODS
.
getGoodsType
();
}
}
...
...
shopping-cart-application-service/src/main/java/cn/freemud/demo/service/impl/AbstractAddGoodsService.java
View file @
27351eb8
...
@@ -221,13 +221,6 @@ public abstract class AbstractAddGoodsService implements AddGoodsService {
...
@@ -221,13 +221,6 @@ public abstract class AbstractAddGoodsService implements AddGoodsService {
if
(
baseRequestBO
.
getSpuId
().
startsWith
(
CommonsConstant
.
COUPON_PREFIX
))
{
if
(
baseRequestBO
.
getSpuId
().
startsWith
(
CommonsConstant
.
COUPON_PREFIX
))
{
CartGoods
cartGoods
=
baseRequestBO
.
getAddGoods
();
CartGoods
cartGoods
=
baseRequestBO
.
getAddGoods
();
cartGoods
.
setCartGoodsUid
(
baseRequestBO
.
getSpuId
());
cartGoods
.
setCartGoodsUid
(
baseRequestBO
.
getSpuId
());
// 设置商品类型为商品券
if
(
CouponTypeEnum
.
TYPE_4
.
getCode
().
equals
(
getProductBO
.
getCouponType
()))
{
cartGoods
.
setGoodsType
(
GoodsTypeEnum
.
HG_COUPON_GOODS
.
getGoodsType
());
}
else
{
cartGoods
.
setGoodsType
(
GoodsTypeEnum
.
COUPON_GOODS
.
getGoodsType
());
}
cartGoods
.
setOriginalPrice
(
spqBO
.
getProductPrice
());
cartGoods
.
setOriginalPrice
(
spqBO
.
getProductPrice
());
// 商品券Id
// 商品券Id
...
@@ -250,7 +243,6 @@ public abstract class AbstractAddGoodsService implements AddGoodsService {
...
@@ -250,7 +243,6 @@ public abstract class AbstractAddGoodsService implements AddGoodsService {
cartGoods
.
setUnit
(
productsInfo
.
getUnit
());
cartGoods
.
setUnit
(
productsInfo
.
getUnit
());
cartGoods
.
setSpuName
(
productsInfo
.
getName
());
cartGoods
.
setSpuName
(
productsInfo
.
getName
());
cartGoods
.
setCouponProductPrice
(
productsInfo
.
getFinalPrice
());
cartGoods
.
setCouponProductPrice
(
productsInfo
.
getFinalPrice
());
cartGoods
.
setActivityCode
(
getProductBO
.
getActivityCode
());
boolean
stockLimit
=
false
;
boolean
stockLimit
=
false
;
if
(
productsInfo
.
getType
()
==
ProductType
.
NOSPEC
.
getCode
()
if
(
productsInfo
.
getType
()
==
ProductType
.
NOSPEC
.
getCode
()
&&
productsInfo
.
getStockLimit
()
==
1
)
{
&&
productsInfo
.
getStockLimit
()
==
1
)
{
...
...
shopping-cart-application-service/src/main/java/cn/freemud/demo/service/impl/PlatformAddGoodsService.java
View file @
27351eb8
...
@@ -79,7 +79,7 @@ public class PlatformAddGoodsService extends AbstractAddGoodsService {
...
@@ -79,7 +79,7 @@ public class PlatformAddGoodsService extends AbstractAddGoodsService {
coupon
.
setActivityCode
(
cartGoods
.
getActivityCode
());
coupon
.
setActivityCode
(
cartGoods
.
getActivityCode
());
coupons
.
add
(
coupon
);
coupons
.
add
(
coupon
);
if
(
GoodsTypeEnum
.
HG_COUPON_GOODS
.
getGoodsType
().
equals
(
cartGoods
.
getGoodsType
()))
{
if
(
GoodsTypeEnum
.
HG_COUPON_GOODS
.
getGoodsType
().
equals
(
cartGoods
.
getGoodsType
()))
{
this
.
setSpqDiscountGoods
(
calculationDiscountGoodsList
,
cartGoods
,
goodsId
,
cartGoods
.
getCouponProductPrice
(),
cartGoods
.
get
SpuId
(
));
this
.
setSpqDiscountGoods
(
calculationDiscountGoodsList
,
cartGoods
,
goodsId
,
cartGoods
.
getCouponProductPrice
(),
cartGoods
.
get
CartGoodsUid
().
substring
(
CommonsConstant
.
COUPON_PREFIX
.
length
()
));
}
else
{
}
else
{
this
.
setSpqDiscountGoods
(
calculationDiscountGoodsList
,
cartGoods
,
goodsId
,
cartGoods
.
getCouponProductPrice
(),
null
);
this
.
setSpqDiscountGoods
(
calculationDiscountGoodsList
,
cartGoods
,
goodsId
,
cartGoods
.
getCouponProductPrice
(),
null
);
}
}
...
@@ -176,6 +176,7 @@ public class PlatformAddGoodsService extends AbstractAddGoodsService {
...
@@ -176,6 +176,7 @@ public class PlatformAddGoodsService extends AbstractAddGoodsService {
if
(
null
==
checkSpqInfo
)
{
if
(
null
==
checkSpqInfo
)
{
cartGoodsList
.
remove
(
i
);
cartGoodsList
.
remove
(
i
);
}
else
{
}
else
{
cartGoods
.
setActivityCode
(
checkSpqInfo
.
getActiveCode
());
cartGoods
.
setCouponProductPrice
(
checkSpqInfo
.
getPrice
());
cartGoods
.
setCouponProductPrice
(
checkSpqInfo
.
getPrice
());
}
}
}
}
...
...
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