List for追加或修改内容
List for 修改值
List<QwAllianceCouponEntity> card= qwAllianceCouponDao.selectUserCouponList(); for (int i=0;i<card.size();i++){ long t=card.get(i).getExpTime(); Dates d=new Dates(); String af=d.timestampToDate(t); card.get(i).setOutTime(af); card.get(i).setAvatar("http://xxx.com"+card.get(i).getAvatar()); card.get(i).setSurplus(card.get(i).getCavNums()-card.get(i).getUseNums()); }
List for追加新的key value
public List cargoDetails(String orderGoodsId,long orderId){ QueryWrapper<OrderGoodsEntity> wrapper=new QueryWrapper<>(); List<String> oods= Arrays.asList(orderGoodsId.split(",")); wrapper.in("id", oods); List<OrderGoodsEntity> orderGoods=orderGoodsMapper.selectList(wrapper); ArrayList<Map<String,String>> arrayList=new ArrayList(); for (int i=0;i<orderGoods.size();i++) { Map<String,String> map=new HashMap<>(); map.put("qiao",orderGoods.get(i).getProductNo()); map.put("li",orderGoods.get(i).getGoodsName()); arrayList.add(i, map); } return arrayList; }