|
@@ -20,8 +20,11 @@ import com.sqx.modules.exportExecl.dto.AccountEntry;
|
|
|
import com.sqx.modules.exportExecl.model.ExportJob;
|
|
import com.sqx.modules.exportExecl.model.ExportJob;
|
|
|
import com.sqx.modules.exportExecl.service.ExportJobService;
|
|
import com.sqx.modules.exportExecl.service.ExportJobService;
|
|
|
import com.sqx.modules.member.query.SpecialFavorStudentQuery;
|
|
import com.sqx.modules.member.query.SpecialFavorStudentQuery;
|
|
|
|
|
+import com.sqx.modules.member.query.VipPromoRecordQuery;
|
|
|
import com.sqx.modules.member.service.SpecialFavorStudentService;
|
|
import com.sqx.modules.member.service.SpecialFavorStudentService;
|
|
|
|
|
+import com.sqx.modules.member.service.VipPromoRecordService;
|
|
|
import com.sqx.modules.member.vo.SpecialFavorStudentVO;
|
|
import com.sqx.modules.member.vo.SpecialFavorStudentVO;
|
|
|
|
|
+import com.sqx.modules.member.vo.VipPromoRecordVO;
|
|
|
import com.sqx.modules.order.dto.OrderQueryDto;
|
|
import com.sqx.modules.order.dto.OrderQueryDto;
|
|
|
import com.sqx.modules.order.service.AppOrderService;
|
|
import com.sqx.modules.order.service.AppOrderService;
|
|
|
import com.sqx.modules.pay.controller.query.CashOutQueryDTO;
|
|
import com.sqx.modules.pay.controller.query.CashOutQueryDTO;
|
|
@@ -83,6 +86,7 @@ public class ExportScheduler {
|
|
|
private final PlatformBillService platformBillService;
|
|
private final PlatformBillService platformBillService;
|
|
|
private final InsideAddressService insideAddressService;
|
|
private final InsideAddressService insideAddressService;
|
|
|
private final SpecialFavorStudentService specialFavorStudentService;
|
|
private final SpecialFavorStudentService specialFavorStudentService;
|
|
|
|
|
+ private final VipPromoRecordService vipPromoRecordService;
|
|
|
|
|
|
|
|
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
|
|
@@ -154,6 +158,8 @@ public class ExportScheduler {
|
|
|
excelData=getShippingAddressExcelData(exportJob);
|
|
excelData=getShippingAddressExcelData(exportJob);
|
|
|
} else if("specialFavorStudent".equals(fileType)){
|
|
} else if("specialFavorStudent".equals(fileType)){
|
|
|
excelData = getSpecialFavorStudentExcelData(exportJob);
|
|
excelData = getSpecialFavorStudentExcelData(exportJob);
|
|
|
|
|
+ }else if("vipPromoRecord".equals(fileType)){
|
|
|
|
|
+ excelData = getVipPromoRecordExcelData(exportJob);
|
|
|
}else{
|
|
}else{
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
@@ -198,6 +204,32 @@ public class ExportScheduler {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ private ExcelData getVipPromoRecordExcelData(ExportJob exportJob) {
|
|
|
|
|
+ VipPromoRecordQuery query = JSONUtil.toBean(exportJob.getConditions(), VipPromoRecordQuery.class);
|
|
|
|
|
+
|
|
|
|
|
+ ExcelData data = new ExcelData();
|
|
|
|
|
+ data.setName("特殊照顾学生列表");
|
|
|
|
|
+ data.setTitles(Arrays.asList("推广码id", "用户id", "用户名称", "用户手机号", "创建时间", "支付类型", "支付金额", "会员过期时间"));
|
|
|
|
|
+
|
|
|
|
|
+ PageUtils pages = vipPromoRecordService.pages(query);
|
|
|
|
|
+ List<List<Object>> rows = pages.getList().stream().map(e -> {
|
|
|
|
|
+ VipPromoRecordVO vo = (VipPromoRecordVO) e;
|
|
|
|
|
+ List<Object> row = new ArrayList<>();
|
|
|
|
|
+ row.add(vo.getPromoCodeId());
|
|
|
|
|
+ row.add(vo.getUserId());
|
|
|
|
|
+ row.add(vo.getUserName());
|
|
|
|
|
+ row.add(vo.getUserPhone());
|
|
|
|
|
+ row.add(vo.getCreateTime());
|
|
|
|
|
+ row.add(StrUtil.equals(vo.getPayType(), "1") ? "微信支付" : (StrUtil.equals(vo.getPayType(), "2") ? "余额支付" : "暖心照顾"));
|
|
|
|
|
+ row.add(vo.getPayAmount());
|
|
|
|
|
+ row.add(vo.getExpireTime());
|
|
|
|
|
+ return row;
|
|
|
|
|
+ }).collect(Collectors.toList());
|
|
|
|
|
+ data.setRows(rows);
|
|
|
|
|
+
|
|
|
|
|
+ return data;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
private ExcelData getSpecialFavorStudentExcelData(ExportJob exportJob) {
|
|
private ExcelData getSpecialFavorStudentExcelData(ExportJob exportJob) {
|
|
|
SpecialFavorStudentQuery query = JSONUtil.toBean(exportJob.getConditions(), SpecialFavorStudentQuery.class);
|
|
SpecialFavorStudentQuery query = JSONUtil.toBean(exportJob.getConditions(), SpecialFavorStudentQuery.class);
|
|
|
ExcelData data = new ExcelData();
|
|
ExcelData data = new ExcelData();
|