|
@@ -9,6 +9,7 @@ import cn.com.ctop.kuaishou.modules.batch.mapper.KuaiShouHistoryReportTaskMapper
|
|
|
import cn.com.ctop.kuaishou.modules.batch.mapper.KuaiShouReportDailyMaterialMapper;
|
|
|
import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouDailyReportTaskService;
|
|
|
import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouHistoryReportTaskService;
|
|
|
+import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouReportDailyMaterialService;
|
|
|
import cn.com.ctop.kuaishou.modules.report.entity.KuaiShouReportDailyMaterial;
|
|
|
import cn.com.ctop.kuaishou.modules.report.entity.KuaiShouReportDailyMaterialVo;
|
|
|
import cn.com.ctop.kuaishou.modules.report.entity.KuaishouReportDailyAccount;
|
|
@@ -66,6 +67,10 @@ public class KuaiShouHistoryReportTaskServiceImpl extends ServiceImpl<KuaiShouHi
|
|
|
|
|
|
@Autowired
|
|
|
private KuaiShouReportDailyMaterialMapper kuaishouReportDailyMaterialMapper;
|
|
|
+ @Autowired
|
|
|
+ private IKuaiShouReportDailyMaterialService reportDailyMaterialService;
|
|
|
+ @Autowired
|
|
|
+ private KuaiShouReportDailyMaterialMapper dailyMaterialMapper;
|
|
|
|
|
|
@Override
|
|
|
public void createTask(Long accountId, String token, String startDate, String endDate, String taskType) {
|
|
@@ -218,82 +223,159 @@ public class KuaiShouHistoryReportTaskServiceImpl extends ServiceImpl<KuaiShouHi
|
|
|
requestMap.put("task_id", task.getTaskId());
|
|
|
String localPath = LoadFileUtil.downloadByUrl(requestMap, downloadPath, url, token, fileName);
|
|
|
ArrayList<String[]> reportList = getReportList(localPath);
|
|
|
-
|
|
|
-
|
|
|
if (task.getViewType() == 1) {
|
|
|
- List<KuaishouReportDailyAccount> reportDailyAccounts = new ArrayList<>();
|
|
|
- for (int row = 0; row < reportList.size(); row++) {
|
|
|
- if (Check.isNull(row)) {
|
|
|
- continue;
|
|
|
+ if (!Check.isNull(reportList)) {
|
|
|
+ List<KuaishouReportDailyAccount> reportDailyAccounts = new ArrayList<>();
|
|
|
+ for (int row = 0; row < reportList.size(); row++) {
|
|
|
+ if (Check.isNull(row)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ KuaishouReportDailyAccount reportDailyAccount = new KuaishouReportDailyAccount();
|
|
|
+ reportDailyAccount.setAccountId(task.getAccountId());
|
|
|
+ reportDailyAccount.setCharge(ConverterUtils.getAsBigDecimal(reportList.get(row)[1]));
|
|
|
+ reportDailyAccount.setAdScene(reportList.get(row)[0]);
|
|
|
+ reportDailyAccount.setPhotoShow(ConverterUtils.getAsLong(reportList.get(row)[2]));
|
|
|
+ reportDailyAccount.setAclick(ConverterUtils.getAsLong(reportList.get(row)[3]));
|
|
|
+ reportDailyAccount.setBclick(ConverterUtils.getAsLong(reportList.get(row)[4]));
|
|
|
+ reportDailyAccount.setPhotoShare(ConverterUtils.getAsLong(reportList.get(row)[5]));
|
|
|
+ reportDailyAccount.setPhotoComment(ConverterUtils.getAsLong(reportList.get(row)[6]));
|
|
|
+ reportDailyAccount.setPhotoLike(ConverterUtils.getAsLong(reportList.get(row)[7]));
|
|
|
+ reportDailyAccount.setFollow(ConverterUtils.getAsLong(reportList.get(row)[8]));
|
|
|
+ reportDailyAccount.setCancelFollow(ConverterUtils.getAsLong(reportList.get(row)[9]));
|
|
|
+ reportDailyAccount.setReport(ConverterUtils.getAsLong(reportList.get(row)[10]));
|
|
|
+ reportDailyAccount.setBlock(ConverterUtils.getAsLong(reportList.get(row)[11]));
|
|
|
+ reportDailyAccount.setNegative(ConverterUtils.getAsLong(reportList.get(row)[12]));
|
|
|
+ reportDailyAccount.setDownloadStarted(ConverterUtils.getAsLong(reportList.get(row)[13]));
|
|
|
+ reportDailyAccount.setDownloadCompleted(ConverterUtils.getAsLong(reportList.get(row)[14]));
|
|
|
+ reportDailyAccount.setActivation(ConverterUtils.getAsLong(reportList.get(row)[15]));
|
|
|
+ reportDailyAccount.setSubmit(ConverterUtils.getAsLong(reportList.get(row)[16]));
|
|
|
+ reportDailyAccount.setStatDate(reportList.get(row)[17]);
|
|
|
+ reportDailyAccount.setPhotoClick(ConverterUtils.getAsLong(reportList.get(row)[19]));
|
|
|
+ reportDailyAccount.setPhotoClickRatio(ConverterUtils.getAsDouble(reportList.get(row)[20]));
|
|
|
+ reportDailyAccount.setActionRatio(ConverterUtils.getAsDouble(reportList.get(row)[21]));
|
|
|
+ reportDailyAccount.setImpression1kCost(ConverterUtils.getAsBigDecimal(reportList.get(row)[22]));
|
|
|
+ reportDailyAccount.setPhotoClickCost(ConverterUtils.getAsBigDecimal(reportList.get(row)[23]));
|
|
|
+ reportDailyAccount.setActionCost(ConverterUtils.getAsBigDecimal(reportList.get(row)[25]));
|
|
|
+ reportDailyAccount.setEventPayFirstDay(ConverterUtils.getAsLong(reportList.get(row)[26]));
|
|
|
+ reportDailyAccount.setEventPayPurchaseAmountFirstDay(ConverterUtils.getAsBigDecimal(reportList.get(row)[27]));
|
|
|
+ reportDailyAccount.setEventPayFirstDayRoi(ConverterUtils.getAsDouble(reportList.get(row)[28]));
|
|
|
+ reportDailyAccount.setEventPay(ConverterUtils.getAsLong(reportList.get(row)[29]));
|
|
|
+ reportDailyAccount.setEventPayPurchaseAmount(ConverterUtils.getAsBigDecimal(reportList.get(row)[30]));
|
|
|
+ reportDailyAccount.setEventPayRoi(ConverterUtils.getAsDouble(reportList.get(row)[31]));
|
|
|
+ reportDailyAccount.setEventRegister(ConverterUtils.getAsLong(reportList.get(row)[32]));
|
|
|
+ reportDailyAccount.setEventRegisterCost(ConverterUtils.getAsBigDecimal(reportList.get(row)[33]));
|
|
|
+ reportDailyAccount.setEventRegisterRatio(ConverterUtils.getAsDouble(reportList.get(row)[34]));
|
|
|
+ reportDailyAccount.setEventJinJianApp(ConverterUtils.getAsLong(reportList.get(row)[35]));
|
|
|
+ reportDailyAccount.setEventJinJianAppCost(ConverterUtils.getAsBigDecimal(reportList.get(row)[36]));
|
|
|
+ reportDailyAccount.setEventCreditGrantApp(ConverterUtils.getAsLong(reportList.get(row)[37]));
|
|
|
+ reportDailyAccount.setEventCreditGrantAppCost(ConverterUtils.getAsBigDecimal(reportList.get(row)[38]));
|
|
|
+ reportDailyAccount.setEventCreditGrantAppRatio(ConverterUtils.getAsDouble(reportList.get(row)[39]));
|
|
|
+ reportDailyAccount.setEventOrderPaid(ConverterUtils.getAsLong(reportList.get(row)[40]));
|
|
|
+ reportDailyAccount.setEventOrderPaidPurchaseAmount(ConverterUtils.getAsBigDecimal(reportList.get(row)[41]));
|
|
|
+ reportDailyAccount.setEventOrderPaidCost(ConverterUtils.getAsBigDecimal(reportList.get(row)[42]));
|
|
|
+ reportDailyAccount.setFormCount(ConverterUtils.getAsLong(reportList.get(row)[43]));
|
|
|
+ reportDailyAccount.setFormCost(ConverterUtils.getAsBigDecimal(reportList.get(row)[44]));
|
|
|
+ reportDailyAccount.setFormActionRatio(ConverterUtils.getAsDouble(reportList.get(row)[45]));
|
|
|
+ reportDailyAccount.setEventJinJianLandingPage(ConverterUtils.getAsLong(reportList.get(row)[46]));
|
|
|
+ reportDailyAccount.setEventJinJianLandingPageCost(ConverterUtils.getAsBigDecimal(reportList.get(row)[47]));
|
|
|
+ reportDailyAccount.setEventCreditGrantLandingPage(ConverterUtils.getAsLong(reportList.get(row)[48]));
|
|
|
+ reportDailyAccount.setEventCreditGrantLandingPageCost(ConverterUtils.getAsBigDecimal(reportList.get(row)[49]));
|
|
|
+ reportDailyAccount.setEventCreditGrantLandingRatio(ConverterUtils.getAsDouble(reportList.get(row)[50]));
|
|
|
+ reportDailyAccount.setEventNextDayStayCost(ConverterUtils.getAsBigDecimal(reportList.get(row)[51]));
|
|
|
+ reportDailyAccount.setEventNextDayStayRatio(ConverterUtils.getAsBigDecimal(reportList.get(row)[52]));
|
|
|
+ reportDailyAccount.setEventNextDayStay(ConverterUtils.getAsLong(reportList.get(row)[53]));
|
|
|
+ reportDailyAccount.setPlay3sRatio(ConverterUtils.getAsDouble(reportList.get(row)[54]));
|
|
|
+ reportDailyAccount.setEventNewUserPay(ConverterUtils.getAsLong(reportList.get(row)[63]));
|
|
|
+ reportDailyAccount.setEventNewUserPayCost(ConverterUtils.getAsBigDecimal(reportList.get(row)[64]));
|
|
|
+ reportDailyAccount.setEventNewUserPayRatio(ConverterUtils.getAsBigDecimal(reportList.get(row)[65]));
|
|
|
+ reportDailyAccounts.add(reportDailyAccount);
|
|
|
+ }
|
|
|
+ if (!Check.isNull(reportDailyAccounts)) {
|
|
|
+ reportDailyAccountMapper.replaceBatch(reportDailyAccounts);
|
|
|
}
|
|
|
- KuaishouReportDailyAccount reportDailyAccount = new KuaishouReportDailyAccount();
|
|
|
- reportDailyAccount.setAccountId(task.getAccountId());
|
|
|
- reportDailyAccount.setCharge(ConverterUtils.getAsBigDecimal(reportList.get(row)[1]));
|
|
|
- reportDailyAccount.setAdScene(reportList.get(row)[0]);
|
|
|
- reportDailyAccount.setPhotoShow(ConverterUtils.getAsLong(reportList.get(row)[2]));
|
|
|
- reportDailyAccount.setAclick(ConverterUtils.getAsLong(reportList.get(row)[3]));
|
|
|
- reportDailyAccount.setBclick(ConverterUtils.getAsLong(reportList.get(row)[4]));
|
|
|
- reportDailyAccount.setPhotoShare(ConverterUtils.getAsLong(reportList.get(row)[5]));
|
|
|
- reportDailyAccount.setPhotoComment(ConverterUtils.getAsLong(reportList.get(row)[6]));
|
|
|
- reportDailyAccount.setPhotoLike(ConverterUtils.getAsLong(reportList.get(row)[7]));
|
|
|
- reportDailyAccount.setFollow(ConverterUtils.getAsLong(reportList.get(row)[8]));
|
|
|
- reportDailyAccount.setCancelFollow(ConverterUtils.getAsLong(reportList.get(row)[9]));
|
|
|
- reportDailyAccount.setReport(ConverterUtils.getAsLong(reportList.get(row)[10]));
|
|
|
- reportDailyAccount.setBlock(ConverterUtils.getAsLong(reportList.get(row)[11]));
|
|
|
- reportDailyAccount.setNegative(ConverterUtils.getAsLong(reportList.get(row)[12]));
|
|
|
- reportDailyAccount.setDownloadStarted(ConverterUtils.getAsLong(reportList.get(row)[13]));
|
|
|
- reportDailyAccount.setDownloadCompleted(ConverterUtils.getAsLong(reportList.get(row)[14]));
|
|
|
- reportDailyAccount.setActivation(ConverterUtils.getAsLong(reportList.get(row)[15]));
|
|
|
- reportDailyAccount.setSubmit(ConverterUtils.getAsLong(reportList.get(row)[16]));
|
|
|
- reportDailyAccount.setStatDate(reportList.get(row)[17]);
|
|
|
- reportDailyAccount.setPhotoClick(ConverterUtils.getAsLong(reportList.get(row)[19]));
|
|
|
- reportDailyAccount.setPhotoClickRatio(ConverterUtils.getAsDouble(reportList.get(row)[20]));
|
|
|
- reportDailyAccount.setActionRatio(ConverterUtils.getAsDouble(reportList.get(row)[21]));
|
|
|
- reportDailyAccount.setImpression1kCost(ConverterUtils.getAsBigDecimal(reportList.get(row)[22]));
|
|
|
- reportDailyAccount.setPhotoClickCost(ConverterUtils.getAsBigDecimal(reportList.get(row)[23]));
|
|
|
- reportDailyAccount.setActionCost(ConverterUtils.getAsBigDecimal(reportList.get(row)[25]));
|
|
|
- reportDailyAccount.setEventPayFirstDay(ConverterUtils.getAsLong(reportList.get(row)[26]));
|
|
|
- reportDailyAccount.setEventPayPurchaseAmountFirstDay(ConverterUtils.getAsBigDecimal(reportList.get(row)[27]));
|
|
|
- reportDailyAccount.setEventPayFirstDayRoi(ConverterUtils.getAsDouble(reportList.get(row)[28]));
|
|
|
- reportDailyAccount.setEventPay(ConverterUtils.getAsLong(reportList.get(row)[29]));
|
|
|
- reportDailyAccount.setEventPayPurchaseAmount(ConverterUtils.getAsBigDecimal(reportList.get(row)[30]));
|
|
|
- reportDailyAccount.setEventPayRoi(ConverterUtils.getAsDouble(reportList.get(row)[31]));
|
|
|
- reportDailyAccount.setEventRegister(ConverterUtils.getAsLong(reportList.get(row)[32]));
|
|
|
- reportDailyAccount.setEventRegisterCost(ConverterUtils.getAsBigDecimal(reportList.get(row)[33]));
|
|
|
- reportDailyAccount.setEventRegisterRatio(ConverterUtils.getAsDouble(reportList.get(row)[34]));
|
|
|
- reportDailyAccount.setEventJinJianApp(ConverterUtils.getAsLong(reportList.get(row)[35]));
|
|
|
- reportDailyAccount.setEventJinJianAppCost(ConverterUtils.getAsBigDecimal(reportList.get(row)[36]));
|
|
|
- reportDailyAccount.setEventCreditGrantApp(ConverterUtils.getAsLong(reportList.get(row)[37]));
|
|
|
- reportDailyAccount.setEventCreditGrantAppCost(ConverterUtils.getAsBigDecimal(reportList.get(row)[38]));
|
|
|
- reportDailyAccount.setEventCreditGrantAppRatio(ConverterUtils.getAsDouble(reportList.get(row)[39]));
|
|
|
- reportDailyAccount.setEventOrderPaid(ConverterUtils.getAsLong(reportList.get(row)[40]));
|
|
|
- reportDailyAccount.setEventOrderPaidPurchaseAmount(ConverterUtils.getAsBigDecimal(reportList.get(row)[41]));
|
|
|
- reportDailyAccount.setEventOrderPaidCost(ConverterUtils.getAsBigDecimal(reportList.get(row)[42]));
|
|
|
- reportDailyAccount.setFormCount(ConverterUtils.getAsLong(reportList.get(row)[43]));
|
|
|
- reportDailyAccount.setFormCost(ConverterUtils.getAsBigDecimal(reportList.get(row)[44]));
|
|
|
- reportDailyAccount.setFormActionRatio(ConverterUtils.getAsDouble(reportList.get(row)[45]));
|
|
|
- reportDailyAccount.setEventJinJianLandingPage(ConverterUtils.getAsLong(reportList.get(row)[46]));
|
|
|
- reportDailyAccount.setEventJinJianLandingPageCost(ConverterUtils.getAsBigDecimal(reportList.get(row)[47]));
|
|
|
- reportDailyAccount.setEventCreditGrantLandingPage(ConverterUtils.getAsLong(reportList.get(row)[48]));
|
|
|
- reportDailyAccount.setEventCreditGrantLandingPageCost(ConverterUtils.getAsBigDecimal(reportList.get(row)[49]));
|
|
|
- reportDailyAccount.setEventCreditGrantLandingRatio(ConverterUtils.getAsDouble(reportList.get(row)[50]));
|
|
|
- reportDailyAccount.setEventNextDayStayCost(ConverterUtils.getAsBigDecimal(reportList.get(row)[51]));
|
|
|
- reportDailyAccount.setEventNextDayStayRatio(ConverterUtils.getAsBigDecimal(reportList.get(row)[52]));
|
|
|
- reportDailyAccount.setEventNextDayStay(ConverterUtils.getAsLong(reportList.get(row)[53]));
|
|
|
- reportDailyAccount.setPlay3sRatio(ConverterUtils.getAsDouble(reportList.get(row)[54]));
|
|
|
- reportDailyAccount.setEventNewUserPay(ConverterUtils.getAsLong(reportList.get(row)[63]));
|
|
|
- reportDailyAccount.setEventNewUserPayCost(ConverterUtils.getAsBigDecimal(reportList.get(row)[64]));
|
|
|
- reportDailyAccount.setEventNewUserPayRatio(ConverterUtils.getAsBigDecimal(reportList.get(row)[65]));
|
|
|
- reportDailyAccounts.add(reportDailyAccount);
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- if (!Check.isNull(reportDailyAccounts)) {
|
|
|
- reportDailyAccountMapper.replaceBatch(reportDailyAccounts);
|
|
|
}
|
|
|
+ } else if (task.getViewType() == 5) {
|
|
|
+ if (!Check.isNull(reportList)) {
|
|
|
+ List<KuaiShouReportDailyMaterial> materialList = new ArrayList<>();
|
|
|
+ List<Long> photoIdList = new ArrayList<>();
|
|
|
+ for (int row = 0; row < reportList.size(); row++) {
|
|
|
+ String[] strings = reportList.get(row);
|
|
|
+ if (Check.isNull(strings)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ KuaiShouReportDailyMaterial material = new KuaiShouReportDailyMaterial();
|
|
|
+ material.setAccountId(task.getAccountId());
|
|
|
+ material.setPhotoId(ConverterUtils.getAsLong(strings[0]));
|
|
|
+ photoIdList.add(ConverterUtils.getAsLong(strings[0]));
|
|
|
+ material.setImageToken(strings[1]);
|
|
|
+ material.setCoverUrl(strings[2]);
|
|
|
+ material.setPhotoUrl(strings[3]);
|
|
|
+ // 4
|
|
|
+ material.setCreativeMaterialTypeString(strings[5]);
|
|
|
+ material.setAdScene(strings[6]);
|
|
|
+ material.setCharge(ConverterUtils.getAsBigDecimal(strings[7]));
|
|
|
+ material.setPhotoShow(ConverterUtils.getAsLong(strings[8]));
|
|
|
+ material.setAclick(ConverterUtils.getAsLong(strings[9]));
|
|
|
+ material.setBclick(ConverterUtils.getAsLong(strings[10]));
|
|
|
+ material.setPhotoShare(ConverterUtils.getAsInteger(strings[11]));
|
|
|
+ material.setPhotoComment(ConverterUtils.getAsInteger(strings[12]));
|
|
|
+ material.setPhotoLike(ConverterUtils.getAsInteger(strings[13]));
|
|
|
+ material.setFollow(ConverterUtils.getAsInteger(strings[14]));
|
|
|
+ material.setCancelFollow(ConverterUtils.getAsInteger(strings[15]));
|
|
|
+ material.setReport(ConverterUtils.getAsInteger(strings[16]));
|
|
|
+ material.setBlock(ConverterUtils.getAsInteger(strings[17]));
|
|
|
+ material.setNegative(ConverterUtils.getAsInteger(strings[18]));
|
|
|
+ material.setDownloadStarted(ConverterUtils.getAsInteger(strings[19]));
|
|
|
+ material.setDownloadCompleted(ConverterUtils.getAsInteger(strings[20]));
|
|
|
+ material.setActivation(ConverterUtils.getAsInteger(strings[21]));
|
|
|
+ material.setSubmit(ConverterUtils.getAsInteger(strings[22]));
|
|
|
+ material.setStatDate(strings[23]);
|
|
|
+ // 24
|
|
|
+ material.setPhotoClick(ConverterUtils.getAsLong(strings[25]));
|
|
|
+ material.setPhotoClickRatio(ConverterUtils.getAsDouble(strings[26]));
|
|
|
+ material.setActionRatio(ConverterUtils.getAsDouble(strings[27]));
|
|
|
+ material.setImpression1kCost(ConverterUtils.getAsBigDecimal(strings[28]));
|
|
|
+ material.setPhotoClickCost(ConverterUtils.getAsBigDecimal(strings[29]));
|
|
|
+ // material.setClick1(ConverterUtils.getAsBigDecimal(strings[30]));
|
|
|
+ material.setActionCost(ConverterUtils.getAsBigDecimal(strings[31]));
|
|
|
+ material.setEventPayFirstDay(ConverterUtils.getAsInteger(strings[32]));
|
|
|
+ material.setEventPayPurchaseAmountFirstDay(ConverterUtils.getAsBigDecimal(strings[33]));
|
|
|
+ material.setEventPayFirstDayRoi(ConverterUtils.getAsDouble(strings[34]));
|
|
|
+ material.setEventPay(ConverterUtils.getAsInteger(strings[35]));
|
|
|
+ material.setEventPayPurchaseAmount(ConverterUtils.getAsBigDecimal(strings[36]));
|
|
|
+ material.setEventPayRoi(ConverterUtils.getAsDouble(strings[37]));
|
|
|
+ material.setEventRegister(ConverterUtils.getAsInteger(strings[38]));
|
|
|
+ material.setEventRegisterCost(ConverterUtils.getAsBigDecimal(strings[39]));
|
|
|
+ material.setEventRegisterRatio(ConverterUtils.getAsDouble(strings[40]));
|
|
|
+ material.setEventJinJianApp(ConverterUtils.getAsInteger(strings[41]));
|
|
|
+ material.setEventJinJianAppCost(ConverterUtils.getAsBigDecimal(strings[42]));
|
|
|
+ material.setEventCreditGrantApp(ConverterUtils.getAsInteger(strings[43]));
|
|
|
+ material.setEventCreditGrantAppCost(ConverterUtils.getAsBigDecimal(strings[44]));
|
|
|
+ material.setEventCreditGrantAppRatio(ConverterUtils.getAsDouble(strings[45]));
|
|
|
+ material.setEventOrderPaid(ConverterUtils.getAsInteger(strings[46]));
|
|
|
+ material.setEventOrderPaidPurchaseAmount(ConverterUtils.getAsBigDecimal(strings[47]));
|
|
|
+ material.setEventOrderPaidCost(ConverterUtils.getAsBigDecimal(strings[48]));
|
|
|
+ material.setFormCount(ConverterUtils.getAsInteger(strings[49]));
|
|
|
+ material.setFormCost(ConverterUtils.getAsBigDecimal(strings[50]));
|
|
|
+ material.setFormActionRatio(ConverterUtils.getAsDouble(strings[51]));
|
|
|
+ material.setEventJinJianLandingPage(ConverterUtils.getAsInteger(strings[52]));
|
|
|
+ material.setEventJinJianLandingPageCost(ConverterUtils.getAsBigDecimal(strings[53]));
|
|
|
+ material.setEventCreditGrantLandingPage(ConverterUtils.getAsInteger(strings[54]));
|
|
|
+ material.setEventCreditGrantLandingPageCost(ConverterUtils.getAsBigDecimal(strings[55]));
|
|
|
+ material.setEventCreditGrantLandingRatio(ConverterUtils.getAsDouble(strings[56]));
|
|
|
+ material.setEventNextDayStayCost(ConverterUtils.getAsBigDecimal(strings[57]));
|
|
|
+ material.setEventNextDayStayRatio(ConverterUtils.getAsInteger(strings[58]));
|
|
|
+ material.setEventNextDayStay(ConverterUtils.getAsInteger(strings[59]));
|
|
|
+ material.setPlay3sRatio(ConverterUtils.getAsDouble(strings[60]));
|
|
|
+ materialList.add(material);
|
|
|
+ }
|
|
|
+ if (!Check.isNull(materialList)) {
|
|
|
+ List<KuaiShouReportDailyMaterial> videoInfoByList = reportDailyMaterialService.getVideoInfoByList(materialList, photoIdList);
|
|
|
+ dailyMaterialMapper.batchReplace(videoInfoByList);
|
|
|
|
|
|
+ }
|
|
|
|
|
|
- } else if (task.getViewType() == 5) {
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|
|
@@ -364,14 +446,13 @@ public class KuaiShouHistoryReportTaskServiceImpl extends ServiceImpl<KuaiShouHi
|
|
|
private ArrayList<String[]> getReportList(String localPath) throws IOException {
|
|
|
ArrayList<String[]> csvFileList = new ArrayList<String[]>();
|
|
|
// 定义一个CSV路径
|
|
|
-
|
|
|
// 创建CSV读对象 例如:CsvReader(文件路径,分隔符,编码格式);
|
|
|
CsvReader reader = new CsvReader(localPath, ',', Charset.forName("UTF-8"));
|
|
|
// 跳过表头 如果需要表头的话,这句可以忽略
|
|
|
reader.readHeaders();
|
|
|
// 逐行读入除表头的数据
|
|
|
while (reader.readRecord()) {
|
|
|
- System.out.println(reader.getRawRecord());
|
|
|
+ // System.out.println(reader.getRawRecord());
|
|
|
csvFileList.add(reader.getValues());
|
|
|
}
|
|
|
reader.close();
|
|
@@ -387,10 +468,11 @@ public class KuaiShouHistoryReportTaskServiceImpl extends ServiceImpl<KuaiShouHi
|
|
|
|
|
|
historyTypeList = new ArrayList<>();
|
|
|
historyTypeList.add(1);
|
|
|
+ historyTypeList.add(5);
|
|
|
/* historyTypeList.add(2);
|
|
|
historyTypeList.add(3);*/
|
|
|
// historyTypeList.add(4);
|
|
|
- // historyTypeList.add(5);
|
|
|
+ //
|
|
|
// historyTypeList.add(7);
|
|
|
// historyTypeList.add(10);
|
|
|
|