|
@@ -312,7 +312,7 @@ public class TempLittleArtistTrainingCampServiceImpl extends ServiceImpl<TempLit
|
|
|
List<TempLittleArtistTrainingCamp> list = stateMap.get(oldState);
|
|
|
if (CollectionUtils.isNotEmpty(list)) {
|
|
|
list.forEach(camp -> {
|
|
|
- if ( now.getTime() >= dateField.apply(camp).getTime()) {
|
|
|
+ if (now.getTime() >= dateField.apply(camp).getTime()) {
|
|
|
camp.setState(newState);
|
|
|
}
|
|
|
});
|
|
@@ -352,37 +352,37 @@ public class TempLittleArtistTrainingCampServiceImpl extends ServiceImpl<TempLit
|
|
|
return vo;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-//public void exp(Map<String, Object> param, HttpServletResponse response){
|
|
|
-// List<TempCampUserTrainingDetailVo> list = baseMapper.queryUserTrainingDetail(param);
|
|
|
-//
|
|
|
-// OutputStream outputStream = response.getOutputStream();
|
|
|
-// HSSFWorkbook workbook = null;
|
|
|
-// try {
|
|
|
-// String[] header = {"学员编号","学员姓名", "手机号", "群组","打卡天数", "训练时长(分钟)"};
|
|
|
-// String[] body = {"id","username", "phone", " private String imGroupName","title","payStatus==NULL || payStatus==0?'未缴费':payStatus==1?'缴费中':'已缴费'", "userId", "userName", "mobileNo", "subjectName", "brand", "specification","hasInstrumentsId","actualAmount","balance"};
|
|
|
-// workbook = POIUtil.exportExcel(header, body, pageList.getRows());
|
|
|
-// response.setContentType("application/octet-stream");
|
|
|
-// response.setHeader("Content-Disposition", "attachment;filename=replacement-" + DateUtil.getDate(new Date()) + ".xls");
|
|
|
-// response.flushBuffer();
|
|
|
-// outputStream = response.getOutputStream();
|
|
|
-// workbook.write(outputStream);
|
|
|
-// outputStream.flush();
|
|
|
-// workbook.close();
|
|
|
-// } catch (Exception e) {
|
|
|
-// e.printStackTrace();
|
|
|
-// } finally {
|
|
|
-// if (outputStream != null) {
|
|
|
-// try {
|
|
|
-// workbook.close();
|
|
|
-// outputStream.close();
|
|
|
-// } catch (IOException e) {
|
|
|
-// e.printStackTrace();
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-//}
|
|
|
-
|
|
|
+ /**
|
|
|
+ * 导出小小训练营想详情
|
|
|
+ */
|
|
|
+ public void exportUserTrainingDetail(Map<String, Object> param, HttpServletResponse response) throws IOException {
|
|
|
+ List<TempCampUserTrainingDetailVo> list = baseMapper.queryUserTrainingDetail(param);
|
|
|
+ OutputStream outputStream = response.getOutputStream();
|
|
|
+ HSSFWorkbook workbook = null;
|
|
|
+ try {
|
|
|
+ String[] header = {"学员编号", "学员姓名", "手机号", "群组", "打卡天数", "训练时长(分钟)"};
|
|
|
+ String[] body = {"id", "username", "phone", "actualAmount", "balance"};
|
|
|
+ workbook = POIUtil.exportExcel(header, body, list);
|
|
|
+ response.setContentType("application/octet-stream");
|
|
|
+ response.setHeader("Content-Disposition", "attachment;filename=replacement-" + DateUtil.getDate(new Date()) + ".xls");
|
|
|
+ response.flushBuffer();
|
|
|
+ outputStream = response.getOutputStream();
|
|
|
+ workbook.write(outputStream);
|
|
|
+ outputStream.flush();
|
|
|
+ workbook.close();
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ } finally {
|
|
|
+ if (outputStream != null) {
|
|
|
+ try {
|
|
|
+ workbook.close();
|
|
|
+ outputStream.close();
|
|
|
+ } catch (IOException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
private SysUser getUser() {
|
|
|
return Optional.ofNullable(sysUserFeignService.queryUserInfo())
|