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

你好!多个用户抢一个库存只有1的商品不需要用锁吗? #5

Open
gxing001 opened this issue Jul 23, 2021 · 1 comment

Comments

@gxing001
Copy link

例如库存只有1的商品,直接用你这种方式不用加锁解锁吗?多个用户抢的情况下。

@sjtukk
Copy link

sjtukk commented Oct 24, 2021

他在mapper中写了,update.....where stock > 0, mysql自己会上锁的

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