拯救List<Map<String,Object>>导出excel时间格式乱码不正确问题

                    List< Map<String, Object> > mapList = new ArraList<>();
                    mapList.forEach(list->{
                        list.forEach((key,value)->{
                            if (value instanceof Date){
                                value= DateUtil.format((Date)value,"yyyy-MM-dd HH:mm:ss");
                                list.put(key,value);
                            }
                            if (value instanceof LocalDateTime){
                                value= DateUtil.format((LocalDateTime)value,"yyyy-MM-dd HH:mm:ss");
                                list.put(key,value);
                            }
                        });
                    });

  

posted @ 2022-08-18 17:16  BlackCatFish  阅读(25)  评论(0编辑  收藏  举报