feat: 1.退款接口修改
This commit is contained in:
@@ -2153,10 +2153,15 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
||||
BigDecimal discount = BigDecimal.valueOf(payDTO.getDiscount());
|
||||
cashierCarts.forEach(item -> {
|
||||
item.setTotalAmount(item.getTotalAmount().multiply(discount).setScale(2, RoundingMode.HALF_UP));
|
||||
item.setSalePrice(item.getSalePrice().multiply(discount).setScale(2, RoundingMode.HALF_UP));
|
||||
item.setMemberPrice(item.getMemberPrice().multiply(discount).setScale(2, RoundingMode.HALF_UP));
|
||||
|
||||
});
|
||||
|
||||
detailList.forEach(item -> {
|
||||
item.setPriceAmount(item.getPriceAmount().multiply(discount).setScale(2, RoundingMode.HALF_UP));
|
||||
item.setPrice(item.getPrice().multiply(discount).setScale(2, RoundingMode.HALF_UP));
|
||||
item.setMemberPrice(item.getMemberPrice().multiply(discount).setScale(2, RoundingMode.HALF_UP));
|
||||
});
|
||||
|
||||
mpCashierCartService.updateBatchById(cashierCarts);
|
||||
|
||||
Reference in New Issue
Block a user