wangyunpeng 1 maand geleden
bovenliggende
commit
5d82ee0833

+ 93 - 0
core/src/main/java/com/tzld/supply/api/DeepSeekApiService.java

@@ -0,0 +1,93 @@
+package com.tzld.supply.api;
+
+import cn.hutool.core.collection.CollectionUtil;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.tzld.supply.model.entity.DeepSeekOfficialApiResponse;
+import com.tzld.supply.model.entity.DeepSeekResult;
+import com.tzld.supply.util.MapBuilder;
+import lombok.extern.slf4j.Slf4j;
+import okhttp3.*;
+import org.apache.http.util.TextUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.PostConstruct;
+import java.util.Map;
+import java.util.Optional;
+import java.util.concurrent.TimeUnit;
+
+@Service
+@Slf4j
+public class DeepSeekApiService {
+
+    private OkHttpClient client;
+
+    @PostConstruct
+    public void init() {
+        client = new OkHttpClient().newBuilder()
+                .connectTimeout(5, TimeUnit.MINUTES)
+                .readTimeout(5, TimeUnit.MINUTES)
+                .writeTimeout(5, TimeUnit.MINUTES)
+                .build();
+    }
+
+    public DeepSeekResult requestOfficialApi(String prompt, String model, Double temperature, Boolean isJSON) {
+        DeepSeekResult result = new DeepSeekResult();
+        result.setSuccess(false);
+        if (TextUtils.isBlank(prompt) || TextUtils.isBlank(prompt.trim())) {
+            result.setFailReason("prompt is empty");
+            return result;
+        }
+
+        try {
+            JSONArray jsonArray = new JSONArray();
+            JSONObject message = new JSONObject();
+            message.put("role", "user");
+            message.put("content", prompt);
+            jsonArray.add(message);
+
+            Map<Object, Object> bodyParam = MapBuilder
+                    .builder()
+                    .put("model", Optional.ofNullable(model).orElse("deepseek-chat"))
+                    .put("temperature", Optional.ofNullable(temperature).orElse(0.3))
+                    .put("messages", jsonArray)
+                    .build();
+            if (isJSON) {
+                JSONObject formatJSON = new JSONObject();
+                formatJSON.put("type", "json_object");
+                bodyParam.put("response_format", formatJSON);
+            }
+
+            MediaType mediaType = MediaType.parse("application/json");
+            RequestBody body = RequestBody.create(mediaType, JSONObject.toJSONString(bodyParam));
+            Request request = new Request.Builder()
+                    .url("https://api.deepseek.com/chat/completions")
+                    .method("POST", body)
+                    .addHeader("Content-Type", "application/json")
+                    .addHeader("Accept", "application/json")
+                    .addHeader("Authorization", "Bearer sk-717db6bbb4924f92b3b4da6fd2312d55")
+                    .build();
+            Response response = client.newCall(request).execute();
+
+            String responseContent = response.body().string();
+            result.setResponseStr(responseContent);
+            log.info("deepseek api responseContent = {}", responseContent);
+            if (response.isSuccessful()) {
+                DeepSeekOfficialApiResponse obj = JSONObject.parseObject(responseContent, DeepSeekOfficialApiResponse.class);
+                if (CollectionUtil.isNotEmpty(obj.getChoices())) {
+                    result.setSuccess(true);
+                    result.setResponse(obj);
+                } else {
+                    result.setFailReason("response empty");
+                }
+            } else {
+                JSONObject json = JSONObject.parseObject(responseContent);
+                result.setFailReason("request error code:" + response.code() + " message:" + json.getString("error"));
+            }
+        } catch (Exception e) {
+            log.error("deepseek official api fail: " + e.getMessage());
+            result.setFailReason(e.getMessage());
+        }
+        return result;
+    }
+}

+ 4 - 0
core/src/main/java/com/tzld/supply/api/SpiderApiService.java

@@ -66,4 +66,8 @@ public class SpiderApiService {
         return null;
     }
 
+    public String searchContentDetail(String title) {
+        // todo 搜索内容详情
+        return null;
+    }
 }

+ 14 - 14
core/src/main/java/com/tzld/supply/dao/mapper/supply/spider/SpiderContentMapper.java

@@ -10,7 +10,7 @@ public interface SpiderContentMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table spider_content
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     long countByExample(SpiderContentExample example);
 
@@ -18,7 +18,7 @@ public interface SpiderContentMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table spider_content
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     int deleteByExample(SpiderContentExample example);
 
@@ -26,7 +26,7 @@ public interface SpiderContentMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table spider_content
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     int deleteByPrimaryKey(Long id);
 
@@ -34,7 +34,7 @@ public interface SpiderContentMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table spider_content
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     int insert(SpiderContent record);
 
@@ -42,7 +42,7 @@ public interface SpiderContentMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table spider_content
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     int insertSelective(SpiderContent record);
 
@@ -50,7 +50,7 @@ public interface SpiderContentMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table spider_content
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     List<SpiderContent> selectByExampleWithBLOBs(SpiderContentExample example);
 
@@ -58,7 +58,7 @@ public interface SpiderContentMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table spider_content
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     List<SpiderContent> selectByExample(SpiderContentExample example);
 
@@ -66,7 +66,7 @@ public interface SpiderContentMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table spider_content
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     SpiderContent selectByPrimaryKey(Long id);
 
@@ -74,7 +74,7 @@ public interface SpiderContentMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table spider_content
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     int updateByExampleSelective(@Param("record") SpiderContent record, @Param("example") SpiderContentExample example);
 
@@ -82,7 +82,7 @@ public interface SpiderContentMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table spider_content
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     int updateByExampleWithBLOBs(@Param("record") SpiderContent record, @Param("example") SpiderContentExample example);
 
@@ -90,7 +90,7 @@ public interface SpiderContentMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table spider_content
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     int updateByExample(@Param("record") SpiderContent record, @Param("example") SpiderContentExample example);
 
@@ -98,7 +98,7 @@ public interface SpiderContentMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table spider_content
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     int updateByPrimaryKeySelective(SpiderContent record);
 
@@ -106,7 +106,7 @@ public interface SpiderContentMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table spider_content
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     int updateByPrimaryKeyWithBLOBs(SpiderContent record);
 
@@ -114,7 +114,7 @@ public interface SpiderContentMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table spider_content
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     int updateByPrimaryKey(SpiderContent record);
 }

+ 4 - 0
core/src/main/java/com/tzld/supply/dao/mapper/supply/spider/ext/SpiderMapperExt.java

@@ -7,4 +7,8 @@ import java.util.List;
 public interface SpiderMapperExt {
 
     int batchInsertSpiderContent(List<SpiderContent> contentList);
+
+    List<SpiderContent> getRoughScreenSpiderContentHasContent();
+
+    List<SpiderContent> getRoughScreenSpiderContentNoContent();
 }

+ 180 - 0
core/src/main/java/com/tzld/supply/job/ContentScreenJob.java

@@ -1,25 +1,205 @@
 package com.tzld.supply.job;
 
+import com.alibaba.fastjson.JSONObject;
+import com.tzld.supply.api.DeepSeekApiService;
+import com.tzld.supply.dao.mapper.supply.spider.SpiderContentMapper;
+import com.tzld.supply.dao.mapper.supply.spider.ext.SpiderMapperExt;
+import com.tzld.supply.model.entity.DeepSeekResult;
+import com.tzld.supply.model.entity.PrecisionScreenEntity;
+import com.tzld.supply.model.entity.RoughScreenEntity;
+import com.tzld.supply.model.po.supply.spider.SpiderContent;
+import com.tzld.supply.model.po.supply.spider.SpiderContentExample;
 import com.xxl.job.core.biz.model.ReturnT;
 import com.xxl.job.core.handler.annotation.XxlJob;
 import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
+import java.util.List;
+import java.util.Objects;
+
 @Slf4j
 @Component
 public class ContentScreenJob {
 
+    @Autowired
+    private SpiderContentMapper spiderContentMapper;
+    @Autowired
+    private SpiderMapperExt spiderMapperExt;
+    @Autowired
+    private DeepSeekApiService deepSeekApiService;
+
     @XxlJob("contentRoughScreenJob")
     public ReturnT<String> contentRoughScreenJob(String param) {
+        List<SpiderContent> contentList = getRoughScreenSpiderContent();
+        if (contentList.isEmpty()) {
+            return ReturnT.SUCCESS;
+        }
+        for (SpiderContent content : contentList) {
+            String prompt = roughScreenPrompt.replace("{{title}}", content.getTitle());
+            DeepSeekResult result = deepSeekApiService.requestOfficialApi(prompt, null, null, true);
+
+            RoughScreenEntity obj = null;
+            if (result.isSuccess()) {
+                try {
+                    obj = JSONObject.parseObject(result.getResponse().getChoices().get(0).getMessage().getContent(), RoughScreenEntity.class);
+                } catch (Exception e) {
+                    log.error(result.getResponse().getChoices().get(0).getMessage().getContent());
+                }
+            }
+            if (Objects.nonNull(obj)) {
+                Byte aiRoughStatus = checkRoughScreenStatus(obj);
+                content.setAiRoughStatus(aiRoughStatus);
+                if (aiRoughStatus == (byte) 1) {
+                    content.setStatus((byte) 1);
+                    content.setAiRoughResult(JSONObject.toJSONString(obj));
+                } else {
+                    content.setStatus((byte) 3);
+                }
+                content.setUpdateTime(System.currentTimeMillis());
+                spiderContentMapper.updateByPrimaryKeySelective(content);
+            }
+        }
 
         return ReturnT.SUCCESS;
     }
 
+    private Byte checkRoughScreenStatus(RoughScreenEntity obj) {
+        if (Objects.isNull(obj.getIsElderlySuitable()) || !obj.getIsElderlySuitable()) {
+            return (byte) 2;
+        }
+        if (Objects.nonNull(obj.getIsSensitive()) && obj.getIsSensitive()) {
+            return (byte) 2;
+        }
+        if (Objects.nonNull(obj.getIsNegative()) && obj.getIsNegative()) {
+            return (byte) 2;
+        }
+        if (Objects.nonNull(obj.getIsAdvertisement()) && obj.getIsAdvertisement()) {
+            return (byte) 2;
+        }
+        return (byte) 1;
+    }
+
+    private String roughScreenPrompt = "你是一名新闻智能审核系统的快速过滤模型,负责判断新闻标题是否适合老年群体内容推荐。\n" +
+            "\n" +
+            "【任务目标】\n" +
+            "根据输入的标题、来源,对新闻进行初步筛选。你的目标是判断内容是否:\n" +
+            "1. 涉及政治、暴力、色情、负面或争议;\n" +
+            "2. 属于广告或营销;\n" +
+            "3. 适合老年群体;\n" +
+            "4. 有一定正能量或实用性;\n" +
+            "5. 标题是否可进行正向优化(例如“更吸引但不夸大”)。\n" +
+            "\n" +
+            "【请严格按以下 JSON 结构输出,不要输出其他说明】:\n" +
+            "\n" +
+            "{\n" +
+            "  \"is_elderly_suitable\": true/false,\n" +
+            "  \"is_sensitive\": true/false,\n" +
+            "  \"is_negative\": true/false,\n" +
+            "  \"is_advertisement\": true/false,\n" +
+            "  \"can_be_exaggerated\": true/false,\n" +
+            "  \"improved_title\": \"若可改写,请给出更吸引人的标题\",\n" +
+            "  \"need_deep_analysis\": true/false,\n" +
+            "  \"reason\": \"简要说明判断依据\"\n" +
+            "}\n" +
+            "\n" +
+            "【输入内容】\n" +
+            "标题:{{title}}";
+
+    private List<SpiderContent> getRoughScreenSpiderContent() {
+        SpiderContentExample example = new SpiderContentExample();
+        example.createCriteria().andStatusEqualTo((byte) 0).andAiRoughStatusEqualTo((byte) 0);
+        return spiderContentMapper.selectByExample(example);
+    }
+
     @XxlJob("contentPrecisionScreenJob")
     public ReturnT<String> contentPrecisionScreenJob(String param) {
+        List<SpiderContent> contentList = spiderMapperExt.getRoughScreenSpiderContentHasContent();
+        if (contentList.isEmpty()) {
+            return ReturnT.SUCCESS;
+        }
+        for (SpiderContent content : contentList) {
+            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)) {
+                Byte aiPrecisionStatus = checkPrecisionScreenStatus(obj);
+                content.setAiPrecisionStatus(aiPrecisionStatus);
+                if (aiPrecisionStatus == (byte) 1
+                        && obj.getPropagationScore() > 0.8
+                        && obj.getSuitabilityScore() > 0.8) {
+                    content.setStatus((byte) 2);
+                    content.setAiPrecisionResult(JSONObject.toJSONString(obj));
+                } else {
+                    content.setStatus((byte) 3);
+                }
+                content.setUpdateTime(System.currentTimeMillis());
+                spiderContentMapper.updateByPrimaryKeySelective(content);
+            }
+        }
         return ReturnT.SUCCESS;
     }
 
