fix: 未设置会员价与商品价保持一致

This commit is contained in:
张松
2024-11-06 17:01:47 +08:00
parent 437e0c4ced
commit e92e0c3c62

View File

@@ -489,6 +489,10 @@ public class ProductService {
if (lowMemberPrice == null || lowMemberPrice.compareTo(item.getMemberPrice()) > 0) {
lowMemberPrice = item.getMemberPrice();
}
if (item.getMemberPrice() == null || item.getMemberPrice().compareTo(BigDecimal.ZERO) <= 0) {
item.setMealPrice(item.getSalePrice());
}
}
// 销量
it.setStockNumber(sum.intValue());