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
eca2b43e
Commit
eca2b43e
authored
Jan 18, 2021
by
yu.sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sunyu::update::fix bug about monthCard
parent
3b256404
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
shopping-cart-application-service/src/main/java/cn/freemud/enums/ResponseResult.java
+3
-1
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
+9
-2
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/enums/ResponseResult.java
View file @
eca2b43e
...
@@ -101,6 +101,7 @@ public enum ResponseResult {
...
@@ -101,6 +101,7 @@ public enum ResponseResult {
SHOPPING_CART_BUY_ONE_SEND_GOODS_NOT_EMPTY
(
"44032"
,
"未查询到寄件活动商品"
),
SHOPPING_CART_BUY_ONE_SEND_GOODS_NOT_EMPTY
(
"44032"
,
"未查询到寄件活动商品"
),
SHOPPING_CART_BUY_ONE_SEND_GOODS_ERR
(
"44033"
,
"寄件活动商品错误"
),
SHOPPING_CART_BUY_ONE_SEND_GOODS_ERR
(
"44033"
,
"寄件活动商品错误"
),
SHOPPING_CART_COUPON_MIX_NOT_EXIST
(
"44034"
,
"券商品不存在"
),
SHOPPING_CART_COUPON_MIX_NOT_EXIST
(
"44034"
,
"券商品不存在"
),
SHOPPING_CART_QTY_LIMIT_ERR
(
"44035"
,
"该商品超过限制数量,不可更新"
),
/**
/**
* 订单状态码
* 订单状态码
...
@@ -178,7 +179,8 @@ public enum ResponseResult {
...
@@ -178,7 +179,8 @@ public enum ResponseResult {
/**
/**
* coco验证券错误
* coco验证券错误
*/
*/
COCO_COUPON_VALIDATOR_FAIL
(
"49000"
,
"优惠券验证错误"
)
COCO_COUPON_VALIDATOR_FAIL
(
"49000"
,
"优惠券验证错误"
),
NEW_PURCHASE
(
"49001"
,
"超过限购数量了"
)
;
;
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
View file @
eca2b43e
...
@@ -176,10 +176,11 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -176,10 +176,11 @@ public class ShoppingCartMCoffeeServiceImpl {
if
(
mcCafeTablewareSkuId
.
equals
(
cartGoods
.
getSkuId
()))
{
if
(
mcCafeTablewareSkuId
.
equals
(
cartGoods
.
getSkuId
()))
{
return
ResponseUtil
.
error
(
ResponseResult
.
SHOPPING_CART_ADD_ERROR
.
getCode
(),
"不能重复添加餐具商品"
);
return
ResponseUtil
.
error
(
ResponseResult
.
SHOPPING_CART_ADD_ERROR
.
getCode
(),
"不能重复添加餐具商品"
);
}
}
if
(
Objects
.
equals
(
addShoppingCartGoodsRequestVo
.
getIsMonthCard
(),
1
)
&&
cartGoods
.
getQty
()>
9
){
if
(
Objects
.
equals
(
addShoppingCartGoodsRequestVo
.
getIsMonthCard
(),
1
)
&&
cartGoods
.
getQty
()>
10
){
shoppingCartGoodsResponseVo
.
setChanged
(
false
);
shoppingCartGoodsResponseVo
.
setChanged
(
false
);
shoppingCartGoodsResponseVo
.
setToastMsg
(
"月享卡最多购买10张"
);
shoppingCartGoodsResponseVo
.
setToastMsg
(
"月享卡最多购买10张"
);
return
ResponseUtil
.
success
(
shoppingCartGoodsResponseVo
);
cartGoods
.
setQty
(
10
);
break
;
}
}
}
}
}
}
...
@@ -355,6 +356,12 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -355,6 +356,12 @@ public class ShoppingCartMCoffeeServiceImpl {
}
}
}
}
for
(
CartGoods
goods
:
cartGoodsList
)
{
if
(
Objects
.
equals
(
1
,
goods
.
getIsMonthCard
())
&&
updateShoppingCartGoodsQtyRequestVo
.
getOldQty
()>=
10
){
throw
new
ServiceException
(
ResponseResult
.
SHOPPING_CART_QTY_LIMIT_ERR
);
}
}
if
(
cartGoods
==
null
)
{
if
(
cartGoods
==
null
)
{
throw
new
ServiceException
(
ResponseResult
.
SHOPPING_CART_UPDATE_ERROR
);
throw
new
ServiceException
(
ResponseResult
.
SHOPPING_CART_UPDATE_ERROR
);
}
}
...
...
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