+    private Byte checkPrecisionScreenStatus(PrecisionScreenEntity obj) {
+        if (Objects.isNull(obj.getIsElderlySuitable()) || !obj.getIsElderlySuitable()) {
+            return (byte) 2;
+        }
+        if (Objects.nonNull(obj.getIsSensitive()) && obj.getIsSensitive()) {
+            return (byte) 2;
+        }
+        if (Objects.nonNull(obj.getIsNegative()) && obj.getIsNegative()) {
+            return (byte) 2;
+        }
+        if (Objects.nonNull(obj.getIsAdvertisement()) && obj.getIsAdvertisement()) {
+            return (byte) 2;
+        }
+        return (byte) 1;
+    }
+
+    private String precisionScreenPrompt = "你是一名内容智能分析与编辑顾问,负责对新闻或视频进行全面分析。\n" +
+            "请根据以下内容,判断其是否适合老年群体推荐,并输出结构化结果。\n" +
+            "\n" +
+            "【分析目标】\n" +
+            "1. 判断是否适合老年人阅读;\n" +
+            "2. 判断是否包含政治、敏感、广告或负面内容;\n" +
+            "3. 判断内容主题、地域、关键词;\n" +
+            "4. 判断是否可以在不误导、不造假的前提下适度夸大或优化标题;\n" +
+            "5. 提取内容亮点与传播潜力;\n" +
+            "6. 给出传播评分和推荐评分;\n" +
+            "7. 若适合改写,请输出更吸引人的标题。\n" +
+            "\n" +
+            "【请严格按以下 JSON 格式输出】:\n" +
+            "\n" +
+            "{\n" +
+            "  \"is_elderly_suitable\": true/false,\n" +
+            "  \"is_sensitive\": true/false,\n" +
+            "  \"is_negative\": true/false,\n" +
+            "  \"is_advertisement\": true/false,\n" +
+            "  \"value_category\": \"健康/生活/历史/天气/节假日/军事/社会/其他\",\n" +
+            "  \"region\": \"北京/上海/全国/未知\",\n" +
+            "  \"hot_keywords\": [\"keyword1\", \"keyword2\", \"keyword3\"],\n" +
+            "  \"summary\": \"一句话总结新闻核心内容\",\n" +
+            "  \"highlight_potential\": true/false,\n" +
+            "  \"highlight_reason\": \"如果能增强吸引力,说明如何优化内容表达\",\n" +
+            "  \"can_be_exaggerated\": true/false,\n" +
+            "  \"exaggeration_type\": \"标题可优化/内容可强化/无可夸大点\",\n" +
+            "  \"improved_title\": \"若可改写,请给出更吸引人的标题\",\n" +
+            "  \"propagation_score\": 0.0~1.0,\n" +
+            "  \"suitability_score\": 0.0~1.0,\n" +
+            "  \"reason\": \"综合说明判断依据\"\n" +
+            "}\n" +
+            "\n" +
+            "【输入内容】\n" +
+            "标题:{{title}}\n" +
+            "正文:{{content}}";
 
 }

+ 33 - 2
core/src/main/java/com/tzld/supply/job/SpiderJob.java

@@ -1,6 +1,7 @@
 package com.tzld.supply.job;
 
 import com.tzld.supply.api.SpiderApiService;
+import com.tzld.supply.dao.mapper.supply.spider.SpiderContentMapper;
 import com.tzld.supply.dao.mapper.supply.spider.SpiderTaskMapper;
 import com.tzld.supply.dao.mapper.supply.spider.ext.SpiderMapperExt;
 import com.tzld.supply.model.entity.ContentRankResponse;
@@ -9,6 +10,7 @@ import com.tzld.supply.model.po.supply.spider.SpiderTask;
 import com.xxl.job.core.biz.model.ReturnT;
 import com.xxl.job.core.handler.annotation.XxlJob;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Component;
