detail价格计算折扣

This commit is contained in:
2024-10-17 09:12:58 +08:00
parent eff2d6d630
commit 519bedfc7c
3 changed files with 28 additions and 0 deletions

View File

@@ -176,6 +176,8 @@ public class PayServiceImpl implements PayService {
.eq(TbOrderDetail::getOrderId, orderInfo.getId())
.eq(TbOrderDetail::getUseType, orderInfo.getUseType())
.in(TbOrderDetail::getStatus, "unpaid")
.setSql(StrUtil.format("price_amount=price*num*{}", orderInfo.getDiscountRatio()))
.set(TbOrderDetail::getStatus, "closed"));
//修改主单状态

View File

@@ -1599,6 +1599,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
.eq(TbOrderDetail::getOrderId, orderInfo.getId())
.eq(TbOrderDetail::getUseType, orderInfo.getUseType())
.eq(TbOrderDetail::getStatus, "unpaid")
.setSql(StrUtil.format("price_amount=price*num*{}", payDTO.getDiscount()))
.set(TbOrderDetail::getStatus, "closed"));
JSONObject jsonObject = new JSONObject();