悲观锁一句代码解释select status from items where id=10000 for update乐观锁在字段后添加使用版本号,第二种是使用时间戳。乐观锁与悲观锁及应用举例 - CSDN博客