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

This commit is contained in:
张松
2024-12-06 15:52:57 +08:00
parent 2f0b80a8db
commit 8332589647
3 changed files with 9 additions and 9 deletions

View File

@@ -11,7 +11,7 @@ public class SkuInfoPo {
private String productSkuName; private String productSkuName;
private BigDecimal num; private BigDecimal num;
private BigDecimal priceAmount; private BigDecimal priceAmount;
private BigDecimal discountAmount; private BigDecimal discountSaleAmount;
private BigDecimal packAmount; private BigDecimal packAmount;
private String categoryId; private String categoryId;
private BigDecimal price; private BigDecimal price;

View File

@@ -1520,10 +1520,10 @@ public class OrderService {
skuInfoPos = new ArrayList<>(); skuInfoPos = new ArrayList<>();
} }
skuInfoPos.forEach(item -> { skuInfoPos.forEach(item -> {
if (item.getDiscountAmount() != null) { if (item.getDiscountSaleAmount() != null) {
item.setPrice(item.getPrice().subtract(item.getDiscountAmount())); item.setPrice(item.getPrice().subtract(item.getDiscountSaleAmount()));
if (item.getMemberPrice() != null) { if (item.getMemberPrice() != null) {
item.setMemberPrice(item.getMemberPrice().subtract(item.getDiscountAmount())); item.setMemberPrice(item.getMemberPrice().subtract(item.getDiscountSaleAmount()));
} }
} }
}); });
@@ -1534,10 +1534,10 @@ public class OrderService {
skuInfoPos = new ArrayList<>(); skuInfoPos = new ArrayList<>();
} }
skuInfoPos.forEach(item -> { skuInfoPos.forEach(item -> {
if (item.getDiscountAmount() != null) { if (item.getDiscountSaleAmount() != null) {
item.setPrice(item.getPrice().subtract(item.getDiscountAmount())); item.setPrice(item.getPrice().subtract(item.getDiscountSaleAmount()));
if (item.getMemberPrice() != null) { if (item.getMemberPrice() != null) {
item.setMemberPrice(item.getMemberPrice().subtract(item.getDiscountAmount())); item.setMemberPrice(item.getMemberPrice().subtract(item.getDiscountSaleAmount()));
} }
} }
}); });

View File

@@ -611,7 +611,7 @@ select * from tb_order_info where trade_day = #{day} and table_id = #{masterId}
d.product_sku_name AS productSkuName, d.product_sku_name AS productSkuName,
c.category_id AS categoryId, c.category_id AS categoryId,
d.price_amount as priceAmount, d.price_amount as priceAmount,
d.discount_amount as discountAmount, d.discount_sale_amount as discountSaleAmount,
d.pack_amount as packAmount, d.pack_amount as packAmount,
d.price as price, d.price as price,
d.member_price as memberPrice, d.member_price as memberPrice,
@@ -635,7 +635,7 @@ select * from tb_order_info where trade_day = #{day} and table_id = #{masterId}
d.product_sku_name AS productSkuName, d.product_sku_name AS productSkuName,
'' AS categoryId, '' AS categoryId,
d.price_amount as priceAmount, d.price_amount as priceAmount,
d.discount_amount as discountAmount, d.discount_sale_amount as discountSaleAmount,
d.pack_amount as packAmount, d.pack_amount as packAmount,
d.price as price, d.price as price,
d.member_price as memberPrice, d.member_price as memberPrice,