Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

编辑购物车单个商品数量,可以大于库存数量 #516

Open
Little-ping-zi opened this issue Jul 6, 2022 · 2 comments
Open

Comments

@Little-ping-zi
Copy link

Little-ping-zi commented Jul 6, 2022

复现步骤:
选择商品加入购物车 -> 点击【购物车】-> 点击【编辑】-> 选择添加的商品,点击【+】号增加商品数量至大于库存数量

预期结果:
增加失败,提示【库存不足】

实际结果:
增加成功(此商品库存数量为1)
Snipaste_2022-07-06_09-23-29

@860560622
Copy link

我愿意提交pr修复这个问题

@860560622
Copy link

我愿意提交pr修复这个问题

对于前端是直接默认加一的
我查阅了项目后端代码,发现这个问题出现的原因是初始化用户购物车时,后端传递的数据类型为LitemallCart,并未包括对于库存的数量属性

860560622 added a commit to 860560622/litemall that referenced this issue Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants