返回结果

Map<String,Object> getTotal(String roomNumber)
map.put("waterReceivable",waterReceivable);
map.put("electricReceivable",electricReceivable);
结果
map{electricReceivable=82.62, waterReceivable=130.5}
map{electricReceivable=82.62, rent=100.0, waterReceivable=130.5}






public List<HashMap<String, Object>> getNameAndPrice(Long properietorId) {
List<HashMap<String, Object>> list = new ArrayList<HashMap<String,Object>>();
QueryWrapper query = new QueryWrapper();
query.eq("proprietor_id",properietorId);
List<ChargeItemEntity> listChargeItem = chargeItemService.list(query);
for (ChargeItemEntity chargeItemEntity : listChargeItem) {
HashMap<String, Object> map = new HashMap<String, Object>();
String itemName = chargeItemEntity.getName();
Double itemPrice = chargeItemEntity.getPrice();
map.put("itemName",itemName);
map.put("itemPrice",itemPrice);
list.add(map);
}
return list;
}
mapList[{itemName=网费, itemPrice=100.0}, {itemName=楼道费, itemPrice=100.0}, {itemName=灯油火蜡, itemPrice=100.0}]
posted @ 2019-12-12 11:31  白石雁归南  阅读(100)  评论(0编辑  收藏  举报