sunnyandpenta 最近的时间轴更新
sunnyandpenta

sunnyandpenta

V2EX 第 484618 号会员,加入于 2020-04-18 13:37:24 +08:00
sunnyandpenta 最近回复了
2022-04-10 11:00:20 +08:00
回复了 dearzhw 创建的主题 职场话题 得物干一年有必要跳吗
米哈游只给 30 吗?只涨 2k 的话+双休,感觉不是很值得,跳槽都是有风险的,我感觉给的不够
2022-04-03 20:49:07 +08:00
回复了 Features 创建的主题 MySQL 关于 mysql 并发的问题又来了
start transaction
1.SELECT balance FROM user where user_id = #{userId} for update;
2. int affectRows = update user set balance=balance-100 where user_id = #{userId} and balance>=100;
3.
if(affectRows > 0){
commit;
}else{
rollback;
}
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1104 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 10ms · UTC 18:50 · PVG 02:50 · LAX 11:50 · JFK 14:50
Developed with CodeLauncher
♥ Do have faith in what you're doing.