挂账需求和电话机预约需求
This commit is contained in:
parent
d29c4adc0b
commit
7fa8119674
|
|
@ -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);
|
||||
for (String phoneNo : phoneNos) {
|
||||
Map<String, Object> fillData = new HashMap<>(2);
|
||||
fillData.put("consumeOrders", 0);
|
||||
fillData.put("cancelOrders", 0);
|
||||
for (String phoneNo : phoneNos) {
|
||||
fillData.put("phoneNumber", phoneNo);
|
||||
Map<String, Object> data = list.stream().filter(item -> phoneNo.equals(item.get("phoneNumber"))).findFirst().orElse(fillData);
|
||||
result.put(phoneNo, data);
|
||||
|
|
|
|||
Loading…
Reference in New Issue