| | |
| | | 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 |
| | |
| | | |
| | | // https://xshlivelesson.oss-accelerate.aliyuncs.com/sczf/2025-02-28%2015%3A53%3A293732..JPG?Expires=2686809213&OSSAccessKeyId=LTAIDlTWjHW0IVyW&Signature=Q5WO2kQcWRpq0SQiYjBCo6rGyJE%3D" |
| | | |
| | | ossService.deleteImages("https://xshlivelesson.oss-cn-shenzhen.aliyuncs.com/sczf/2025022845414037.JPG?Expires=2686811218&OSSAccessKeyId=LTAIDlTWjHW0IVyW&Signature=5SQ7PInLkbd62zJ1aurljeO0c%2Bw%3D"); |
| | | |
| | | // 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"; |
| | |
| | | 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) { |
| | | try { |
| | | ossService.deleteImages(url); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | // String picData = baseCaseVO.getPicData(); |
| | | // String[] urls = picData.split(","); |
| | | // for (String url : urls) { |
| | | // ossService.deleteImages(url); |
| | | // |
| | | // } |
| | | baseCaseService.removeById(baseCaseVO.getBaseId()); |
| | | violationsService.removeById(baseCaseVO.getBaseId()); |
| | | imageService.removeById(baseCaseVO.getImageId()); |
| | | }); |
| | | } else { |
| | | break; |