挂账需求和电话机预约需求

This commit is contained in:
谭凯凯 2024-11-27 11:30:21 +08:00 committed by Tankaikai
parent d29c4adc0b
commit 7fa8119674
1 changed files with 3 additions and 3 deletions

View File

@ -263,10 +263,10 @@ public class TbShopTableBookingServiceImpl extends ServiceImpl<TbShopTableBookin
public Map<String, Object> summary(Integer shopId, String[] phoneNos) {
List<Map<String, Object>> list = baseMapper.summaryByPhoneNos(shopId, Arrays.asList(phoneNos));
Map<String, Object> result = new HashMap<>(phoneNos.length);
Map<String, Object> fillData = new HashMap<>(2);
fillData.put("consumeOrders", 0);
fillData.put("cancelOrders", 0);
for (String phoneNo : phoneNos) {
Map<String, Object> fillData = new HashMap<>(2);
fillData.put("consumeOrders", 0);
fillData.put("cancelOrders", 0);
fillData.put("phoneNumber", phoneNo);
Map<String, Object> data = list.stream().filter(item -> phoneNo.equals(item.get("phoneNumber"))).findFirst().orElse(fillData);
result.put(phoneNo, data);