| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.yeshi.buwan.job.video.VideoUpdateJob; |
| | | import com.yeshi.buwan.util.TimeUtil; |
| | | import org.hibernate.HibernateException; |
| | | import org.hibernate.Session; |
| | | import org.junit.Test; |
| | |
| | | @Resource |
| | | public ClearService clearService; |
| | | |
| | | @Test |
| | | public void main() { |
| | | // ClearService clearService = BeanUtil.getBean(ClearService.class); |
| | | // for (int i = 0; i < 1000; i++) { |
| | | // clearService.clearDependVideo(); |
| | | // } |
| | | @Resource |
| | | private VideoUpdateJob videoUpdateJob; |
| | | |
| | | for (int i = 0; i < 300; i++) { |
| | | long[] typeIds = new long[]{299, 242, 216, 249, 290, 219}; |
| | | for (long id : typeIds) { |
| | | clearService.clearVideos(new long[]{id}, "2021-02-01"); |
| | | } |
| | | } |
| | | // } |
| | | @Test |
| | | public void main() throws Exception { |
| | | videoUpdateJob.deleteOutOfDateVideo(null); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | @Test |
| | | public void clearDepend(){ |
| | | public void clearDepend() { |
| | | clearService.clearDependVideo(); |
| | | } |
| | | |