feat: findOrder价格返回改价后的价格

This commit is contained in:
张松
2024-12-06 15:49:43 +08:00
parent 8fa00c9c48
commit 2f0b80a8db
3 changed files with 12 additions and 2 deletions

View File

@@ -15,5 +15,6 @@ public class SkuInfoPo {
private BigDecimal packAmount;
private String categoryId;
private BigDecimal price;
private BigDecimal memberPrice;
private String proGroupInfo;
}

View File

@@ -1521,7 +1521,10 @@ public class OrderService {
}
skuInfoPos.forEach(item -> {
if (item.getDiscountAmount() != null) {
item.setPriceAmount(item.getPriceAmount().subtract(item.getDiscountAmount()));
item.setPrice(item.getPrice().subtract(item.getDiscountAmount()));
if (item.getMemberPrice() != null) {
item.setMemberPrice(item.getMemberPrice().subtract(item.getDiscountAmount()));
}
}
});
orderInfo.setSkuInfos(skuInfoPos);
@@ -1532,7 +1535,10 @@ public class OrderService {
}
skuInfoPos.forEach(item -> {
if (item.getDiscountAmount() != null) {
item.setPriceAmount(item.getPriceAmount().subtract(item.getDiscountAmount()));
item.setPrice(item.getPrice().subtract(item.getDiscountAmount()));
if (item.getMemberPrice() != null) {
item.setMemberPrice(item.getMemberPrice().subtract(item.getDiscountAmount()));
}
}
});
orderInfo.setSkuInfos(skuInfoPos);

View File

@@ -614,6 +614,8 @@ select * from tb_order_info where trade_day = #{day} and table_id = #{masterId}
d.discount_amount as discountAmount,
d.pack_amount as packAmount,
d.price as price,
d.member_price as memberPrice,
d.pro_group_info as proGroupInfo
FROM
tb_order_detail d
@@ -636,6 +638,7 @@ select * from tb_order_info where trade_day = #{day} and table_id = #{masterId}
d.discount_amount as discountAmount,
d.pack_amount as packAmount,
d.price as price,
d.member_price as memberPrice,
d.pro_group_info as proGroupInfo
FROM
tb_order_detail d