|
|
@@ -386,8 +386,15 @@ public class ContentPlatformDemandVideoJob {
|
|
|
}
|
|
|
log.info("cleanContentPlatformDemandVideoJob start, cutoffDt={}", cutoffDt);
|
|
|
try {
|
|
|
- int rows = demandVideoMapperExt.deleteByDtLessThan(cutoffDt);
|
|
|
- log.info("cleanContentPlatformDemandVideoJob success, cutoffDt={}, deletedRows={}", cutoffDt, rows);
|
|
|
+ List<String> dts = demandVideoMapperExt.selectDistinctDtsLessThan(cutoffDt);
|
|
|
+ log.info("cleanContentPlatformDemandVideoJob found {} dts less than {}", dts.size(), cutoffDt);
|
|
|
+ int totalDeleted = 0;
|
|
|
+ for (String dt : dts) {
|
|
|
+ int rows = demandVideoMapperExt.deleteByDt(dt);
|
|
|
+ totalDeleted += rows;
|
|
|
+ log.info("cleanContentPlatformDemandVideoJob deleted dt={}, rows={}", dt, rows);
|
|
|
+ }
|
|
|
+ log.info("cleanContentPlatformDemandVideoJob success, cutoffDt={}, totalDeletedRows={}", cutoffDt, totalDeleted);
|
|
|
} catch (Exception e) {
|
|
|
log.error("cleanContentPlatformDemandVideoJob error, cutoffDt={}", cutoffDt, e);
|
|
|
return ReturnT.FAIL;
|