@@ -25,6 +27,8 @@ public class SpiderJob {
     @Autowired
     private SpiderTaskMapper spiderTaskMapper;
     @Autowired
+    private SpiderContentMapper spiderContentMapper;
+    @Autowired
     private SpiderMapperExt spiderMapperExt;
 
     @Value("${get.rank.page.size:5}")
@@ -52,8 +56,6 @@ public class SpiderJob {
         task.setStartTime(startTime);
         task.setEndTime(endTime);
         task.setDurationMs(endTime - startTime);
-        task.setCreateTime(endTime);
-        task.setUpdateTime(endTime);
         List<SpiderContent> saveList = new ArrayList<>();
         Long now = System.currentTimeMillis();
         for (ContentRankResponse.DataItem dataItem : dataItems) {
@@ -61,6 +63,12 @@ public class SpiderJob {
                 continue;
             }
             for (ContentRankResponse.RankListItem rankListItem : dataItem.getRankList()) {
+                // todo Filter 过滤已存在、短、英文内容
+                if (StringUtils.isBlank(rankListItem.getTitle())
+                        || rankListItem.getTitle().length() < 8
+                        || rankListItem.getTitle().matches("^[a-zA-Z0-9\\s]+$")) {
+                    continue;
+                }
                 SpiderContent content = new SpiderContent();
                 content.setSource(dataItem.getSource());
                 content.setSourceType(dataItem.getType());
@@ -71,6 +79,8 @@ public class SpiderJob {
                 saveList.add(content);
             }
         }
+        task.setCreateTime(now);
+        task.setUpdateTime(now);
         task.setFetchedCount(saveList.size());
         spiderTaskMapper.insertSelective(task);
         spiderMapperExt.batchInsertSpiderContent(saveList);
@@ -79,6 +89,27 @@ public class SpiderJob {
 
     @XxlJob("searchContentDetailJob")
     public ReturnT<String> searchContentDetailJob(String param) {
+        List<SpiderContent> contentList = spiderMapperExt.getRoughScreenSpiderContentNoContent();
+        if (contentList.isEmpty()) {
+            return ReturnT.SUCCESS;
+        }
+        for (SpiderContent content : contentList) {
+            String text = null;
+            try {
+                // todo 选择固定网站搜索
+                text = spiderApiService.searchContentDetail(content.getTitle());
+            } catch (Exception e) {
+                log.error("获取内容详情失败,title={}", content.getTitle(), e);
+            }
+            // todo Filter
+            if (StringUtils.isNotBlank(text)) {
+                content.setContent(text);
+            } else {
+                content.setStatus((byte) 2);
+            }
+            content.setUpdateTime(System.currentTimeMillis());
+            spiderContentMapper.updateByPrimaryKeySelective(content);
+        }
 
         return ReturnT.SUCCESS;
     }

+ 39 - 0
core/src/main/java/com/tzld/supply/model/entity/DeepSeekOfficialApiResponse.java

@@ -0,0 +1,39 @@
+package com.tzld.supply.model.entity;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class DeepSeekOfficialApiResponse {
+
+    private String id;
+    private String object;
+    private long created;
+    private String model;
+    private List<Choice> choices;
+    private Usage usage;
+
+
+    @Data
+    public static class Choice {
+        private long index;
+        private Message message;
+        private String finishReason;
+    }
+
+
+    @Data
+    public static class Message {
+        private String role;
+        private String content;
+    }
+
+    @Data
+    public static class Usage {
+        private long promptTokens;
+        private long completionTokens;
+        private long totalTokens;
+    }
+
+}

+ 11 - 0
core/src/main/java/com/tzld/supply/model/entity/DeepSeekResult.java

@@ -0,0 +1,11 @@
+package com.tzld.supply.model.entity;
+
+import lombok.Data;
+
+@Data
+public class DeepSeekResult {
+    private boolean success;
+    private DeepSeekOfficialApiResponse response;
+    private String failReason;
+    private String responseStr;
+}

+ 25 - 0
core/src/main/java/com/tzld/supply/model/entity/PrecisionScreenEntity.java

@@ -0,0 +1,25 @@
+package com.tzld.supply.model.entity;
+
+import lombok.Data;
+
+@Data
+public class PrecisionScreenEntity {
+
+    private Boolean isElderlySuitable;
+    private Boolean isSensitive;
+    private Boolean isNegative;
+    private Boolean isAdvertisement;
+    private String valueCategory;
+    private String region;
+    private String[] hotKeywords;
+    private String summary;
+    private Boolean highlightPotential;
+    private String highlightReason;
+    private Boolean canBeExaggerated;
+    private String exaggerationType;
+    private String improvedTitle;
+    private Double propagationScore;
+    private Double suitabilityScore;
+    private String reason;
+
+}

+ 17 - 0
core/src/main/java/com/tzld/supply/model/entity/RoughScreenEntity.java

@@ -0,0 +1,17 @@
+package com.tzld.supply.model.entity;
+
+import lombok.Data;
+
+@Data
+public class RoughScreenEntity {
+
+    private Boolean isElderlySuitable;
+    private Boolean isSensitive;
+    private Boolean isNegative;
+    private Boolean isAdvertisement;
+    private Boolean canBeExaggerated;
+    private String improvedTitle;
+    private Boolean needDeepAnalysis;
+    private String reason;
+
+}

+ 109 - 37
core/src/main/java/com/tzld/supply/model/po/supply/spider/SpiderContent.java

@@ -13,7 +13,7 @@ public class SpiderContent {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column spider_content.id
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     private Long id;
 
@@ -24,7 +24,7 @@ public class SpiderContent {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column spider_content.task_id
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     private Long taskId;
 
@@ -35,7 +35,7 @@ public class SpiderContent {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column spider_content.source
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     private String source;
 
@@ -46,7 +46,7 @@ public class SpiderContent {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column spider_content.source_type
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     private String sourceType;
 
@@ -57,7 +57,7 @@ public class SpiderContent {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column spider_content.url
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     private String url;
 
@@ -68,7 +68,7 @@ public class SpiderContent {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column spider_content.title
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     private String title;
 
@@ -79,7 +79,7 @@ public class SpiderContent {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column spider_content.status
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     private Byte status;
 
@@ -90,10 +90,21 @@ public class SpiderContent {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column spider_content.ai_rough_status
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     private Byte aiRoughStatus;
 
+    /**
+     * Database Column Remarks:
+     *   粗筛执行结果
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column spider_content.ai_rough_result
+     *
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
+     */
+    private String aiRoughResult;
+
     /**
      * Database Column Remarks:
      *   精筛状态 0-未分析 1-分析成功 2-分析失败
@@ -101,16 +112,27 @@ public class SpiderContent {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column spider_content.ai_precision_status
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     private Byte aiPrecisionStatus;
 
+    /**
+     * Database Column Remarks:
+     *   精筛执行结果
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column spider_content.ai_precision_result
+     *
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
+     */
+    private String aiPrecisionResult;
+
     /**
      *
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column spider_content.create_time
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     private Long createTime;
 
@@ -119,7 +141,7 @@ public class SpiderContent {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column spider_content.update_time
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     private Long updateTime;
 
@@ -130,7 +152,7 @@ public class SpiderContent {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column spider_content.content
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     private String content;
 
@@ -140,7 +162,7 @@ public class SpiderContent {
      *
      * @return the value of spider_content.id
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     public Long getId() {
         return id;
@@ -152,7 +174,7 @@ public class SpiderContent {
      *
      * @param id the value for spider_content.id
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     public void setId(Long id) {
         this.id = id;
@@ -164,7 +186,7 @@ public class SpiderContent {
      *
      * @return the value of spider_content.task_id
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     public Long getTaskId() {
         return taskId;
@@ -176,7 +198,7 @@ public class SpiderContent {
      *
      * @param taskId the value for spider_content.task_id
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     public void setTaskId(Long taskId) {
         this.taskId = taskId;
@@ -188,7 +210,7 @@ public class SpiderContent {
      *
      * @return the value of spider_content.source
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     public String getSource() {
         return source;
@@ -200,7 +222,7 @@ public class SpiderContent {
      *
      * @param source the value for spider_content.source
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     public void setSource(String source) {
         this.source = source;
@@ -212,7 +234,7 @@ public class SpiderContent {
      *
      * @return the value of spider_content.source_type
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     public String getSourceType() {
         return sourceType;
@@ -224,7 +246,7 @@ public class SpiderContent {
      *
      * @param sourceType the value for spider_content.source_type
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     public void setSourceType(String sourceType) {
         this.sourceType = sourceType;
@@ -236,7 +258,7 @@ public class SpiderContent {
      *
      * @return the value of spider_content.url
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     public String getUrl() {
         return url;
@@ -248,7 +270,7 @@ public class SpiderContent {
      *
      * @param url the value for spider_content.url
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     public void setUrl(String url) {
         this.url = url;
@@ -260,7 +282,7 @@ public class SpiderContent {
      *
      * @return the value of spider_content.title
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     public String getTitle() {
         return title;
@@ -272,7 +294,7 @@ public class SpiderContent {
      *
      * @param title the value for spider_content.title
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     public void setTitle(String title) {
         this.title = title;
@@ -284,7 +306,7 @@ public class SpiderContent {
      *
      * @return the value of spider_content.status
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     public Byte getStatus() {
         return status;
@@ -296,7 +318,7 @@ public class SpiderContent {
      *
      * @param status the value for spider_content.status
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     public void setStatus(Byte status) {
         this.status = status;
@@ -308,7 +330,7 @@ public class SpiderContent {
      *
      * @return the value of spider_content.ai_rough_status
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     public Byte getAiRoughStatus() {
         return aiRoughStatus;
@@ -320,19 +342,43 @@ public class SpiderContent {
      *
      * @param aiRoughStatus the value for spider_content.ai_rough_status
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     public void setAiRoughStatus(Byte aiRoughStatus) {
         this.aiRoughStatus = aiRoughStatus;
     }
 
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column spider_content.ai_rough_result
+     *
+     * @return the value of spider_content.ai_rough_result
+     *
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
+     */
+    public String getAiRoughResult() {
+        return aiRoughResult;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column spider_content.ai_rough_result
+     *
+     * @param aiRoughResult the value for spider_content.ai_rough_result
+     *
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
+     */
+    public void setAiRoughResult(String aiRoughResult) {
+        this.aiRoughResult = aiRoughResult;
+    }
+
     /**
      * This method was generated by MyBatis Generator.
      * This method returns the value of the database column spider_content.ai_precision_status
      *
      * @return the value of spider_content.ai_precision_status
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     public Byte getAiPrecisionStatus() {
         return aiPrecisionStatus;
@@ -344,19 +390,43 @@ public class SpiderContent {
      *
      * @param aiPrecisionStatus the value for spider_content.ai_precision_status
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     public void setAiPrecisionStatus(Byte aiPrecisionStatus) {
         this.aiPrecisionStatus = aiPrecisionStatus;
     }
 
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column spider_content.ai_precision_result
+     *
+     * @return the value of spider_content.ai_precision_result
+     *
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
+     */
+    public String getAiPrecisionResult() {
+        return aiPrecisionResult;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column spider_content.ai_precision_result
+     *
+     * @param aiPrecisionResult the value for spider_content.ai_precision_result
+     *
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
+     */
+    public void setAiPrecisionResult(String aiPrecisionResult) {
+        this.aiPrecisionResult = aiPrecisionResult;
+    }
+
     /**
      * This method was generated by MyBatis Generator.
      * This method returns the value of the database column spider_content.create_time
      *
      * @return the value of spider_content.create_time
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     public Long getCreateTime() {
         return createTime;
@@ -368,7 +438,7 @@ public class SpiderContent {
      *
      * @param createTime the value for spider_content.create_time
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     public void setCreateTime(Long createTime) {
         this.createTime = createTime;
@@ -380,7 +450,7 @@ public class SpiderContent {
      *
      * @return the value of spider_content.update_time
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     public Long getUpdateTime() {
         return updateTime;
@@ -392,7 +462,7 @@ public class SpiderContent {
      *
      * @param updateTime the value for spider_content.update_time
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     public void setUpdateTime(Long updateTime) {
         this.updateTime = updateTime;
@@ -404,7 +474,7 @@ public class SpiderContent {
      *
      * @return the value of spider_content.content
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     public String getContent() {
         return content;
@@ -416,7 +486,7 @@ public class SpiderContent {
      *
      * @param content the value for spider_content.content
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     public void setContent(String content) {
         this.content = content;
@@ -426,7 +496,7 @@ public class SpiderContent {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table spider_content
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     @Override
     public String toString() {
@@ -442,7 +512,9 @@ public class SpiderContent {
         sb.append(", title=").append(title);
         sb.append(", status=").append(status);
         sb.append(", aiRoughStatus=").append(aiRoughStatus);
+        sb.append(", aiRoughResult=").append(aiRoughResult);
         sb.append(", aiPrecisionStatus=").append(aiPrecisionStatus);
+        sb.append(", aiPrecisionResult=").append(aiPrecisionResult);
         sb.append(", createTime=").append(createTime);
         sb.append(", updateTime=").append(updateTime);
         sb.append(", content=").append(content);

+ 157 - 17
core/src/main/java/com/tzld/supply/model/po/supply/spider/SpiderContentExample.java

@@ -8,7 +8,7 @@ public class SpiderContentExample {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database table spider_content
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     protected String orderByClause;
 
@@ -16,7 +16,7 @@ public class SpiderContentExample {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database table spider_content
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     protected boolean distinct;
 
@@ -24,7 +24,7 @@ public class SpiderContentExample {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database table spider_content
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     protected List<Criteria> oredCriteria;
 
@@ -32,7 +32,7 @@ public class SpiderContentExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table spider_content
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     public SpiderContentExample() {
         oredCriteria = new ArrayList<Criteria>();
@@ -42,7 +42,7 @@ public class SpiderContentExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table spider_content
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     public void setOrderByClause(String orderByClause) {
         this.orderByClause = orderByClause;
@@ -52,7 +52,7 @@ public class SpiderContentExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table spider_content
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     public String getOrderByClause() {
         return orderByClause;
@@ -62,7 +62,7 @@ public class SpiderContentExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table spider_content
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     public void setDistinct(boolean distinct) {
         this.distinct = distinct;
@@ -72,7 +72,7 @@ public class SpiderContentExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table spider_content
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     public boolean isDistinct() {
         return distinct;
@@ -82,7 +82,7 @@ public class SpiderContentExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table spider_content
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     public List<Criteria> getOredCriteria() {
         return oredCriteria;
@@ -92,7 +92,7 @@ public class SpiderContentExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table spider_content
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     public void or(Criteria criteria) {
         oredCriteria.add(criteria);
@@ -102,7 +102,7 @@ public class SpiderContentExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table spider_content
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     public Criteria or() {
         Criteria criteria = createCriteriaInternal();
@@ -114,7 +114,7 @@ public class SpiderContentExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table spider_content
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     public Criteria createCriteria() {
         Criteria criteria = createCriteriaInternal();
@@ -128,7 +128,7 @@ public class SpiderContentExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table spider_content
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     protected Criteria createCriteriaInternal() {
         Criteria criteria = new Criteria();
@@ -139,7 +139,7 @@ public class SpiderContentExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table spider_content
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     public void clear() {
         oredCriteria.clear();
@@ -151,7 +151,7 @@ public class SpiderContentExample {
      * This class was generated by MyBatis Generator.
      * This class corresponds to the database table spider_content
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     protected abstract static class GeneratedCriteria {
         protected List<Criterion> criteria;
@@ -714,6 +714,76 @@ public class SpiderContentExample {
             return (Criteria) this;
         }
 
+        public Criteria andAiRoughResultIsNull() {
+            addCriterion("ai_rough_result is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAiRoughResultIsNotNull() {
+            addCriterion("ai_rough_result is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAiRoughResultEqualTo(String value) {
+            addCriterion("ai_rough_result =", value, "aiRoughResult");
+            return (Criteria) this;
+        }
+
+        public Criteria andAiRoughResultNotEqualTo(String value) {
+            addCriterion("ai_rough_result <>", value, "aiRoughResult");
+            return (Criteria) this;
+        }
+
+        public Criteria andAiRoughResultGreaterThan(String value) {
+            addCriterion("ai_rough_result >", value, "aiRoughResult");
+            return (Criteria) this;
+        }
+
+        public Criteria andAiRoughResultGreaterThanOrEqualTo(String value) {
+            addCriterion("ai_rough_result >=", value, "aiRoughResult");
+            return (Criteria) this;
+        }
+
+        public Criteria andAiRoughResultLessThan(String value) {
+            addCriterion("ai_rough_result <", value, "aiRoughResult");
+            return (Criteria) this;
+        }
+
+        public Criteria andAiRoughResultLessThanOrEqualTo(String value) {
+            addCriterion("ai_rough_result <=", value, "aiRoughResult");
+            return (Criteria) this;
+        }
+
+        public Criteria andAiRoughResultLike(String value) {
+            addCriterion("ai_rough_result like", value, "aiRoughResult");
+            return (Criteria) this;
+        }
+
+        public Criteria andAiRoughResultNotLike(String value) {
+            addCriterion("ai_rough_result not like", value, "aiRoughResult");
+            return (Criteria) this;
+        }
+
+        public Criteria andAiRoughResultIn(List<String> values) {
+            addCriterion("ai_rough_result in", values, "aiRoughResult");
+            return (Criteria) this;
+        }
+
+        public Criteria andAiRoughResultNotIn(List<String> values) {
+            addCriterion("ai_rough_result not in", values, "aiRoughResult");
+            return (Criteria) this;
+        }
+
+        public Criteria andAiRoughResultBetween(String value1, String value2) {
+            addCriterion("ai_rough_result between", value1, value2, "aiRoughResult");
+            return (Criteria) this;
+        }
+
+        public Criteria andAiRoughResultNotBetween(String value1, String value2) {
+            addCriterion("ai_rough_result not between", value1, value2, "aiRoughResult");
+            return (Criteria) this;
+        }
+
         public Criteria andAiPrecisionStatusIsNull() {
             addCriterion("ai_precision_status is null");
             return (Criteria) this;
@@ -774,6 +844,76 @@ public class SpiderContentExample {
             return (Criteria) this;
         }
 
+        public Criteria andAiPrecisionResultIsNull() {
+            addCriterion("ai_precision_result is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAiPrecisionResultIsNotNull() {
+            addCriterion("ai_precision_result is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAiPrecisionResultEqualTo(String value) {
+            addCriterion("ai_precision_result =", value, "aiPrecisionResult");
+            return (Criteria) this;
+        }
+
+        public Criteria andAiPrecisionResultNotEqualTo(String value) {
+            addCriterion("ai_precision_result <>", value, "aiPrecisionResult");
+            return (Criteria) this;
+        }
+
+        public Criteria andAiPrecisionResultGreaterThan(String value) {
+            addCriterion("ai_precision_result >", value, "aiPrecisionResult");
+            return (Criteria) this;
+        }
+
+        public Criteria andAiPrecisionResultGreaterThanOrEqualTo(String value) {
+            addCriterion("ai_precision_result >=", value, "aiPrecisionResult");
+            return (Criteria) this;
+        }
+
+        public Criteria andAiPrecisionResultLessThan(String value) {
+            addCriterion("ai_precision_result <", value, "aiPrecisionResult");
+            return (Criteria) this;
+        }
+
+        public Criteria andAiPrecisionResultLessThanOrEqualTo(String value) {
+            addCriterion("ai_precision_result <=", value, "aiPrecisionResult");
+            return (Criteria) this;
+        }
+
+        public Criteria andAiPrecisionResultLike(String value) {
+            addCriterion("ai_precision_result like", value, "aiPrecisionResult");
+            return (Criteria) this;
+        }
+
+        public Criteria andAiPrecisionResultNotLike(String value) {
+            addCriterion("ai_precision_result not like", value, "aiPrecisionResult");
+            return (Criteria) this;
+        }
+
+        public Criteria andAiPrecisionResultIn(List<String> values) {
+            addCriterion("ai_precision_result in", values, "aiPrecisionResult");
+            return (Criteria) this;
+        }
+
+        public Criteria andAiPrecisionResultNotIn(List<String> values) {
+            addCriterion("ai_precision_result not in", values, "aiPrecisionResult");
+            return (Criteria) this;
+        }
+
+        public Criteria andAiPrecisionResultBetween(String value1, String value2) {
+            addCriterion("ai_precision_result between", value1, value2, "aiPrecisionResult");
+            return (Criteria) this;
+        }
+
+        public Criteria andAiPrecisionResultNotBetween(String value1, String value2) {
+            addCriterion("ai_precision_result not between", value1, value2, "aiPrecisionResult");
+            return (Criteria) this;
+        }
+
         public Criteria andCreateTimeIsNull() {
             addCriterion("create_time is null");
             return (Criteria) this;
@@ -899,7 +1039,7 @@ public class SpiderContentExample {
      * This class was generated by MyBatis Generator.
      * This class corresponds to the database table spider_content
      *
-     * @mbg.generated do_not_delete_during_merge Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated do_not_delete_during_merge Mon Oct 13 19:39:09 CST 2025
      */
     public static class Criteria extends GeneratedCriteria {
 
@@ -912,7 +1052,7 @@ public class SpiderContentExample {
      * This class was generated by MyBatis Generator.
      * This class corresponds to the database table spider_content
      *
-     * @mbg.generated Mon Oct 13 16:39:53 CST 2025
+     * @mbg.generated Mon Oct 13 19:39:09 CST 2025
      */
     public static class Criterion {
         private String condition;

+ 50 - 0
core/src/main/java/com/tzld/supply/util/MapBuilder.java

@@ -0,0 +1,50 @@
+package com.tzld.supply.util;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/**
+ * @author: TanJingyu
+ * @create:2023-06-12 13:28:18
+ **/
+public class MapBuilder {
+
+    private MapBuilder() {
+    }
+
+    public static <K, V> Builder<K, V> builder() {
+        return new Builder<>(null);
+    }
+
+    public static <K, V> Builder<K, V> builder(Map<K, V> map) {
+        return new Builder<>(map);
+    }
+
+    public static class Builder<K, V> {
+        private Map<K, V> resultMap = new HashMap<>();
+
+        private Builder(Map<K, V> map) {
+            if (Objects.nonNull(map)) {
+                resultMap = map;
+            }
+        }
+
+        public Builder<K, V> put(K k, V v) {
+            resultMap.put(k, v);
+            return this;
+        }
+
+        public Map<K, V> build() {
+            return resultMap;
+        }
+    }
+
+
+    public static void main(String[] args) {
+        Map<String, Object> build = MapBuilder.<String, Object>builder().put("name", "忘记")
+                .put("age", 23)
+                .build();
+        System.out.println(build);
+    }
+}

+ 1 - 1
core/src/main/resources/generator/mybatis-spider-generator-config.xml

@@ -46,7 +46,7 @@
             <property name="enableSubPackages" value="true"/>
         </javaClientGenerator>
 
-        <table tableName="spider_task" domainObjectName="" alias=""/>
+<!--        <table tableName="spider_task" domainObjectName="" alias=""/>-->
         <table tableName="spider_content" domainObjectName="" alias=""/>
     </context>
 

+ 62 - 28
core/src/main/resources/mapper/supply/spider/SpiderContentMapper.xml

@@ -5,7 +5,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 13 16:39:53 CST 2025.
+      This element was generated on Mon Oct 13 19:39:09 CST 2025.
     -->
     <id column="id" jdbcType="BIGINT" property="id" />
     <result column="task_id" jdbcType="BIGINT" property="taskId" />
@@ -15,7 +15,9 @@
     <result column="title" jdbcType="VARCHAR" property="title" />
     <result column="status" jdbcType="TINYINT" property="status" />
     <result column="ai_rough_status" jdbcType="TINYINT" property="aiRoughStatus" />
+    <result column="ai_rough_result" jdbcType="VARCHAR" property="aiRoughResult" />
     <result column="ai_precision_status" jdbcType="TINYINT" property="aiPrecisionStatus" />
+    <result column="ai_precision_result" jdbcType="VARCHAR" property="aiPrecisionResult" />
     <result column="create_time" jdbcType="BIGINT" property="createTime" />
     <result column="update_time" jdbcType="BIGINT" property="updateTime" />
   </resultMap>
@@ -23,7 +25,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 13 16:39:53 CST 2025.
+      This element was generated on Mon Oct 13 19:39:09 CST 2025.
     -->
     <result column="content" jdbcType="LONGVARCHAR" property="content" />
   </resultMap>
@@ -31,7 +33,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 13 16:39:53 CST 2025.
+      This element was generated on Mon Oct 13 19:39:09 CST 2025.
     -->
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -65,7 +67,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 13 16:39:53 CST 2025.
+      This element was generated on Mon Oct 13 19:39:09 CST 2025.
     -->
     <where>
       <foreach collection="example.oredCriteria" item="criteria" separator="or">
@@ -99,16 +101,16 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 13 16:39:53 CST 2025.
+      This element was generated on Mon Oct 13 19:39:09 CST 2025.
     -->
-    id, task_id, `source`, source_type, url, title, `status`, ai_rough_status, ai_precision_status, 
-    create_time, update_time
+    id, task_id, `source`, source_type, url, title, `status`, ai_rough_status, ai_rough_result, 
+    ai_precision_status, ai_precision_result, create_time, update_time
   </sql>
   <sql id="Blob_Column_List">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 13 16:39:53 CST 2025.
+      This element was generated on Mon Oct 13 19:39:09 CST 2025.
     -->
     content
   </sql>
@@ -116,7 +118,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 13 16:39:53 CST 2025.
+      This element was generated on Mon Oct 13 19:39:09 CST 2025.
     -->
     select
     <if test="distinct">
@@ -137,7 +139,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 13 16:39:53 CST 2025.
+      This element was generated on Mon Oct 13 19:39:09 CST 2025.
     -->
     select
     <if test="distinct">
@@ -156,7 +158,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 13 16:39:53 CST 2025.
+      This element was generated on Mon Oct 13 19:39:09 CST 2025.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -169,7 +171,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 13 16:39:53 CST 2025.
+      This element was generated on Mon Oct 13 19:39:09 CST 2025.
     -->
     delete from spider_content
     where id = #{id,jdbcType=BIGINT}
@@ -178,7 +180,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 13 16:39:53 CST 2025.
+      This element was generated on Mon Oct 13 19:39:09 CST 2025.
     -->
     delete from spider_content
     <if test="_parameter != null">
@@ -189,24 +191,24 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 13 16:39:53 CST 2025.
+      This element was generated on Mon Oct 13 19:39:09 CST 2025.
     -->
     insert into spider_content (id, task_id, `source`, 
       source_type, url, title, 
-      `status`, ai_rough_status, ai_precision_status, 
-      create_time, update_time, content
-      )
+      `status`, ai_rough_status, ai_rough_result, 
+      ai_precision_status, ai_precision_result, create_time, 
+      update_time, content)
     values (#{id,jdbcType=BIGINT}, #{taskId,jdbcType=BIGINT}, #{source,jdbcType=VARCHAR}, 
       #{sourceType,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, 
-      #{status,jdbcType=TINYINT}, #{aiRoughStatus,jdbcType=TINYINT}, #{aiPrecisionStatus,jdbcType=TINYINT}, 
-      #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{content,jdbcType=LONGVARCHAR}
-      )
+      #{status,jdbcType=TINYINT}, #{aiRoughStatus,jdbcType=TINYINT}, #{aiRoughResult,jdbcType=VARCHAR}, 
+      #{aiPrecisionStatus,jdbcType=TINYINT}, #{aiPrecisionResult,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, 
+      #{updateTime,jdbcType=BIGINT}, #{content,jdbcType=LONGVARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.tzld.supply.model.po.supply.spider.SpiderContent">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 13 16:39:53 CST 2025.
+      This element was generated on Mon Oct 13 19:39:09 CST 2025.
     -->
     insert into spider_content
     <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -234,9 +236,15 @@
       <if test="aiRoughStatus != null">
         ai_rough_status,
       </if>
+      <if test="aiRoughResult != null">
+        ai_rough_result,
+      </if>
       <if test="aiPrecisionStatus != null">
         ai_precision_status,
       </if>
+      <if test="aiPrecisionResult != null">
+        ai_precision_result,
+      </if>
       <if test="createTime != null">
         create_time,
       </if>
@@ -272,9 +280,15 @@
       <if test="aiRoughStatus != null">
         #{aiRoughStatus,jdbcType=TINYINT},
       </if>
+      <if test="aiRoughResult != null">
+        #{aiRoughResult,jdbcType=VARCHAR},
+      </if>
       <if test="aiPrecisionStatus != null">
         #{aiPrecisionStatus,jdbcType=TINYINT},
       </if>
+      <if test="aiPrecisionResult != null">
+        #{aiPrecisionResult,jdbcType=VARCHAR},
+      </if>
       <if test="createTime != null">
         #{createTime,jdbcType=BIGINT},
       </if>
@@ -290,7 +304,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 13 16:39:53 CST 2025.
+      This element was generated on Mon Oct 13 19:39:09 CST 2025.
     -->
     select count(*) from spider_content
     <if test="_parameter != null">
@@ -301,7 +315,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 13 16:39:53 CST 2025.
+      This element was generated on Mon Oct 13 19:39:09 CST 2025.
     -->
     update spider_content
     <set>
@@ -329,9 +343,15 @@
       <if test="record.aiRoughStatus != null">
         ai_rough_status = #{record.aiRoughStatus,jdbcType=TINYINT},
       </if>
+      <if test="record.aiRoughResult != null">
+        ai_rough_result = #{record.aiRoughResult,jdbcType=VARCHAR},
+      </if>
       <if test="record.aiPrecisionStatus != null">
         ai_precision_status = #{record.aiPrecisionStatus,jdbcType=TINYINT},
       </if>
+      <if test="record.aiPrecisionResult != null">
+        ai_precision_result = #{record.aiPrecisionResult,jdbcType=VARCHAR},
+      </if>
       <if test="record.createTime != null">
         create_time = #{record.createTime,jdbcType=BIGINT},
       </if>
@@ -350,7 +370,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 13 16:39:53 CST 2025.
+      This element was generated on Mon Oct 13 19:39:09 CST 2025.
     -->
     update spider_content
     set id = #{record.id,jdbcType=BIGINT},
@@ -361,7 +381,9 @@
       title = #{record.title,jdbcType=VARCHAR},
       `status` = #{record.status,jdbcType=TINYINT},
       ai_rough_status = #{record.aiRoughStatus,jdbcType=TINYINT},
+      ai_rough_result = #{record.aiRoughResult,jdbcType=VARCHAR},
       ai_precision_status = #{record.aiPrecisionStatus,jdbcType=TINYINT},
+      ai_precision_result = #{record.aiPrecisionResult,jdbcType=VARCHAR},
       create_time = #{record.createTime,jdbcType=BIGINT},
       update_time = #{record.updateTime,jdbcType=BIGINT},
       content = #{record.content,jdbcType=LONGVARCHAR}
@@ -373,7 +395,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 13 16:39:53 CST 2025.
+      This element was generated on Mon Oct 13 19:39:09 CST 2025.
     -->
     update spider_content
     set id = #{record.id,jdbcType=BIGINT},
@@ -384,7 +406,9 @@
       title = #{record.title,jdbcType=VARCHAR},
       `status` = #{record.status,jdbcType=TINYINT},
       ai_rough_status = #{record.aiRoughStatus,jdbcType=TINYINT},
+      ai_rough_result = #{record.aiRoughResult,jdbcType=VARCHAR},
       ai_precision_status = #{record.aiPrecisionStatus,jdbcType=TINYINT},
+      ai_precision_result = #{record.aiPrecisionResult,jdbcType=VARCHAR},
       create_time = #{record.createTime,jdbcType=BIGINT},
       update_time = #{record.updateTime,jdbcType=BIGINT}
     <if test="_parameter != null">
@@ -395,7 +419,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 13 16:39:53 CST 2025.
+      This element was generated on Mon Oct 13 19:39:09 CST 2025.
     -->
     update spider_content
     <set>
@@ -420,9 +444,15 @@
       <if test="aiRoughStatus != null">
         ai_rough_status = #{aiRoughStatus,jdbcType=TINYINT},
       </if>
+      <if test="aiRoughResult != null">
+        ai_rough_result = #{aiRoughResult,jdbcType=VARCHAR},
+      </if>
       <if test="aiPrecisionStatus != null">
         ai_precision_status = #{aiPrecisionStatus,jdbcType=TINYINT},
       </if>
+      <if test="aiPrecisionResult != null">
+        ai_precision_result = #{aiPrecisionResult,jdbcType=VARCHAR},
+      </if>
       <if test="createTime != null">
         create_time = #{createTime,jdbcType=BIGINT},
       </if>
@@ -439,7 +469,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 13 16:39:53 CST 2025.
+      This element was generated on Mon Oct 13 19:39:09 CST 2025.
     -->
     update spider_content
     set task_id = #{taskId,jdbcType=BIGINT},
@@ -449,7 +479,9 @@
       title = #{title,jdbcType=VARCHAR},
       `status` = #{status,jdbcType=TINYINT},
       ai_rough_status = #{aiRoughStatus,jdbcType=TINYINT},
+      ai_rough_result = #{aiRoughResult,jdbcType=VARCHAR},
       ai_precision_status = #{aiPrecisionStatus,jdbcType=TINYINT},
+      ai_precision_result = #{aiPrecisionResult,jdbcType=VARCHAR},
       create_time = #{createTime,jdbcType=BIGINT},
       update_time = #{updateTime,jdbcType=BIGINT},
       content = #{content,jdbcType=LONGVARCHAR}
@@ -459,7 +491,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Oct 13 16:39:53 CST 2025.
+      This element was generated on Mon Oct 13 19:39:09 CST 2025.
     -->
     update spider_content
     set task_id = #{taskId,jdbcType=BIGINT},
@@ -469,7 +501,9 @@
       title = #{title,jdbcType=VARCHAR},
       `status` = #{status,jdbcType=TINYINT},
       ai_rough_status = #{aiRoughStatus,jdbcType=TINYINT},
+      ai_rough_result = #{aiRoughResult,jdbcType=VARCHAR},
       ai_precision_status = #{aiPrecisionStatus,jdbcType=TINYINT},
+      ai_precision_result = #{aiPrecisionResult,jdbcType=VARCHAR},
       create_time = #{createTime,jdbcType=BIGINT},
       update_time = #{updateTime,jdbcType=BIGINT}
     where id = #{id,jdbcType=BIGINT}

+ 12 - 0
core/src/main/resources/mapper/supply/spider/ext/SpiderMapperExt.xml

@@ -11,4 +11,16 @@
         </foreach>
     </insert>
 
+    <select id="getRoughScreenSpiderContentHasContent" resultType="com.tzld.supply.model.po.supply.spider.SpiderContent">
+        select *
+        from spider_content
+        where `status` = 1 and ai_rough_status = 1 and ai_precision_status = 0 and content is not null
+    </select>
+
+    <select id="getRoughScreenSpiderContentNoContent" resultType="com.tzld.supply.model.po.supply.spider.SpiderContent">
+        select *
+        from spider_content
+        where `status` = 1 and ai_rough_status = 1 and ai_precision_status = 0 and content is null
+    </select>
+
 </mapper>

+ 6 - 0
pom.xml

@@ -262,6 +262,12 @@
             <artifactId>spring-cloud-starter-openfeign</artifactId>
         </dependency>
 
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-core</artifactId>
+            <version>5.8.18</version>
+        </dependency>
+
     </dependencies>
 
 </project>

+ 0 - 2
server/src/main/java/com/tzld/supply/controller/XxlJobController.java

@@ -14,11 +14,9 @@ public class XxlJobController {
 
     @Autowired
     private SpiderJob spiderJob;
-
     @Autowired
     private ContentScreenJob contentScreenJob;
 
-
     @GetMapping("/spiderTaskJob")
     public CommonResponse<Void> spiderTaskJob() {
         spiderJob.spiderTaskJob(null);