feat: 添加打包费字段
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user