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
ddc64c06
Commit
ddc64c06
authored
Aug 17, 2021
by
ping.wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
买m赠n券
parent
505c396e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
2 deletions
+16
-2
shopping-cart-application-service/src/main/java/cn/freemud/enums/CouponTypeEnum.java
+2
-1
shopping-cart-application-service/src/main/java/cn/freemud/enums/GoodsTypeEnum.java
+1
-0
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/CouponServiceImpl.java
+10
-0
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartNewServiceImpl.java
+3
-1
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/enums/CouponTypeEnum.java
View file @
ddc64c06
...
@@ -6,7 +6,8 @@ public enum CouponTypeEnum {
...
@@ -6,7 +6,8 @@ public enum CouponTypeEnum {
TYPE_1
(
1
,
"代金券"
),
TYPE_1
(
1
,
"代金券"
),
TYPE_3
(
3
,
"折扣券"
),
TYPE_3
(
3
,
"折扣券"
),
TYPE_4
(
4
,
"换购券"
),
TYPE_4
(
4
,
"换购券"
),
TYPE_5
(
5
,
"配送券"
);
TYPE_5
(
5
,
"配送券"
),
TYPE_7
(
7
,
"买M赠N券"
);
private
Integer
code
;
private
Integer
code
;
...
...
shopping-cart-application-service/src/main/java/cn/freemud/enums/GoodsTypeEnum.java
View file @
ddc64c06
...
@@ -24,6 +24,7 @@ public enum GoodsTypeEnum {
...
@@ -24,6 +24,7 @@ public enum GoodsTypeEnum {
REDUCE_PRICE_GOODS
(
6
,
"超值加购商品"
),
REDUCE_PRICE_GOODS
(
6
,
"超值加购商品"
),
ALL_COUPON_GOODS
(
8
,
"万能券商品"
),
ALL_COUPON_GOODS
(
8
,
"万能券商品"
),
VIRTUAL_GOODS
(
9
,
"虚拟商品"
),
VIRTUAL_GOODS
(
9
,
"虚拟商品"
),
BUY_M_SEND_N_COUPON
(
10
,
"买M送N券"
),
MATERIAL
(
88
,
"有加料的商品"
),
MATERIAL
(
88
,
"有加料的商品"
),
EXCEPTION_GOODS
(
99
,
"异常商品:商品菜单变化导致和购物车不商品匹配"
);
EXCEPTION_GOODS
(
99
,
"异常商品:商品菜单变化导致和购物车不商品匹配"
);
private
Integer
goodsType
;
private
Integer
goodsType
;
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/CouponServiceImpl.java
View file @
ddc64c06
...
@@ -924,6 +924,16 @@ public class CouponServiceImpl implements CouponService {
...
@@ -924,6 +924,16 @@ public class CouponServiceImpl implements CouponService {
break
;
break
;
}
}
}
}
if
(
CouponTypeEnum
.
TYPE_7
.
getCode
().
equals
(
detail
.
getType
())){
for
(
GetCouponDetailResponseDto
.
ActiveProduct
activeProduct
:
detail
.
getActiveProduct
())
{
if
(
goodsId
.
equals
(
activeProduct
.
getProductIdPartner
()))
{
productValid
=
true
;
couponActivityDetail
=
detail
;
couponType
=
CouponTypeEnum
.
TYPE_7
.
getCode
();
break
;
}
}
}
}
}
//检查商品是否有效
//检查商品是否有效
if
(!
productValid
)
{
if
(!
productValid
)
{
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartNewServiceImpl.java
View file @
ddc64c06
...
@@ -2024,7 +2024,9 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
...
@@ -2024,7 +2024,9 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
// 设置商品类型为商品券
// 设置商品类型为商品券
if
(
CouponTypeEnum
.
TYPE_4
.
getCode
().
equals
(
couponProductDto
.
getType
()))
{
if
(
CouponTypeEnum
.
TYPE_4
.
getCode
().
equals
(
couponProductDto
.
getType
()))
{
cartGoods
.
setGoodsType
(
GoodsTypeEnum
.
HG_COUPON_GOODS
.
getGoodsType
());
cartGoods
.
setGoodsType
(
GoodsTypeEnum
.
HG_COUPON_GOODS
.
getGoodsType
());
}
else
{
}
else
if
(
CouponTypeEnum
.
TYPE_7
.
getCode
().
equals
(
couponProductDto
.
getType
()))
{
cartGoods
.
setGoodsType
(
GoodsTypeEnum
.
BUY_M_SEND_N_COUPON
.
getGoodsType
());
}
else
{
cartGoods
.
setGoodsType
(
GoodsTypeEnum
.
COUPON_GOODS
.
getGoodsType
());
cartGoods
.
setGoodsType
(
GoodsTypeEnum
.
COUPON_GOODS
.
getGoodsType
());
}
}
if
(
StringUtils
.
isBlank
(
addShoppingCartGoodsRequestVo
.
getCouponCode
()))
{
//老商品券
if
(
StringUtils
.
isBlank
(
addShoppingCartGoodsRequestVo
.
getCouponCode
()))
{
//老商品券
...
...
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