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
07f72cae
Commit
07f72cae
authored
Feb 02, 2021
by
徐康
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/20210122_xukang_麦咖啡p5v3'
parents
f5ba0150
2c3d9b4e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
0 deletions
+50
-0
order-application-service/src/main/java/cn/freemud/enums/CouponExtendTypeEnum.java
+33
-0
order-application-service/src/main/java/cn/freemud/service/impl/CheckMCCafeOrder.java
+5
-0
order-management/src/main/java/cn/freemud/management/entities/dto/response/coupon/McdNetCouponInfoRespDto.java
+12
-0
No files found.
order-application-service/src/main/java/cn/freemud/enums/CouponExtendTypeEnum.java
0 → 100644
View file @
07f72cae
package
cn
.
freemud
.
enums
;
public
enum
CouponExtendTypeEnum
{
TYPE_11
(
11
,
"太阳蛋"
),
;
private
Integer
code
;
private
String
desc
;
CouponExtendTypeEnum
(
Integer
code
,
String
desc
)
{
this
.
code
=
code
;
this
.
desc
=
desc
;
}
public
Integer
getCode
()
{
return
code
;
}
public
void
setCode
(
Integer
code
)
{
this
.
code
=
code
;
}
public
String
getDesc
()
{
return
desc
;
}
public
void
setDesc
(
String
desc
)
{
this
.
desc
=
desc
;
}
}
order-application-service/src/main/java/cn/freemud/service/impl/CheckMCCafeOrder.java
View file @
07f72cae
...
...
@@ -584,6 +584,7 @@ public class CheckMCCafeOrder {
}
});
}
List
<
String
>
skuIdList
=
shoppingCartGoodsDto
.
getProducts
().
stream
().
map
(
o
->
o
.
getSkuId
()).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
mcCafeCouponVos
))
{
MCCafeCouponRequest
mcCafeCouponRequest
=
MCCafeCouponRequest
.
builder
()
.
ver
(
88
)
...
...
@@ -617,6 +618,10 @@ public class CheckMCCafeOrder {
throw
new
ServiceException
(
ResponseResult
.
COUPON_SHOP_NOTSUPPORT
,
"部分优惠券暂时不可用"
);
}
}
if
(
o
.
getCodeInfo
().
getExtend_type
().
equals
(
CouponExtendTypeEnum
.
TYPE_11
.
getCode
())
&&
CollectionUtils
.
isNotEmpty
(
o
.
getCodeInfo
().
getBind_products
())
&&
!
o
.
getCodeInfo
().
getBind_products
().
stream
().
filter
(
p
->
skuIdList
.
contains
(
p
.
getSku_id
())).
findFirst
().
isPresent
())
{
throw
new
ServiceException
(
ResponseResult
.
COUPON_SHOP_NOTSUPPORT
,
"太阳蛋优惠券必须搭配固定商品同时购买"
);
}
});
}
}
...
...
order-management/src/main/java/cn/freemud/management/entities/dto/response/coupon/McdNetCouponInfoRespDto.java
View file @
07f72cae
...
...
@@ -110,4 +110,16 @@ public class McdNetCouponInfoRespDto {
*/
private
List
<
McdNetCouponProductRespDto
>
products
;
/**
* 绑定商品
*/
private
List
<
BindProductDto
>
bind_products
;
@Data
public
static
class
BindProductDto
{
private
String
sku_id
;
private
String
spu_id
;
private
String
product_name
;
}
}
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