| | |
| | | import javax.servlet.ServletOutputStream; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.net.URLEncoder; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | |
| | | for (PrizeGrantRecordVO vo : list){ |
| | | PrizeGrantRecordExportDetailDtO detailDtO = new PrizeGrantRecordExportDetailDtO(); |
| | | BeanUtils.copyProperties(vo,detailDtO); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | // 将Date类型转换为指定格式的字符串 |
| | | String createTimeStr = sdf.format(vo.getCreateTime()); |
| | | // 设置到DTO中 |
| | | detailDtO.setCreateTime(createTimeStr); |
| | | exportDetailDtOS.add(detailDtO); |
| | | } |
| | | |
| | |
| | | String[] headers = { |
| | | "用户昵称", "活动名","商品名", |
| | | "商品内容","发放状态" |
| | | ,"描述" |
| | | ,"描述","发布时间" |
| | | }; |
| | | for(int i= 0 ;i< headers.length;i++){ |
| | | Cell cell = header.createCell(i); |
| | |
| | | } |
| | | |
| | | row.createCell(5).setCellValue(dto.getDes()); |
| | | row.createCell(6).setCellValue(dto.getCreateTime()); |
| | | } |
| | | |
| | | return workbook; |