|
@@ -15,6 +15,7 @@ import com.tzld.piaoquan.growth.common.model.po.CgiReplyBucketData;
|
|
import com.tzld.piaoquan.growth.common.model.po.CgiReplyBucketDataExample;
|
|
import com.tzld.piaoquan.growth.common.model.po.CgiReplyBucketDataExample;
|
|
import com.tzld.piaoquan.growth.common.model.po.GhDetail;
|
|
import com.tzld.piaoquan.growth.common.model.po.GhDetail;
|
|
import com.tzld.piaoquan.growth.common.model.po.GhDetailExample;
|
|
import com.tzld.piaoquan.growth.common.model.po.GhDetailExample;
|
|
|
|
+import com.tzld.piaoquan.growth.common.utils.DateUtil;
|
|
import com.tzld.piaoquan.growth.common.utils.LarkRobotUtil;
|
|
import com.tzld.piaoquan.growth.common.utils.LarkRobotUtil;
|
|
import com.xxl.job.core.biz.model.ReturnT;
|
|
import com.xxl.job.core.biz.model.ReturnT;
|
|
import com.xxl.job.core.handler.annotation.XxlJob;
|
|
import com.xxl.job.core.handler.annotation.XxlJob;
|
|
@@ -25,9 +26,7 @@ import org.springframework.stereotype.Component;
|
|
import org.springframework.util.CollectionUtils;
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
-import java.util.ArrayList;
|
|
|
|
-import java.util.List;
|
|
|
|
-import java.util.Objects;
|
|
|
|
|
|
+import java.util.*;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@Slf4j
|
|
@Slf4j
|
|
@@ -107,7 +106,8 @@ public class AutoReplyVideoDataJob {
|
|
|
|
|
|
@XxlJob("validateAutoReplyVideoAuditStatusJob")
|
|
@XxlJob("validateAutoReplyVideoAuditStatusJob")
|
|
public ReturnT<String> validateAutoReplyVideoAuditStatus(String param) throws IOException {
|
|
public ReturnT<String> validateAutoReplyVideoAuditStatus(String param) throws IOException {
|
|
- List<Long> videoIds = cgiReplyBucketDataMapper.selectVideoId();
|
|
|
|
|
|
+ Long beforeDayStart = DateUtil.getBeforeDayStart(7);
|
|
|
|
+ List<Long> videoIds = cgiReplyBucketDataMapper.selectVideoId(new Date(beforeDayStart));
|
|
if (CollectionUtils.isEmpty(videoIds)) {
|
|
if (CollectionUtils.isEmpty(videoIds)) {
|
|
return ReturnT.SUCCESS;
|
|
return ReturnT.SUCCESS;
|
|
}
|
|
}
|
|
@@ -144,7 +144,8 @@ public class AutoReplyVideoDataJob {
|
|
|
|
|
|
for (Long videoId : auditFailedVideoIds) {
|
|
for (Long videoId : auditFailedVideoIds) {
|
|
CgiReplyBucketDataExample example = new CgiReplyBucketDataExample();
|
|
CgiReplyBucketDataExample example = new CgiReplyBucketDataExample();
|
|
- example.createCriteria().andMiniVideoIdEqualTo(videoId).andIsDeleteEqualTo(0);
|
|
|
|
|
|
+ example.createCriteria().andMiniVideoIdEqualTo(videoId).andIsDeleteEqualTo(0)
|
|
|
|
+ .andCreateTimeGreaterThan(new Date(beforeDayStart));
|
|
List<CgiReplyBucketData> cgiReplyBucketDataList = cgiReplyBucketDataMapper.selectByExample(example);
|
|
List<CgiReplyBucketData> cgiReplyBucketDataList = cgiReplyBucketDataMapper.selectByExample(example);
|
|
// List<String> ghIds = new ArrayList<>();
|
|
// List<String> ghIds = new ArrayList<>();
|
|
// List<String> manualGhIds = new ArrayList<>();
|
|
// List<String> manualGhIds = new ArrayList<>();
|
|
@@ -183,6 +184,16 @@ public class AutoReplyVideoDataJob {
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ Map<String, JSONObject> collect = rows.stream()
|
|
|
|
+ .collect(Collectors.toMap(
|
|
|
|
+ row -> row.getString("ghId") + "-" + row.getString("video"),
|
|
|
|
+ row -> row,
|
|
|
|
+ (existing, replacement) -> existing
|
|
|
|
+ ));
|
|
|
|
+ rows = new ArrayList<>(collect.values());
|
|
|
|
+
|
|
|
|
+
|
|
FeishuTableDTO tableDTO = FeishuTableDTO.createTable("自动回复视频审核失败报警", columns, rows, false);
|
|
FeishuTableDTO tableDTO = FeishuTableDTO.createTable("自动回复视频审核失败报警", columns, rows, false);
|
|
JSONObject content = JSONObject.parseObject(JSONObject.toJSONString(tableDTO));
|
|
JSONObject content = JSONObject.parseObject(JSONObject.toJSONString(tableDTO));
|
|
JSONObject bodyParam = new JSONObject();
|
|
JSONObject bodyParam = new JSONObject();
|