| | |
| | | import com.ycl.service.caseHandler.IBaseCaseService; |
| | | import com.ycl.service.caseHandler.IViolationsService; |
| | | import com.ycl.service.oss.OssService; |
| | | import com.ycl.service.resources.IImageResourcesService; |
| | | import com.ycl.utils.ConstantPropertiesUtils; |
| | | import com.ycl.vo.casePool.BaseCaseVO; |
| | | import net.coobird.thumbnailator.Thumbnails; |
| | |
| | | @Autowired |
| | | private IViolationsService violationsService; |
| | | |
| | | @Autowired |
| | | private IImageResourcesService imageService; |
| | | @Resource |
| | | private UnlawfulMapper unlawfuldao; |
| | | @Autowired |
| | |
| | | |
| | | // ossService.deleteImages("https://xshlivelesson.oss-cn-shenzhen.aliyuncs.com/sczf/2025022845414037.JPG?Expires=2686811218&OSSAccessKeyId=LTAIDlTWjHW0IVyW&Signature=5SQ7PInLkbd62zJ1aurljeO0c%2Bw%3D"); |
| | | // |
| | | // int i = 1; |
| | | // while (true) { |
| | | // String beginTime = "2025-01-01 00:00:00"; |
| | | // String endTime = LocalDateTime.now().plusDays(-4).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); |
| | | // Page<BaseCaseVO> page = baseCaseService.selectVideoInspection(i, 10, null, null, beginTime, endTime, null); |
| | | // if (page.getRecords().size() > 0) { |
| | | // page.getRecords().forEach(baseCaseVO -> { |
| | | int i = 1; |
| | | while (true) { |
| | | String beginTime = "2025-01-01 00:00:00"; |
| | | String endTime = LocalDateTime.now().plusDays(-4).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); |
| | | Page<BaseCaseVO> page = baseCaseService.selectVideoInspection(i, 10, null, null, beginTime, endTime, null); |
| | | if (page.getRecords().size() > 0) { |
| | | page.getRecords().forEach(baseCaseVO -> { |
| | | // String picData = baseCaseVO.getPicData(); |
| | | // String[] urls = picData.split(","); |
| | | // for (String url : urls) { |
| | | // ossService.deleteImages(url); |
| | | // |
| | | // } |
| | | // baseCaseService.removeById(baseCaseVO.getBaseId()); |
| | | // violationsService.removeById(baseCaseVO.getBaseId()); |
| | | // }); |
| | | // } else { |
| | | // break; |
| | | // } |
| | | // i++; |
| | | // } |
| | | baseCaseService.removeById(baseCaseVO.getBaseId()); |
| | | violationsService.removeById(baseCaseVO.getBaseId()); |
| | | imageService.removeById(baseCaseVO.getImageId()); |
| | | }); |
| | | } else { |
| | | break; |
| | | } |
| | | i++; |
| | | } |
| | | } |
| | | |
| | | |