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
036acadf
Commit
036acadf
authored
Mar 02, 2021
by
孙昱
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sunyu::update::new function about coupon conflicts
parent
df1f42b6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
0 deletions
+7
-0
shopping-cart-application-service/src/main/java/cn/freemud/constant/ResponseCodeConstant.java
+2
-0
shopping-cart-application-service/src/main/java/cn/freemud/enums/ResponseResult.java
+1
-0
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/calculation/CalculationServiceImpl.java
+4
-0
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/constant/ResponseCodeConstant.java
View file @
036acadf
...
...
@@ -9,6 +9,7 @@ public class ResponseCodeConstant {
public
final
static
String
RESPONSE_SUCCESS_STR
=
"100"
;
public
final
static
String
RESPONSE_CONFLICTS_STR
=
"105"
;
// coco券校验异常的错误
public
final
static
String
COCO_RESPONSE_COUPON_ERR_STR
=
"700"
;
...
...
@@ -25,6 +26,7 @@ public class ResponseCodeConstant {
successResponseCodeSet
.
add
(
RESPONSE_SUCCESS_OK
);
successResponseCodeSet
.
add
(
RESPONSE_SUCCESS_1
);
successResponseCodeSet
.
add
(
RESPONSE_SUCCESS_0_STR
);
successResponseCodeSet
.
add
(
RESPONSE_CONFLICTS_STR
);
}
public
static
boolean
isSuccessRespinseCode
(
Object
o
)
{
...
...
shopping-cart-application-service/src/main/java/cn/freemud/enums/ResponseResult.java
View file @
036acadf
...
...
@@ -144,6 +144,7 @@ public enum ResponseResult {
COUPON_SHOP_NOTSUPPORT
(
"46010"
,
"优惠券在当前门店不可用"
),
COUPON_ORDER_WAY_ERROR
(
"46011"
,
"您选择得优惠券不适用该点餐方式"
),
COUPON_VERIFICATION_FAIL
(
"46012"
,
"优惠券核销失败"
),
COUPON_CONFLICTS_ERROR
(
"46013"
,
"当前使用的券列表存在互斥"
),
/**
* 加价购商品
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/calculation/CalculationServiceImpl.java
View file @
036acadf
...
...
@@ -159,6 +159,10 @@ public class CalculationServiceImpl {
ErrorLog
.
printErrorLog
(
"calculation_discount_error"
,
"/calculation/discount/sharding"
,
discountRequest
,
ex
);
throw
new
ServiceException
(
ResponseResult
.
OPERATE_TOO_OFTEN
);
}
//优惠券互斥
if
(
null
!=
activityCalculationDiscountResponseDto
&&
StringUtils
.
equals
(
activityCalculationDiscountResponseDto
.
getStatusCode
(),
ResponseCodeConstant
.
RESPONSE_CONFLICTS_STR
)){
throw
new
ServiceException
(
ResponseResult
.
COUPON_CONFLICTS_ERROR
);
}
// 返回成功
if
(
activityCalculationDiscountResponseDto
==
null
||
!
StringUtils
.
equals
(
activityCalculationDiscountResponseDto
.
getStatusCode
(),
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
))
{
throw
new
ServiceException
(
ResponseResult
.
OPERATE_TOO_OFTEN
);
...
...
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