supeng há 5 dias atrás
pai
commit
0206ad77ca

+ 1 - 47
core/src/main/java/com/tzld/supply/job/ContentScreenJob.java

@@ -481,7 +481,7 @@ public class ContentScreenJob {
                 updateContent.setAiPrecisionStatus(SpiderContentScreenStatusEnum.ABANDONED.getCode());
                 updateContent.setAiPrecisionResult("长时间未完成,自动放弃");
                 updateContent.setUpdateTime(System.currentTimeMillis());
-                spiderContentMapper.updateByPrimaryKeySelective(content);
+                spiderContentMapper.updateByPrimaryKeySelective(updateContent);
             }
             if (Objects.isNull(content.getContent()) || content.getContent().trim().isEmpty()) {
                 continue;
@@ -504,7 +504,6 @@ public class ContentScreenJob {
                     jsonObject.put(strategyName, result);
                 }
             }
-
             if (jsonObject.isEmpty()) {
                 SpiderContent updateContent = new SpiderContent();
                 updateContent.setId(content.getId());
@@ -527,51 +526,6 @@ public class ContentScreenJob {
                 spiderContentMapper.updateByPrimaryKeySelective(updateContent);
             }
         }
-
-
-        for (SpiderContent content : contentList) {
-            Long filterTime = DateUtils.getBeforeDayStart(2);
-            if (content.getCreateTime() < filterTime) {
-                content.setStatus(SpiderContentStatusEnum.ABANDONED.getCode());
-                content.setAiPrecisionStatus(SpiderContentScreenStatusEnum.ABANDONED.getCode());
-                content.setAiPrecisionResult("长时间未完成,自动放弃");
-                content.setUpdateTime(System.currentTimeMillis());
-                spiderContentMapper.updateByPrimaryKeySelective(content);
-            }
-            String prompt = precisionScreenPrompt.replace("{{title}}", content.getTitle())
-                    .replace("{{content}}", content.getContent());
-            DeepSeekResult result = deepSeekApiService.requestOfficialApi(prompt, null, null, true);
-
-            PrecisionScreenEntity obj = null;
-            if (result.isSuccess()) {
-                try {
-                    obj = JSONObject.parseObject(result.getResponse().getChoices().get(0).getMessage().getContent(), PrecisionScreenEntity.class);
-                } catch (Exception e) {
-                    log.error(result.getResponse().getChoices().get(0).getMessage().getContent());
-                }
-                if (Objects.nonNull(obj)) {
-                    Integer aiPrecisionStatus = checkPrecisionScreenStatus(obj);
-                    content.setAiPrecisionStatus(aiPrecisionStatus);
-                    content.setAiPrecisionResult(JSONObject.toJSONString(obj));
-                    if (CollectionUtil.isNotEmpty(obj.getKeywords())) {
-                        content.setKeyword(JSONObject.toJSONString(obj.getKeywords()));
-                    }
-                    if (aiPrecisionStatus == SpiderContentScreenStatusEnum.PASSED.getCode()) {
-                        content.setStatus(SpiderContentStatusEnum.PASSED.getCode());
-                    } else {
-                        content.setStatus(SpiderContentStatusEnum.ABANDONED.getCode());
-                    }
-                    content.setUpdateTime(System.currentTimeMillis());
-                    spiderContentMapper.updateByPrimaryKeySelective(content);
-                }
-            } else {
-                content.setStatus(SpiderContentStatusEnum.ABANDONED.getCode());
-                content.setAiPrecisionStatus(SpiderContentScreenStatusEnum.ABANDONED.getCode());
-                content.setAiPrecisionResult(JSONObject.toJSONString(result));
-                content.setUpdateTime(System.currentTimeMillis());
-                spiderContentMapper.updateByPrimaryKeySelective(content);
-            }
-        }
         return ReturnT.SUCCESS;
     }