feat: 添加打包费字段

This commit is contained in:
张松
2024-11-11 14:22:46 +08:00
parent 7f1676ef1d
commit f20c679dc8

View File

@@ -123,6 +123,7 @@ public class ProductController {
List<TbCashierCart> cashierCartList = cartService.choseEatModel(choseEatModelDTO);
BigDecimal amount = BigDecimal.ZERO;
BigDecimal memberAmount = BigDecimal.ZERO;
BigDecimal packFee = BigDecimal.ZERO;
ArrayList<TbCashierCart> cashierCarts = new ArrayList<>();
TbCashierCart seatFee = null;
for (TbCashierCart item : cashierCartList) {
@@ -133,12 +134,14 @@ public class ProductController {
}else {
seatFee = item;
}
packFee = packFee.add(item.getPackFee());
}
HashMap<String, Object> data = new HashMap<>();
data.put("amount", amount);
data.put("memberAmount", memberAmount);
data.put("info", cashierCarts);
data.put("seatFee", seatFee);
data.put("packFee", seatFee);
return Result.success(CodeEnum.SUCCESS, data);
}