|
@@ -30,6 +30,8 @@ import java.util.ArrayList;
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
+import java.util.concurrent.ExecutorService;
|
|
|
|
+import java.util.concurrent.Executors;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 快手历史数据任务记录
|
|
* 快手历史数据任务记录
|
|
@@ -274,7 +276,7 @@ public class KuaiShouHistoryReportTaskServiceImpl extends ServiceImpl<KuaiShouHi
|
|
historyTypeList.add(2);
|
|
historyTypeList.add(2);
|
|
historyTypeList.add(3);
|
|
historyTypeList.add(3);
|
|
historyTypeList.add(4);
|
|
historyTypeList.add(4);
|
|
- /* historyTypeList.add(5);*/
|
|
|
|
|
|
+ /* historyTypeList.add(5);*/
|
|
historyTypeList.add(10);
|
|
historyTypeList.add(10);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -283,8 +285,53 @@ public class KuaiShouHistoryReportTaskServiceImpl extends ServiceImpl<KuaiShouHi
|
|
dailyTypeList.add(2);
|
|
dailyTypeList.add(2);
|
|
dailyTypeList.add(3);
|
|
dailyTypeList.add(3);
|
|
dailyTypeList.add(4);
|
|
dailyTypeList.add(4);
|
|
- /* dailyTypeList.add(5);*/
|
|
|
|
|
|
+ /* dailyTypeList.add(5);*/
|
|
dailyTypeList.add(10);
|
|
dailyTypeList.add(10);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+ static ExecutorService executorService = Executors.newFixedThreadPool(30);
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private ICtopOauthTokenService oauthTokenService;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void getMd5() {
|
|
|
|
+
|
|
|
|
+ QueryWrapper<CtopOauthToken> queryWrapper = new QueryWrapper<>();
|
|
|
|
+ queryWrapper.eq("media_id", 2);
|
|
|
|
+ List<CtopOauthToken> list = oauthTokenService.list(queryWrapper);
|
|
|
|
+ for (CtopOauthToken token : list) {
|
|
|
|
+ List<KuaiShouReportDailyMaterialVo> photoList = kuaishouReportDailyMaterialMapper.getPhotoList(token.getAccountId(), null);
|
|
|
|
+ if (!Check.isNull(photoList)) {
|
|
|
|
+ for (KuaiShouReportDailyMaterialVo materialVo : photoList) {
|
|
|
|
+ executorService.submit(new Runnable() {
|
|
|
|
+ @Override
|
|
|
|
+ public void run() {
|
|
|
|
+ // Long id = materialVo.getId();
|
|
|
|
+ Long photoId = materialVo.getPhotoId();
|
|
|
|
+ VideoGetvo videoGetvo = kuaishouReportDailyMaterialMapper.getVideoGetByPhotoId(photoId);
|
|
|
|
+ if (!Check.isNull(videoGetvo)) {
|
|
|
|
+ QueryWrapper<KuaiShouReportDailyMaterial> updateQueryWrapper = new QueryWrapper<>();
|
|
|
|
+ updateQueryWrapper.eq("photo_id", photoId);
|
|
|
|
+ KuaiShouReportDailyMaterial material = new KuaiShouReportDailyMaterial();
|
|
|
|
+ material.setSignature(videoGetvo.getSignature());
|
|
|
|
+ material.setChannelType(videoGetvo.getChannelType());
|
|
|
|
+ kuaishouReportDailyMaterialMapper.update(material, updateQueryWrapper);
|
|
|
|
+ log.info("修改成功:photoId:{},accountId", photoId, token.getAccountId());
|
|
|
|
+ // kuaishouReportDailyMaterialMapper.updateById(material);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|