|
@@ -366,7 +366,7 @@ public class ArticleAuditService {
|
|
List<String> reMatchTraceIds = traceIds.stream().filter(o -> !deleteTraceIds.contains(o)).collect(Collectors.toList());
|
|
List<String> reMatchTraceIds = traceIds.stream().filter(o -> !deleteTraceIds.contains(o)).collect(Collectors.toList());
|
|
buildReMatchRecord(reMatchTraceIds, response.getVideoOSS(), matchVideoMap);
|
|
buildReMatchRecord(reMatchTraceIds, response.getVideoOSS(), matchVideoMap);
|
|
// 文章删除
|
|
// 文章删除
|
|
- buildArticleAuditDelete(publishContentIds);
|
|
|
|
|
|
+ buildArticleAuditDelete(publishContentIds, "手动根据videoId删除");
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -403,7 +403,7 @@ public class ArticleAuditService {
|
|
longArticleBaseMapper.batchInsertArticleReMatchRecord(reMatchRecordList);
|
|
longArticleBaseMapper.batchInsertArticleReMatchRecord(reMatchRecordList);
|
|
}
|
|
}
|
|
|
|
|
|
- public void buildArticleAuditDelete(List<String> publishContentIds) {
|
|
|
|
|
|
+ public void buildArticleAuditDelete(List<String> publishContentIds, String deleteReason) {
|
|
if (CollectionUtils.isEmpty(publishContentIds)) {
|
|
if (CollectionUtils.isEmpty(publishContentIds)) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -447,12 +447,12 @@ public class ArticleAuditService {
|
|
try {
|
|
try {
|
|
String pushId = publishPushIdMap.get(publishContentId);
|
|
String pushId = publishPushIdMap.get(publishContentId);
|
|
if (!StringUtils.hasText(pushId)) {
|
|
if (!StringUtils.hasText(pushId)) {
|
|
- deleteFailAlarmAdd(alarmList, publishContentId, "无推送记录", 0);
|
|
|
|
|
|
+ deleteFailAlarmAdd(alarmList, publishContentId, "无推送记录", 0, deleteReason);
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
PublishGzhPushDTO publishGzhPushDTO = pushDTOMap.get(pushId);
|
|
PublishGzhPushDTO publishGzhPushDTO = pushDTOMap.get(pushId);
|
|
if (Objects.isNull(publishGzhPushDTO)) {
|
|
if (Objects.isNull(publishGzhPushDTO)) {
|
|
- deleteFailAlarmAdd(alarmList, publishContentId, "无推送记录", 0);
|
|
|
|
|
|
+ deleteFailAlarmAdd(alarmList, publishContentId, "无推送记录", 0, deleteReason);
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
String publishAccountId = pushAccountMap.get(pushId);
|
|
String publishAccountId = pushAccountMap.get(pushId);
|
|
@@ -468,12 +468,12 @@ public class ArticleAuditService {
|
|
}
|
|
}
|
|
if (!publishGzhPushDTO.getPushType().equals(PushTypeEnum.AUTO_GROUP_PUBLISH.getVal())) {
|
|
if (!publishGzhPushDTO.getPushType().equals(PushTypeEnum.AUTO_GROUP_PUBLISH.getVal())) {
|
|
PushTypeEnum pushTypeEnum = PushTypeEnum.from(publishGzhPushDTO.getPushType());
|
|
PushTypeEnum pushTypeEnum = PushTypeEnum.from(publishGzhPushDTO.getPushType());
|
|
- deleteFailAlarmAdd(alarmList, publishContentId, "推送类型为" + pushTypeEnum.getDescription(), index);
|
|
|
|
|
|
+ deleteFailAlarmAdd(alarmList, publishContentId, "推送类型为" + pushTypeEnum.getDescription(), index, deleteReason);
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
String groupPushMsgId = pushIdMap.get(pushId);
|
|
String groupPushMsgId = pushIdMap.get(pushId);
|
|
if (!StringUtils.hasText(groupPushMsgId)) {
|
|
if (!StringUtils.hasText(groupPushMsgId)) {
|
|
- deleteFailAlarmAdd(alarmList, publishContentId, "无推送MsgId", index);
|
|
|
|
|
|
+ deleteFailAlarmAdd(alarmList, publishContentId, "无推送MsgId", index, deleteReason);
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
LongArticleAuditDelete delete = new LongArticleAuditDelete();
|
|
LongArticleAuditDelete delete = new LongArticleAuditDelete();
|
|
@@ -484,6 +484,7 @@ public class ArticleAuditService {
|
|
delete.setPublishContentId(publishContentId);
|
|
delete.setPublishContentId(publishContentId);
|
|
delete.setIndex(index);
|
|
delete.setIndex(index);
|
|
delete.setStatus(StatusEnum.ZERO.getCode());
|
|
delete.setStatus(StatusEnum.ZERO.getCode());
|
|
|
|
+ delete.setDeleteReason(deleteReason);
|
|
delete.setCreateTimestamp(System.currentTimeMillis());
|
|
delete.setCreateTimestamp(System.currentTimeMillis());
|
|
longArticleAuditDeleteRepository.save(delete);
|
|
longArticleAuditDeleteRepository.save(delete);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
@@ -493,11 +494,12 @@ public class ArticleAuditService {
|
|
deleteFailAlarm(alarmList, accountTypeMap);
|
|
deleteFailAlarm(alarmList, accountTypeMap);
|
|
}
|
|
}
|
|
|
|
|
|
- private void deleteFailAlarmAdd(List<JSONObject> alarmList, String publishContentId, String errMsg, Integer index) {
|
|
|
|
|
|
+ private void deleteFailAlarmAdd(List<JSONObject> alarmList, String publishContentId, String errMsg, Integer index, String deleteReason) {
|
|
JSONObject alarm = new JSONObject();
|
|
JSONObject alarm = new JSONObject();
|
|
alarm.put("publishContentId", publishContentId);
|
|
alarm.put("publishContentId", publishContentId);
|
|
alarm.put("errMsg", errMsg);
|
|
alarm.put("errMsg", errMsg);
|
|
alarm.put("index", index);
|
|
alarm.put("index", index);
|
|
|
|
+ alarm.put("deleteReason", deleteReason);
|
|
alarmList.add(alarm);
|
|
alarmList.add(alarm);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -590,7 +592,7 @@ public class ArticleAuditService {
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
msgIdList.forEach(delete -> {
|
|
msgIdList.forEach(delete -> {
|
|
- deleteFailAlarmAdd(alarmList, delete.getPublishContentId(), "非自动群发", delete.getIndex());
|
|
|
|
|
|
+ deleteFailAlarmAdd(alarmList, delete.getPublishContentId(), "非自动群发", delete.getIndex(), delete.getDeleteReason());
|
|
delete.setStatus(ArticleDeleteStatusEnum.SUCCESS.getCode());
|
|
delete.setStatus(ArticleDeleteStatusEnum.SUCCESS.getCode());
|
|
delete.setFinishTimestamp(System.currentTimeMillis());
|
|
delete.setFinishTimestamp(System.currentTimeMillis());
|
|
longArticleAuditDeleteRepository.save(delete);
|
|
longArticleAuditDeleteRepository.save(delete);
|
|
@@ -645,6 +647,7 @@ public class ArticleAuditService {
|
|
row.put("index", String.valueOf(alarm.getInteger("index")));
|
|
row.put("index", String.valueOf(alarm.getInteger("index")));
|
|
row.put("title", publishContent.getTitle());
|
|
row.put("title", publishContent.getTitle());
|
|
row.put("err_msg", alarm.getString("errMsg"));
|
|
row.put("err_msg", alarm.getString("errMsg"));
|
|
|
|
+ row.put("delete_reason", alarm.getString("deleteReason"));
|
|
rows.add(row);
|
|
rows.add(row);
|
|
}
|
|
}
|
|
FeishuTableDTO tableDTO = FeishuTableDTO.createTable("文章删除失败", columns, rows, false);
|
|
FeishuTableDTO tableDTO = FeishuTableDTO.createTable("文章删除失败", columns, rows, false);
|
|
@@ -679,6 +682,9 @@ public class ArticleAuditService {
|
|
FeishuTableDTO.Column errMsgColumn = FeishuTableDTO.createFeishuColumns(
|
|
FeishuTableDTO.Column errMsgColumn = FeishuTableDTO.createFeishuColumns(
|
|
FieshuTableColumnDataTypeEnum.TEXT.getType(), "err_msg", "原因", null);
|
|
FieshuTableColumnDataTypeEnum.TEXT.getType(), "err_msg", "原因", null);
|
|
columns.add(errMsgColumn);
|
|
columns.add(errMsgColumn);
|
|
|
|
+ FeishuTableDTO.Column deleteReasonColumn = FeishuTableDTO.createFeishuColumns(
|
|
|
|
+ FieshuTableColumnDataTypeEnum.TEXT.getType(), "delete_reason", "删除原因", null);
|
|
|
|
+ columns.add(deleteReasonColumn);
|
|
return columns;
|
|
return columns;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -716,7 +722,7 @@ public class ArticleAuditService {
|
|
|
|
|
|
// 根据已发布文章查找推送id 并删除
|
|
// 根据已发布文章查找推送id 并删除
|
|
List<String> publishContentIds = publishContents.stream().map(PublishContentDTO::getId).collect(Collectors.toList());
|
|
List<String> publishContentIds = publishContents.stream().map(PublishContentDTO::getId).collect(Collectors.toList());
|
|
- buildArticleAuditDelete(publishContentIds);
|
|
|
|
|
|
+ buildArticleAuditDelete(publishContentIds, param.getDeleteFlag() == 1 ? "html手动删除" : "违规检查删除");
|
|
buildArticleUnsafeTitle(param.getGhId(), titleMd5, param.getTitle());
|
|
buildArticleUnsafeTitle(param.getGhId(), titleMd5, param.getTitle());
|
|
}
|
|
}
|
|
|
|
|
|
@@ -837,7 +843,7 @@ public class ArticleAuditService {
|
|
List<String> existsIds = exists.stream().map(LongArticleAuditDelete::getPublishContentId).collect(Collectors.toList());
|
|
List<String> existsIds = exists.stream().map(LongArticleAuditDelete::getPublishContentId).collect(Collectors.toList());
|
|
publishContentIds.removeAll(existsIds);
|
|
publishContentIds.removeAll(existsIds);
|
|
if (CollectionUtils.isNotEmpty(publishContentIds)) {
|
|
if (CollectionUtils.isNotEmpty(publishContentIds)) {
|
|
- buildArticleAuditDelete(publishContentIds);
|
|
|
|
|
|
+ buildArticleAuditDelete(publishContentIds, "单小程序文章定期删除");
|
|
}
|
|
}
|
|
pageNum++;
|
|
pageNum++;
|
|
}
|
|
}
|