feat: findOrder价格返回改价后的价格
This commit is contained in:
@@ -15,5 +15,6 @@ public class SkuInfoPo {
|
|||||||
private BigDecimal packAmount;
|
private BigDecimal packAmount;
|
||||||
private String categoryId;
|
private String categoryId;
|
||||||
private BigDecimal price;
|
private BigDecimal price;
|
||||||
|
private BigDecimal memberPrice;
|
||||||
private String proGroupInfo;
|
private String proGroupInfo;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1521,7 +1521,10 @@ public class OrderService {
|
|||||||
}
|
}
|
||||||
skuInfoPos.forEach(item -> {
|
skuInfoPos.forEach(item -> {
|
||||||
if (item.getDiscountAmount() != null) {
|
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);
|
orderInfo.setSkuInfos(skuInfoPos);
|
||||||
@@ -1532,7 +1535,10 @@ public class OrderService {
|
|||||||
}
|
}
|
||||||
skuInfoPos.forEach(item -> {
|
skuInfoPos.forEach(item -> {
|
||||||
if (item.getDiscountAmount() != null) {
|
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);
|
orderInfo.setSkuInfos(skuInfoPos);
|
||||||
|
|||||||
@@ -614,6 +614,8 @@ select * from tb_order_info where trade_day = #{day} and table_id = #{masterId}
|
|||||||
d.discount_amount as discountAmount,
|
d.discount_amount as discountAmount,
|
||||||
d.pack_amount as packAmount,
|
d.pack_amount as packAmount,
|
||||||
d.price as price,
|
d.price as price,
|
||||||
|
d.member_price as memberPrice,
|
||||||
|
|
||||||
d.pro_group_info as proGroupInfo
|
d.pro_group_info as proGroupInfo
|
||||||
FROM
|
FROM
|
||||||
tb_order_detail d
|
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.discount_amount as discountAmount,
|
||||||
d.pack_amount as packAmount,
|
d.pack_amount as packAmount,
|
||||||
d.price as price,
|
d.price as price,
|
||||||
|
d.member_price as memberPrice,
|
||||||
d.pro_group_info as proGroupInfo
|
d.pro_group_info as proGroupInfo
|
||||||
FROM
|
FROM
|
||||||
tb_order_detail d
|
tb_order_detail d
|
||||||
|
|||||||
Reference in New Issue
Block a user