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
8da1db4c
Commit
8da1db4c
authored
Nov 04, 2020
by
徐康
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
买3赠1
parent
7fa1ef62
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
56 additions
and
1 deletions
+56
-1
order-application-service/src/main/java/cn/freemud/entities/dto/shoppingCart/ShoppingCartGoodsDto.java
+11
-0
order-application-service/src/main/java/cn/freemud/entities/vo/CreateOrderVo.java
+24
-0
order-application-service/src/main/java/cn/freemud/entities/vo/ShoppingCartInfoRequestVo.java
+12
-0
order-application-service/src/main/java/cn/freemud/enums/ActivityTypeEnum.java
+1
-0
order-application-service/src/main/java/cn/freemud/service/impl/CheckMCCafeOrder.java
+8
-1
No files found.
order-application-service/src/main/java/cn/freemud/entities/dto/shoppingCart/ShoppingCartGoodsDto.java
View file @
8da1db4c
...
@@ -107,6 +107,17 @@ public class ShoppingCartGoodsDto {
...
@@ -107,6 +107,17 @@ public class ShoppingCartGoodsDto {
*/
*/
private
Long
payCardFee
;
private
Long
payCardFee
;
/**
* 麦咖啡-买三赠一券活动号
*/
private
String
buyThreeGiveOneActivityCode
;
/**
* 麦咖啡-买三赠一券默认券号
*/
private
String
buyThreeGiveOneCouponCode
;
@Data
@Data
public
static
class
CartGoodsDetailDto
{
public
static
class
CartGoodsDetailDto
{
/**
/**
...
...
order-application-service/src/main/java/cn/freemud/entities/vo/CreateOrderVo.java
View file @
8da1db4c
...
@@ -241,12 +241,36 @@ public class CreateOrderVo {
...
@@ -241,12 +241,36 @@ public class CreateOrderVo {
private
String
monthlyCardCode
;
private
String
monthlyCardCode
;
/**
/**
* 麦咖啡-买三赠一券活动号
*/
private
String
buyThreeGiveOneActivityCode
;
/**
* 麦咖啡-买三赠一券默认券号
*/
private
String
buyThreeGiveOneCouponCode
;
private
List
<
CouponType
>
couponTypeList
;
/**
* 是否使用电子风味卡,如果不为空则为使用
* 是否使用电子风味卡,如果不为空则为使用
*/
*/
@Valid
@Valid
@ApiModelProperty
(
value
=
"电子风味卡"
)
@ApiModelProperty
(
value
=
"电子风味卡"
)
private
UnionPayCard
unionPayCard
;
private
UnionPayCard
unionPayCard
;
@Data
public
class
CouponType
{
/**
* 券类型 1:买三赠一券
*/
private
Integer
type
;
/**
* 券code
*/
private
String
code
;
}
/**
/**
* 电子风味卡
* 电子风味卡
*/
*/
...
...
order-application-service/src/main/java/cn/freemud/entities/vo/ShoppingCartInfoRequestVo.java
View file @
8da1db4c
...
@@ -107,6 +107,18 @@ public class ShoppingCartInfoRequestVo {
...
@@ -107,6 +107,18 @@ public class ShoppingCartInfoRequestVo {
private
String
monthlyCardCode
;
private
String
monthlyCardCode
;
/**
* 麦咖啡-买三赠一券活动号
*/
private
String
buyThreeGiveOneActivityCode
;
/**
* 麦咖啡-买三赠一券默认券号
*/
private
String
buyThreeGiveOneCouponCode
;
private
List
<
CreateOrderVo
.
CouponType
>
couponTypeList
;
@Data
@Data
public
final
static
class
SendGoods
{
public
final
static
class
SendGoods
{
/**
/**
...
...
order-application-service/src/main/java/cn/freemud/enums/ActivityTypeEnum.java
View file @
8da1db4c
...
@@ -31,6 +31,7 @@ public enum ActivityTypeEnum {
...
@@ -31,6 +31,7 @@ public enum ActivityTypeEnum {
TYPE_31
(
31
,
"折扣券"
),
TYPE_31
(
31
,
"折扣券"
),
TYPE_32
(
32
,
"商品券"
),
TYPE_32
(
32
,
"商品券"
),
TYPE_34
(
34
,
"运费券"
),
TYPE_34
(
34
,
"运费券"
),
TYPE_35
(
35
,
"买三赠一券"
),
TYPE_5
(
5
,
"整单满金额折"
),
TYPE_5
(
5
,
"整单满金额折"
),
TYPE_51
(
51
,
"每满金额折"
),
TYPE_51
(
51
,
"每满金额折"
),
TYPE_52
(
52
,
"阶梯满金额折"
),
TYPE_52
(
52
,
"阶梯满金额折"
),
...
...
order-application-service/src/main/java/cn/freemud/service/impl/CheckMCCafeOrder.java
View file @
8da1db4c
...
@@ -481,6 +481,9 @@ public class CheckMCCafeOrder {
...
@@ -481,6 +481,9 @@ public class CheckMCCafeOrder {
.
menuType
(
createOrderVo
.
getMenuType
())
.
menuType
(
createOrderVo
.
getMenuType
())
.
buyMonthlyCard
(
createOrderVo
.
getBuyMonthlyCard
())
.
buyMonthlyCard
(
createOrderVo
.
getBuyMonthlyCard
())
.
monthlyCardCode
(
createOrderVo
.
getMonthlyCardCode
())
.
monthlyCardCode
(
createOrderVo
.
getMonthlyCardCode
())
.
buyThreeGiveOneActivityCode
(
createOrderVo
.
getBuyThreeGiveOneActivityCode
())
.
buyThreeGiveOneCouponCode
(
createOrderVo
.
getBuyThreeGiveOneCouponCode
())
.
couponTypeList
(
createOrderVo
.
getCouponTypeList
())
.
build
();
.
build
();
List
<
MCCafeCouponVo
>
couponCodeList
=
new
ArrayList
<>();
List
<
MCCafeCouponVo
>
couponCodeList
=
new
ArrayList
<>();
if
(
"remove"
.
equals
(
createOrderVo
.
getCouponCode
()))
{
if
(
"remove"
.
equals
(
createOrderVo
.
getCouponCode
()))
{
...
@@ -495,6 +498,9 @@ public class CheckMCCafeOrder {
...
@@ -495,6 +498,9 @@ public class CheckMCCafeOrder {
if
(
StringUtils
.
isNotBlank
(
createOrderVo
.
getFreightCouponCode
()))
{
if
(
StringUtils
.
isNotBlank
(
createOrderVo
.
getFreightCouponCode
()))
{
couponCodeList
.
add
(
new
MCCafeCouponVo
(
createOrderVo
.
getFreightCouponCode
()));
couponCodeList
.
add
(
new
MCCafeCouponVo
(
createOrderVo
.
getFreightCouponCode
()));
}
}
if
(
CollectionUtils
.
isNotEmpty
(
createOrderVo
.
getCouponTypeList
()))
{
createOrderVo
.
getCouponTypeList
().
forEach
(
o
->
couponCodeList
.
add
(
new
MCCafeCouponVo
(
o
.
getCode
())));
}
if
(
CollectionUtils
.
isNotEmpty
(
couponCodeList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
couponCodeList
))
{
// 校验couponCode
// 校验couponCode
MCCafeCouponRequest
mcCafeCouponRequest
=
MCCafeCouponRequest
.
builder
()
MCCafeCouponRequest
mcCafeCouponRequest
=
MCCafeCouponRequest
.
builder
()
...
@@ -550,7 +556,8 @@ public class CheckMCCafeOrder {
...
@@ -550,7 +556,8 @@ public class CheckMCCafeOrder {
List
<
MCCafeCouponVo
>
mcCafeCouponVos
=
new
ArrayList
<>();
List
<
MCCafeCouponVo
>
mcCafeCouponVos
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
shoppingCartGoodsDto
.
getActivityDiscountsDtos
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
shoppingCartGoodsDto
.
getActivityDiscountsDtos
()))
{
shoppingCartGoodsDto
.
getActivityDiscountsDtos
().
forEach
(
o
->
{
shoppingCartGoodsDto
.
getActivityDiscountsDtos
().
forEach
(
o
->
{
if
(
ActivityTypeEnum
.
TYPE_3
.
getCode
().
equals
(
o
.
getActivityType
())
||
ActivityTypeEnum
.
TYPE_32
.
getCode
().
equals
(
o
.
getActivityType
()))
{
if
(
ActivityTypeEnum
.
TYPE_3
.
getCode
().
equals
(
o
.
getActivityType
())
||
ActivityTypeEnum
.
TYPE_32
.
getCode
().
equals
(
o
.
getActivityType
())
||
ActivityTypeEnum
.
TYPE_34
.
getCode
().
equals
(
o
.
getActivityType
())
||
ActivityTypeEnum
.
TYPE_35
.
getCode
().
equals
(
o
.
getActivityType
()))
{
mcCafeCouponVos
.
add
(
new
MCCafeCouponVo
(
o
.
getActivityCode
()));
mcCafeCouponVos
.
add
(
new
MCCafeCouponVo
(
o
.
getActivityCode
()));
}
}
});
});
...
...
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