List<PageData> varList = setMealService.list(page);
        for(int i = 0;i < varList.size(); i++){
            // 获取 pack_m_id
            String packId = varList.get(i).get("pack_m_id").toString();
            // 获取该套餐的子项目数量
            String itemNum = setMealService.queryItemNumber(packId);
            varList.get(i).put("ItemNumber", itemNum);
        }
 varList.get(i).put()
put()是PageData中的方法,因为varList使用了泛型 List<PageData> new出来的对象,因此该List能够使用该PageData对象的方法

相关文章:

  • 2021-07-18
  • 2021-06-29
  • 2021-11-17
  • 2021-11-05
  • 2021-08-04
  • 2021-09-11
猜你喜欢
  • 2021-06-17
  • 2022-12-23
  • 2022-12-23
  • 2021-05-21
  • 2021-10-24
  • 2021-06-23
  • 2021-08-03
相关资源
相似解决方案