zxl
2 天以前 d3f5a984360ae152369e6edf743cf8ace4e1d8ec
framework/src/main/java/cn/lili/modules/lmk/service/impl/PrizeRecordServiceImpl.java
@@ -31,6 +31,7 @@
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;
@@ -76,6 +77,11 @@
        for (PrizeRecordVO vo : list){
            PrizeRecordExportDetailDTO detailDtO = new PrizeRecordExportDetailDTO();
            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);
        }
        XSSFWorkbook workbook = new XSSFWorkbook();
@@ -85,7 +91,7 @@
        Row header = sheet.createRow(0);
        String[] headers = {
                "用户昵称", "活动名","中奖状态",
                "中奖内容","奖品发放状态"
                "中奖内容","奖品发放状态","抽奖时间"
        };
        for(int i= 0 ;i< headers.length;i++){
            Cell cell = header.createCell(i);
@@ -113,7 +119,7 @@
            }else {
                row.createCell(4).setCellValue(PrizeDistributeStatusEnum.WAIT.getDescription());
            }
            row.createCell(5).setCellValue(dto.getCreateTime());
        }
        return workbook;