Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
59ecc562
Commit
59ecc562
authored
Apr 30, 2019
by
Junling Bu
Browse files
fix[litemall-wx-api]: 商品数量校验非负
parent
4431c5f9
Changes
1
Hide whitespace changes
Inline
Side-by-side
litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxCartController.java
View file @
59ecc562
...
...
@@ -111,6 +111,9 @@ public class WxCartController {
if
(!
ObjectUtils
.
allNotNull
(
productId
,
number
,
goodsId
))
{
return
ResponseUtil
.
badArgument
();
}
if
(
number
<=
0
){
return
ResponseUtil
.
badArgument
();
}
//判断商品是否可以购买
LitemallGoods
goods
=
goodsService
.
findById
(
goodsId
);
...
...
@@ -177,6 +180,9 @@ public class WxCartController {
if
(!
ObjectUtils
.
allNotNull
(
productId
,
number
,
goodsId
))
{
return
ResponseUtil
.
badArgument
();
}
if
(
number
<=
0
){
return
ResponseUtil
.
badArgument
();
}
//判断商品是否可以购买
LitemallGoods
goods
=
goodsService
.
findById
(
goodsId
);
...
...
@@ -239,6 +245,9 @@ public class WxCartController {
if
(!
ObjectUtils
.
allNotNull
(
id
,
productId
,
number
,
goodsId
))
{
return
ResponseUtil
.
badArgument
();
}
if
(
number
<=
0
){
return
ResponseUtil
.
badArgument
();
}
//判断是否存在该订单
// 如果不存在,直接返回错误
...
...
Write
Preview
Supports
Markdown
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