重构:将订单的分支流程,抽到 TradeOrderHandler 实现类中(补全各种排重逻辑)

This commit is contained in:
YunaiV
2023-10-11 07:49:23 +08:00
parent 41e5cf5285
commit b0179457ce
10 changed files with 86 additions and 43 deletions

View File

@@ -41,7 +41,7 @@ public interface SeckillProductMapper extends BaseMapperX<SeckillProductDO> {
Assert.isTrue(count > 0);
return update(null, new LambdaUpdateWrapper<SeckillProductDO>()
.eq(SeckillProductDO::getId, id)
.gt(SeckillProductDO::getStock, count)
.ge(SeckillProductDO::getStock, count)
.setSql("stock = stock - " + count));
}