|
@@ -16,6 +16,7 @@ import com.tzld.longarticle.recommend.server.mapper.growth.NewPushMessageCallbac
|
|
|
import com.tzld.longarticle.recommend.server.mapper.longArticle.LongArticleBaseMapper;
|
|
|
import com.tzld.longarticle.recommend.server.model.dto.AccountTypeFansDTO;
|
|
|
import com.tzld.longarticle.recommend.server.model.dto.NotPublishPlan;
|
|
|
+import com.tzld.longarticle.recommend.server.model.dto.PublishPlanAccountNotifyDTO;
|
|
|
import com.tzld.longarticle.recommend.server.model.entity.aigc.PublishAccount;
|
|
|
import com.tzld.longarticle.recommend.server.model.entity.crawler.AccountAvgInfo;
|
|
|
import com.tzld.longarticle.recommend.server.model.entity.crawler.GetOffVideoCrawler;
|
|
@@ -178,6 +179,30 @@ public class XxlJobService {
|
|
|
+ "<at user_id=\"all\">所有人</at> ");
|
|
|
}
|
|
|
|
|
|
+ @XxlJob("checkPublishPlanAccount")
|
|
|
+ public ReturnT<String> checkPublishPlanAccount(String param) {
|
|
|
+ List<PublishPlanAccountNotifyDTO> notifyAccounts = aigcBaseMapper.checkPublishPlanAccount();
|
|
|
+ Map<String, List<PublishPlanAccountNotifyDTO>> notifyAccountMap = notifyAccounts.stream()
|
|
|
+ .collect(Collectors.groupingBy(PublishPlanAccountNotifyDTO::getPlanId));
|
|
|
+ for (Map.Entry<String, List<PublishPlanAccountNotifyDTO>> entry : notifyAccountMap.entrySet()) {
|
|
|
+ String planId = entry.getKey();
|
|
|
+ List<PublishPlanAccountNotifyDTO> list = entry.getValue();
|
|
|
+ if (CollectionUtil.isEmpty(list)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ String planName = list.get(0).getPlanName();
|
|
|
+ List<String> accountNames = list.stream().map(PublishPlanAccountNotifyDTO::getAccountName).collect(Collectors.toList());
|
|
|
+ log.info("checkPublishPlanAccount planId: {}, planName: {}, accountNames: {}", planId, planName, JSONObject.toJSONString(accountNames));
|
|
|
+ FeishuMessageSender.sendWebHookMessage(FeishuRobotIdEnum.RECOMMEND.getRobotId(),
|
|
|
+ "发布计划开启账号未开启计划报警\n"
|
|
|
+ + "发布计划ID: " + planId + "\n"
|
|
|
+ + "发布计划名称: " + planName + "\n"
|
|
|
+ + "开关关闭账号: " + JSONObject.toJSONString(accountNames) + "\n"
|
|
|
+ + "<at user_id=\"all\">所有人</at> ");
|
|
|
+ }
|
|
|
+ return ReturnT.SUCCESS;
|
|
|
+ }
|
|
|
+
|
|
|
@XxlJob("migrateCrawlerRootSourceId")
|
|
|
public ReturnT<String> migrateCrawlerRootSourceId(String param) {
|
|
|
try {
|