|
@@ -144,33 +144,30 @@ public class AutoReplyVideoDataJob {
|
|
|
CgiReplyBucketDataExample example = new CgiReplyBucketDataExample();
|
|
|
example.createCriteria().andMiniVideoIdEqualTo(videoId).andIsDeleteEqualTo(0);
|
|
|
List<CgiReplyBucketData> cgiReplyBucketDataList = cgiReplyBucketDataMapper.selectByExample(example);
|
|
|
- List<String> ghIds = new ArrayList<>();
|
|
|
- List<String> manualGhIds = new ArrayList<>();
|
|
|
+// List<String> ghIds = new ArrayList<>();
|
|
|
+// List<String> manualGhIds = new ArrayList<>();
|
|
|
for (CgiReplyBucketData cgiReplyBucketData : cgiReplyBucketDataList) {
|
|
|
String ghId = cgiReplyBucketData.getGhId();
|
|
|
+ GhDetailExample ghDetailExample = new GhDetailExample();
|
|
|
+ ghDetailExample.createCriteria().andGhIdEqualTo(ghId).andTypeEqualTo(GhTypeEnum.THIRD_PARTY_GH.type);
|
|
|
+ List<GhDetail> ghDetails = ghDetailMapper.selectByExample(ghDetailExample);
|
|
|
+ GhDetail ghDetail = ghDetails.get(0);
|
|
|
// if (Objects.equals(cgiReplyBucketData.getStrategy(), "manual")) {
|
|
|
-// GhDetailExample ghDetailExample = new GhDetailExample();
|
|
|
-// ghDetailExample.createCriteria().andGhIdEqualTo(ghId).andTypeEqualTo(GhTypeEnum.THIRD_PARTY_GH.type);
|
|
|
-// List<GhDetail> ghDetails = ghDetailMapper.selectByExample(ghDetailExample);
|
|
|
-// if (!CollectionUtils.isEmpty(ghDetails)) {
|
|
|
-// for (GhDetail ghDetail : ghDetails) {
|
|
|
-// ghDetail.setStrategyStatus(StrategyStatusEnum.STRATEGY.status);
|
|
|
-// ghDetailMapper.updateByPrimaryKeySelective(ghDetail);
|
|
|
-// }
|
|
|
-// }
|
|
|
+// ghDetail1.setStrategyStatus(StrategyStatusEnum.STRATEGY.status);
|
|
|
+// ghDetailMapper.updateByPrimaryKeySelective(ghDetail1);
|
|
|
// manualGhIds.add(cgiReplyBucketData.getGhId());
|
|
|
// }
|
|
|
- ghIds.add(cgiReplyBucketData.getGhId());
|
|
|
+
|
|
|
+// ghIds.add(cgiReplyBucketData.getGhId());
|
|
|
+ String msg = String.format("账号名称:%s \n 渠道id:%s \n 审核不通过的视频id:%s \n ghId:%s",
|
|
|
+ ghDetail.getGhName(), ghDetail.getChannel(), videoId, ghDetail.getGhId());
|
|
|
+ LarkRobotUtil.sendAutoReplyVideoMessage(msg);
|
|
|
if (auditGhIds.contains(ghId)) {
|
|
|
String url = REFRESH_GZH_URL + "?ghId=" + cgiReplyBucketData.getGhId();
|
|
|
String res = httpPoolClient.get(url);
|
|
|
log.info("refresh ghId={}, res={}", cgiReplyBucketData.getGhId(), res);
|
|
|
}
|
|
|
}
|
|
|
- String msg = String.format("审核不通过的视频id:%s \n 配置了该视频的ghId列表:%s \n 保底视频更新为策略视频的ghId列表:%s",
|
|
|
- videoId, ghIds, manualGhIds);
|
|
|
- System.out.println(msg);
|
|
|
- LarkRobotUtil.sendAutoReplyVideoMessage(msg);
|
|
|
}
|
|
|
|
|
|
return ReturnT.SUCCESS;
|