wangyunpeng 1 bulan lalu
induk
melakukan
1cb4fbec44
25 mengubah file dengan 2854 tambahan dan 37 penghapusan
  1. 124 0
      .idea/uiDesigner.xml
  2. 81 0
      core/src/main/java/com/tzld/supply/common/base/CommonResponse.java
  3. 13 0
      core/src/main/java/com/tzld/supply/common/constant/ResponseConstant.java
  4. 63 0
      core/src/main/java/com/tzld/supply/config/RedisTemplateConfig.java
  5. 11 0
      core/src/main/java/com/tzld/supply/config/SchedulingConfig.java
  6. 56 0
      core/src/main/java/com/tzld/supply/config/SwaggerConfig.java
  7. 55 0
      core/src/main/java/com/tzld/supply/config/db/SupplyDBConfig.java
  8. 19 0
      core/src/main/java/com/tzld/supply/config/mybatis/SupplyMybatisConfig.java
  9. 1 1
      core/src/main/java/com/tzld/supply/dao/generator/MybatisGeneratorMain.java
  10. 120 0
      core/src/main/java/com/tzld/supply/dao/mapper/supply/spider/SpiderTaskMapper.java
  11. 38 0
      core/src/main/java/com/tzld/supply/interceptor/CrosDomainAllowInterceptor.java
  12. 8 0
      core/src/main/java/com/tzld/supply/mapper/supply/ArticleContentLinkMapper.java
  13. 526 0
      core/src/main/java/com/tzld/supply/model/po/spider/SpiderTask.java
  14. 1103 0
      core/src/main/java/com/tzld/supply/model/po/spider/SpiderTaskExample.java
  15. 10 0
      core/src/main/java/com/tzld/supply/service/SpiderTaskService.java
  16. 23 0
      core/src/main/java/com/tzld/supply/service/impl/SpiderTaskServiceImpl.java
  17. 5 5
      core/src/main/resources/generator/mybatis-spider-generator-config.xml
  18. 5 0
      core/src/main/resources/mapper/supply/ArticleContentLinkMapper.xml
  19. 511 0
      core/src/main/resources/mapper/supply/spider/SpiderTaskMapper.xml
  20. 16 3
      server/src/main/java/com/tzld/supply/Application.java
  21. 27 0
      server/src/main/java/com/tzld/supply/controller/SpiderTaskController.java
  22. 10 9
      server/src/main/resources/application-dev.yml
  23. 10 9
      server/src/main/resources/application-prod.yml
  24. 10 9
      server/src/main/resources/application-test.yml
  25. 9 1
      server/src/main/resources/application.yml

+ 124 - 0
.idea/uiDesigner.xml

@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Palette2">
+    <group name="Swing">
+      <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
+      </item>
+      <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
+      </item>
+      <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
+        <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
+        <initial-values>
+          <property name="text" value="Button" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="RadioButton" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="CheckBox" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="Label" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+          <preferred-size width="200" height="200" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+          <preferred-size width="200" height="200" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
+      </item>
+      <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
+          <preferred-size width="-1" height="20" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
+      </item>
+      <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
+      </item>
+    </group>
+  </component>
+</project>

+ 81 - 0
core/src/main/java/com/tzld/supply/common/base/CommonResponse.java

@@ -0,0 +1,81 @@
+package com.tzld.supply.common.base;
+
+import com.tzld.supply.common.enums.ExceptionEnum;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
+import static com.tzld.supply.common.constant.ResponseConstant.SUCCESS_CODE;
+import static com.tzld.supply.common.constant.ResponseConstant.SUCCESS_MSG;
+
+
+/**
+ * Common Response
+ *
+ * @author xueyiming
+ */
+@Setter
+@Getter
+@ToString
+public class CommonResponse<T> {
+    /**
+     * 返回状态码,0 表示业务成功
+     */
+    private int code = 0;
+    /**
+     * 返回消息
+     */
+    private String msg = "success";
+    /**
+     * 业务成功时返回数据
+     */
+    private T data;
+
+    public static <T> CommonResponse<T> success() {
+        CommonResponse<T> commonResponse = new CommonResponse<>();
+        commonResponse.setCode(SUCCESS_CODE);
+        commonResponse.setMsg(SUCCESS_MSG);
+        return commonResponse;
+    }
+
+    public static <T> CommonResponse<T> success(T data) {
+        CommonResponse<T> commonResponse = new CommonResponse<>();
+        commonResponse.setCode(SUCCESS_CODE);
+        commonResponse.setMsg(SUCCESS_MSG);
+        commonResponse.setData(data);
+        return commonResponse;
+    }
+
+    public static <T> CommonResponse<T> create() {
+        return create(SUCCESS_CODE, SUCCESS_MSG, null);
+    }
+
+    public static <T> CommonResponse<T> create(T data) {
+        return create(SUCCESS_CODE, SUCCESS_MSG, data);
+    }
+
+    public static <T> CommonResponse<T> create(ExceptionEnum exceptionEnum) {
+        return create(exceptionEnum.getCode(), exceptionEnum.getMsg(), null);
+    }
+
+    public static <T> CommonResponse<T> create(ExceptionEnum exceptionEnum, String msg) {
+        return create(exceptionEnum.getCode(), msg, null);
+    }
+
+    public static <T> CommonResponse<T> create(int code, String msg) {
+        return create(code, msg, null);
+    }
+
+    public static <T> CommonResponse<T> create(int code, String msg, T data) {
+        CommonResponse<T> commonResponse = new CommonResponse<>();
+        commonResponse.setCode(code);
+        commonResponse.setMsg(msg);
+        commonResponse.setData(data);
+        return commonResponse;
+    }
+
+    public boolean isSuccess() {
+        return this.code == SUCCESS_CODE;
+    }
+
+}

+ 13 - 0
core/src/main/java/com/tzld/supply/common/constant/ResponseConstant.java

@@ -0,0 +1,13 @@
+package com.tzld.supply.common.constant;
+
+/**
+ * 响应常量
+ *
+ * @author xueyiming
+ */
+public interface ResponseConstant {
+
+    int SUCCESS_CODE = 0;
+
+    String SUCCESS_MSG = "success";
+}

+ 63 - 0
core/src/main/java/com/tzld/supply/config/RedisTemplateConfig.java

@@ -0,0 +1,63 @@
+package com.tzld.supply.config;
+
+import org.apache.commons.pool2.impl.GenericObjectPoolConfig;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Primary;
+import org.springframework.data.redis.connection.RedisConnectionFactory;
+import org.springframework.data.redis.connection.RedisStandaloneConfiguration;
+import org.springframework.data.redis.connection.lettuce.LettuceClientConfiguration;
+import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
+import org.springframework.data.redis.connection.lettuce.LettucePoolingClientConfiguration;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.serializer.StringRedisSerializer;
+
+@Configuration
+public class RedisTemplateConfig {
+
+    @Bean("redisPool")
+    @ConfigurationProperties(prefix = "spring.redis.lettuce.pool")
+    public GenericObjectPoolConfig<LettucePoolingClientConfiguration> redisPool() {
+        return new GenericObjectPoolConfig<>();
+    }
+
+    @Bean("redisConfig")
+    @ConfigurationProperties(prefix = "spring.redis")
+    public RedisStandaloneConfiguration tairConfig() {
+        return new RedisStandaloneConfiguration();
+    }
+
+    @Bean("redisFactory")
+    @Primary
+    public LettuceConnectionFactory factory(@Qualifier("redisPool") GenericObjectPoolConfig<LettucePoolingClientConfiguration> redisPool,
+                                            @Qualifier("redisConfig") RedisStandaloneConfiguration redisConfig) {
+        LettuceClientConfiguration lettuceClientConfiguration =
+                LettucePoolingClientConfiguration.builder().poolConfig(redisPool).build();
+        return new LettuceConnectionFactory(redisConfig, lettuceClientConfiguration);
+    }
+
+    @Bean(name = "redisTemplate")
+    public RedisTemplate<String, String> getRedisTemplate(@Qualifier("redisFactory") RedisConnectionFactory factory) {
+        return buildRedisTemplateByString(factory);
+    }
+
+    /**
+     * 构建redisTemplate 使用string序列化
+     *
+     * @param factory
+     * @return
+     */
+    public RedisTemplate<String, String> buildRedisTemplateByString(RedisConnectionFactory factory) {
+        RedisTemplate<String, String> redisTemplate = new RedisTemplate<>();
+        redisTemplate.setConnectionFactory(factory);
+        // key的序列化类型 保证可读性
+        redisTemplate.setKeySerializer(new StringRedisSerializer());
+        redisTemplate.setValueSerializer(new StringRedisSerializer());
+        redisTemplate.setHashKeySerializer(new StringRedisSerializer());
+        redisTemplate.setHashValueSerializer(new StringRedisSerializer());
+        return redisTemplate;
+    }
+
+}

+ 11 - 0
core/src/main/java/com/tzld/supply/config/SchedulingConfig.java

@@ -0,0 +1,11 @@
+package com.tzld.supply.config;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Profile;
+import org.springframework.scheduling.annotation.EnableScheduling;
+
+@Configuration(proxyBeanMethods = false)
+@EnableScheduling
+@Profile("prod")
+public class SchedulingConfig {
+}

+ 56 - 0
core/src/main/java/com/tzld/supply/config/SwaggerConfig.java

@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.tzld.supply.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Profile;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+/**
+ * swagger2 配置
+ */
+@Configuration
+@Profile({"dev","test","pre"})
+@EnableSwagger2
+public class SwaggerConfig {
+
+    @Bean
+    public Docket createRestApi() {
+        return new Docket(DocumentationType.SWAGGER_2)
+                .apiInfo(apiInfo())
+                .select()
+                .apis(RequestHandlerSelectors.basePackage("com.tzld.supply.controller"))
+                .paths(PathSelectors.any())
+                .build();
+    }
+
+    private ApiInfo apiInfo() {
+        return new ApiInfoBuilder()
+                .title("supply server swagger api")
+                .description("supply server swagger api")
+                .version("1.0")
+                .build();
+    }
+}

+ 55 - 0
core/src/main/java/com/tzld/supply/config/db/SupplyDBConfig.java

@@ -0,0 +1,55 @@
+package com.tzld.supply.config.db;
+
+import com.zaxxer.hikari.HikariDataSource;
+import org.mybatis.spring.SqlSessionFactoryBean;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Primary;
+import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
+import org.springframework.jdbc.datasource.DataSourceTransactionManager;
+import org.springframework.transaction.PlatformTransactionManager;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+import javax.sql.DataSource;
+
+@Configuration
+@EnableTransactionManagement
+public class SupplyDBConfig {
+
+    // 1. 配置 supply 数据源
+    @Primary
+    @Bean(name = "supplyDataSource")
+    @ConfigurationProperties(prefix = "spring.datasource.supply")
+    public DataSource supplyDataSource() {
+        return new HikariDataSource(); // 使用 HikariCP 连接池
+    }
+
+    // 2. 配置 supply 专属 SqlSessionFactory
+    @Primary
+    @Bean(name = "supplySqlSessionFactory")
+    public SqlSessionFactoryBean supplySqlSessionFactory(
+            @Qualifier("supplyDataSource") DataSource supplyDataSource) throws Exception {
+        SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean();
+        sessionFactory.setDataSource(supplyDataSource); // 关联 supply 数据源
+        // 关键:指定 supply 模块的 mapper 文件路径(隔离其他数据源)
+        sessionFactory.setMapperLocations(new PathMatchingResourcePatternResolver()
+                .getResources("classpath:mapper/supply/**/*.xml"));
+        sessionFactory.setTypeAliasesPackage("com.tzld.supply");
+        sessionFactory.getObject().getConfiguration().setMapUnderscoreToCamelCase(true);
+        sessionFactory.getObject().getConfiguration().setUseGeneratedKeys(true);
+        return sessionFactory;
+    }
+
+
+    // 3. 配置 supply 事务管理器
+    @Primary
+    @Bean(name = "supplyTransactionManager")
+    public PlatformTransactionManager supplyTransactionManager(
+            @Qualifier("supplyDataSource") DataSource supplyDataSource) {
+        return new DataSourceTransactionManager(supplyDataSource); // 移除 JPA 事务管理器
+    }
+
+}
+

+ 19 - 0
core/src/main/java/com/tzld/supply/config/mybatis/SupplyMybatisConfig.java

@@ -0,0 +1,19 @@
+package com.tzld.supply.config.mybatis;
+
+import org.apache.ibatis.session.SqlSessionFactory;
+import org.mybatis.spring.SqlSessionTemplate;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+@MapperScan(basePackages = "com.tzld.supply.mapper.supply",
+        sqlSessionFactoryRef = "supplySqlSessionFactory")
+public class SupplyMybatisConfig {
+
+    @Bean(name = "supplySqlSessionTemplate")
+    public SqlSessionTemplate supplySqlSessionTemplate(@Qualifier("supplySqlSessionFactory") SqlSessionFactory sqlSessionFactory) {
+        return new SqlSessionTemplate(sqlSessionFactory);
+    }
+}

+ 1 - 1
core/src/main/java/com/tzld/supply/dao/generator/MybatisGeneratorMain.java

@@ -19,7 +19,7 @@ public class MybatisGeneratorMain {
 			throws SQLException, IOException, InterruptedException, InvalidConfigurationException, XMLParserException {
 		List<String> warnings = new ArrayList<String>();
 		boolean overwrite = true;
-		File configFile = new File(MybatisGeneratorMain.class.getResource("/generator/mybatis-agent-generator-config.xml").getFile());
+		File configFile = new File(MybatisGeneratorMain.class.getResource("/generator/mybatis-spider-generator-config.xml").getFile());
 
 		ConfigurationParser cp = new ConfigurationParser(warnings);
 		Configuration config = cp.parseConfiguration(configFile);

+ 120 - 0
core/src/main/java/com/tzld/supply/dao/mapper/supply/spider/SpiderTaskMapper.java

@@ -0,0 +1,120 @@
+package com.tzld.supply.dao.mapper.supply.spider;
+
+import com.tzld.supply.model.po.spider.SpiderTask;
+import com.tzld.supply.model.po.spider.SpiderTaskExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface SpiderTaskMapper {
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table spider_task
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    long countByExample(SpiderTaskExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table spider_task
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    int deleteByExample(SpiderTaskExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table spider_task
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    int deleteByPrimaryKey(Long id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table spider_task
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    int insert(SpiderTask record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table spider_task
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    int insertSelective(SpiderTask record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table spider_task
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    List<SpiderTask> selectByExampleWithBLOBs(SpiderTaskExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table spider_task
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    List<SpiderTask> selectByExample(SpiderTaskExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table spider_task
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    SpiderTask selectByPrimaryKey(Long id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table spider_task
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    int updateByExampleSelective(@Param("record") SpiderTask record, @Param("example") SpiderTaskExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table spider_task
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    int updateByExampleWithBLOBs(@Param("record") SpiderTask record, @Param("example") SpiderTaskExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table spider_task
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    int updateByExample(@Param("record") SpiderTask record, @Param("example") SpiderTaskExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table spider_task
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    int updateByPrimaryKeySelective(SpiderTask record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table spider_task
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    int updateByPrimaryKeyWithBLOBs(SpiderTask record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table spider_task
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    int updateByPrimaryKey(SpiderTask record);
+}

+ 38 - 0
core/src/main/java/com/tzld/supply/interceptor/CrosDomainAllowInterceptor.java

@@ -0,0 +1,38 @@
+package com.tzld.supply.interceptor;
+
+import org.springframework.http.HttpStatus;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.servlet.HandlerInterceptor;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@Component
+public class CrosDomainAllowInterceptor implements HandlerInterceptor {
+
+    @Override
+    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
+            throws Exception {
+        response.addHeader("Access-Control-Allow-Origin", "*");
+        response.addHeader("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS");
+        response.addHeader("Access-Control-Allow-Headers", "*");
+        if (request.getMethod().equals(RequestMethod.OPTIONS.name())) {
+            response.setStatus(HttpStatus.OK.value());
+            return false;
+        }
+        return true;
+    }
+
+    @Override
+    public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,
+                           ModelAndView modelAndView) throws Exception {
+    }
+
+    @Override
+    public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)
+            throws Exception {
+    }
+
+}

+ 8 - 0
core/src/main/java/com/tzld/supply/mapper/supply/ArticleContentLinkMapper.java

@@ -0,0 +1,8 @@
+package com.tzld.supply.mapper.supply;
+
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface ArticleContentLinkMapper {
+
+}

+ 526 - 0
core/src/main/java/com/tzld/supply/model/po/spider/SpiderTask.java

@@ -0,0 +1,526 @@
+package com.tzld.supply.model.po.spider;
+
+import java.util.Date;
+
+/**
+ *
+ * This class was generated by MyBatis Generator.
+ * This class corresponds to the database table spider_task
+ */
+public class SpiderTask {
+    /**
+     * Database Column Remarks:
+     *   主键ID
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column spider_task.id
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    private Long id;
+
+    /**
+     * Database Column Remarks:
+     *   任务编码,如: NEWS_HOT_TOPHUB
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column spider_task.task_code
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    private String taskCode;
+
+    /**
+     * Database Column Remarks:
+     *   任务名称
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column spider_task.task_name
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    private String taskName;
+
+    /**
+     * Database Column Remarks:
+     *   来源网站ID,关联 content_source.id
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column spider_task.source_id
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    private Long sourceId;
+
+    /**
+     * Database Column Remarks:
+     *   执行状态 0-待执行 1-执行中 2-成功 3-失败
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column spider_task.status
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    private Byte status;
+
+    /**
+     * Database Column Remarks:
+     *   任务开始时间
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column spider_task.start_time
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    private Date startTime;
+
+    /**
+     * Database Column Remarks:
+     *   任务结束时间
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column spider_task.end_time
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    private Date endTime;
+
+    /**
+     * Database Column Remarks:
+     *   任务执行耗时(毫秒)
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column spider_task.duration_ms
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    private Long durationMs;
+
+    /**
+     * Database Column Remarks:
+     *   爬取内容数量
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column spider_task.fetched_count
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    private Integer fetchedCount;
+
+    /**
+     * Database Column Remarks:
+     *   成功入库数量
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column spider_task.success_count
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    private Integer successCount;
+
+    /**
+     * Database Column Remarks:
+     *   失败数量
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column spider_task.fail_count
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    private Integer failCount;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column spider_task.create_time
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    private Date createTime;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column spider_task.update_time
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    private Date updateTime;
+
+    /**
+     * Database Column Remarks:
+     *   错误信息
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column spider_task.error_message
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    private String errorMessage;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column spider_task.id
+     *
+     * @return the value of spider_task.id
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column spider_task.id
+     *
+     * @param id the value for spider_task.id
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column spider_task.task_code
+     *
+     * @return the value of spider_task.task_code
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public String getTaskCode() {
+        return taskCode;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column spider_task.task_code
+     *
+     * @param taskCode the value for spider_task.task_code
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public void setTaskCode(String taskCode) {
+        this.taskCode = taskCode;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column spider_task.task_name
+     *
+     * @return the value of spider_task.task_name
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public String getTaskName() {
+        return taskName;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column spider_task.task_name
+     *
+     * @param taskName the value for spider_task.task_name
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public void setTaskName(String taskName) {
+        this.taskName = taskName;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column spider_task.source_id
+     *
+     * @return the value of spider_task.source_id
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public Long getSourceId() {
+        return sourceId;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column spider_task.source_id
+     *
+     * @param sourceId the value for spider_task.source_id
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public void setSourceId(Long sourceId) {
+        this.sourceId = sourceId;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column spider_task.status
+     *
+     * @return the value of spider_task.status
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public Byte getStatus() {
+        return status;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column spider_task.status
+     *
+     * @param status the value for spider_task.status
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public void setStatus(Byte status) {
+        this.status = status;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column spider_task.start_time
+     *
+     * @return the value of spider_task.start_time
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public Date getStartTime() {
+        return startTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column spider_task.start_time
+     *
+     * @param startTime the value for spider_task.start_time
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public void setStartTime(Date startTime) {
+        this.startTime = startTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column spider_task.end_time
+     *
+     * @return the value of spider_task.end_time
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public Date getEndTime() {
+        return endTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column spider_task.end_time
+     *
+     * @param endTime the value for spider_task.end_time
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public void setEndTime(Date endTime) {
+        this.endTime = endTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column spider_task.duration_ms
+     *
+     * @return the value of spider_task.duration_ms
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public Long getDurationMs() {
+        return durationMs;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column spider_task.duration_ms
+     *
+     * @param durationMs the value for spider_task.duration_ms
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public void setDurationMs(Long durationMs) {
+        this.durationMs = durationMs;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column spider_task.fetched_count
+     *
+     * @return the value of spider_task.fetched_count
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public Integer getFetchedCount() {
+        return fetchedCount;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column spider_task.fetched_count
+     *
+     * @param fetchedCount the value for spider_task.fetched_count
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public void setFetchedCount(Integer fetchedCount) {
+        this.fetchedCount = fetchedCount;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column spider_task.success_count
+     *
+     * @return the value of spider_task.success_count
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public Integer getSuccessCount() {
+        return successCount;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column spider_task.success_count
+     *
+     * @param successCount the value for spider_task.success_count
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public void setSuccessCount(Integer successCount) {
+        this.successCount = successCount;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column spider_task.fail_count
+     *
+     * @return the value of spider_task.fail_count
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public Integer getFailCount() {
+        return failCount;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column spider_task.fail_count
+     *
+     * @param failCount the value for spider_task.fail_count
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public void setFailCount(Integer failCount) {
+        this.failCount = failCount;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column spider_task.create_time
+     *
+     * @return the value of spider_task.create_time
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column spider_task.create_time
+     *
+     * @param createTime the value for spider_task.create_time
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column spider_task.update_time
+     *
+     * @return the value of spider_task.update_time
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column spider_task.update_time
+     *
+     * @param updateTime the value for spider_task.update_time
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column spider_task.error_message
+     *
+     * @return the value of spider_task.error_message
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public String getErrorMessage() {
+        return errorMessage;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column spider_task.error_message
+     *
+     * @param errorMessage the value for spider_task.error_message
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public void setErrorMessage(String errorMessage) {
+        this.errorMessage = errorMessage;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table spider_task
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", taskCode=").append(taskCode);
+        sb.append(", taskName=").append(taskName);
+        sb.append(", sourceId=").append(sourceId);
+        sb.append(", status=").append(status);
+        sb.append(", startTime=").append(startTime);
+        sb.append(", endTime=").append(endTime);
+        sb.append(", durationMs=").append(durationMs);
+        sb.append(", fetchedCount=").append(fetchedCount);
+        sb.append(", successCount=").append(successCount);
+        sb.append(", failCount=").append(failCount);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", errorMessage=").append(errorMessage);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 1103 - 0
core/src/main/java/com/tzld/supply/model/po/spider/SpiderTaskExample.java

@@ -0,0 +1,1103 @@
+package com.tzld.supply.model.po.spider;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class SpiderTaskExample {
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table spider_task
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    protected String orderByClause;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table spider_task
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    protected boolean distinct;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table spider_task
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    protected List<Criteria> oredCriteria;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table spider_task
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public SpiderTaskExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table spider_task
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table spider_task
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table spider_task
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table spider_task
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table spider_task
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table spider_task
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table spider_task
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table spider_task
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table spider_task
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table spider_task
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table spider_task
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskCodeIsNull() {
+            addCriterion("task_code is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskCodeIsNotNull() {
+            addCriterion("task_code is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskCodeEqualTo(String value) {
+            addCriterion("task_code =", value, "taskCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskCodeNotEqualTo(String value) {
+            addCriterion("task_code <>", value, "taskCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskCodeGreaterThan(String value) {
+            addCriterion("task_code >", value, "taskCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskCodeGreaterThanOrEqualTo(String value) {
+            addCriterion("task_code >=", value, "taskCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskCodeLessThan(String value) {
+            addCriterion("task_code <", value, "taskCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskCodeLessThanOrEqualTo(String value) {
+            addCriterion("task_code <=", value, "taskCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskCodeLike(String value) {
+            addCriterion("task_code like", value, "taskCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskCodeNotLike(String value) {
+            addCriterion("task_code not like", value, "taskCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskCodeIn(List<String> values) {
+            addCriterion("task_code in", values, "taskCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskCodeNotIn(List<String> values) {
+            addCriterion("task_code not in", values, "taskCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskCodeBetween(String value1, String value2) {
+            addCriterion("task_code between", value1, value2, "taskCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskCodeNotBetween(String value1, String value2) {
+            addCriterion("task_code not between", value1, value2, "taskCode");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskNameIsNull() {
+            addCriterion("task_name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskNameIsNotNull() {
+            addCriterion("task_name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskNameEqualTo(String value) {
+            addCriterion("task_name =", value, "taskName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskNameNotEqualTo(String value) {
+            addCriterion("task_name <>", value, "taskName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskNameGreaterThan(String value) {
+            addCriterion("task_name >", value, "taskName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskNameGreaterThanOrEqualTo(String value) {
+            addCriterion("task_name >=", value, "taskName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskNameLessThan(String value) {
+            addCriterion("task_name <", value, "taskName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskNameLessThanOrEqualTo(String value) {
+            addCriterion("task_name <=", value, "taskName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskNameLike(String value) {
+            addCriterion("task_name like", value, "taskName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskNameNotLike(String value) {
+            addCriterion("task_name not like", value, "taskName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskNameIn(List<String> values) {
+            addCriterion("task_name in", values, "taskName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskNameNotIn(List<String> values) {
+            addCriterion("task_name not in", values, "taskName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskNameBetween(String value1, String value2) {
+            addCriterion("task_name between", value1, value2, "taskName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskNameNotBetween(String value1, String value2) {
+            addCriterion("task_name not between", value1, value2, "taskName");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceIdIsNull() {
+            addCriterion("source_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceIdIsNotNull() {
+            addCriterion("source_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceIdEqualTo(Long value) {
+            addCriterion("source_id =", value, "sourceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceIdNotEqualTo(Long value) {
+            addCriterion("source_id <>", value, "sourceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceIdGreaterThan(Long value) {
+            addCriterion("source_id >", value, "sourceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("source_id >=", value, "sourceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceIdLessThan(Long value) {
+            addCriterion("source_id <", value, "sourceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceIdLessThanOrEqualTo(Long value) {
+            addCriterion("source_id <=", value, "sourceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceIdIn(List<Long> values) {
+            addCriterion("source_id in", values, "sourceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceIdNotIn(List<Long> values) {
+            addCriterion("source_id not in", values, "sourceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceIdBetween(Long value1, Long value2) {
+            addCriterion("source_id between", value1, value2, "sourceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceIdNotBetween(Long value1, Long value2) {
+            addCriterion("source_id not between", value1, value2, "sourceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNull() {
+            addCriterion("`status` is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNotNull() {
+            addCriterion("`status` is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusEqualTo(Byte value) {
+            addCriterion("`status` =", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotEqualTo(Byte value) {
+            addCriterion("`status` <>", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThan(Byte value) {
+            addCriterion("`status` >", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThanOrEqualTo(Byte value) {
+            addCriterion("`status` >=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThan(Byte value) {
+            addCriterion("`status` <", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThanOrEqualTo(Byte value) {
+            addCriterion("`status` <=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIn(List<Byte> values) {
+            addCriterion("`status` in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotIn(List<Byte> values) {
+            addCriterion("`status` not in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusBetween(Byte value1, Byte value2) {
+            addCriterion("`status` between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotBetween(Byte value1, Byte value2) {
+            addCriterion("`status` not between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeIsNull() {
+            addCriterion("start_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeIsNotNull() {
+            addCriterion("start_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeEqualTo(Date value) {
+            addCriterion("start_time =", value, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeNotEqualTo(Date value) {
+            addCriterion("start_time <>", value, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeGreaterThan(Date value) {
+            addCriterion("start_time >", value, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("start_time >=", value, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeLessThan(Date value) {
+            addCriterion("start_time <", value, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeLessThanOrEqualTo(Date value) {
+            addCriterion("start_time <=", value, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeIn(List<Date> values) {
+            addCriterion("start_time in", values, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeNotIn(List<Date> values) {
+            addCriterion("start_time not in", values, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeBetween(Date value1, Date value2) {
+            addCriterion("start_time between", value1, value2, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeNotBetween(Date value1, Date value2) {
+            addCriterion("start_time not between", value1, value2, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeIsNull() {
+            addCriterion("end_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeIsNotNull() {
+            addCriterion("end_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeEqualTo(Date value) {
+            addCriterion("end_time =", value, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeNotEqualTo(Date value) {
+            addCriterion("end_time <>", value, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeGreaterThan(Date value) {
+            addCriterion("end_time >", value, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("end_time >=", value, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeLessThan(Date value) {
+            addCriterion("end_time <", value, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeLessThanOrEqualTo(Date value) {
+            addCriterion("end_time <=", value, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeIn(List<Date> values) {
+            addCriterion("end_time in", values, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeNotIn(List<Date> values) {
+            addCriterion("end_time not in", values, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeBetween(Date value1, Date value2) {
+            addCriterion("end_time between", value1, value2, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeNotBetween(Date value1, Date value2) {
+            addCriterion("end_time not between", value1, value2, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andDurationMsIsNull() {
+            addCriterion("duration_ms is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDurationMsIsNotNull() {
+            addCriterion("duration_ms is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDurationMsEqualTo(Long value) {
+            addCriterion("duration_ms =", value, "durationMs");
+            return (Criteria) this;
+        }
+
+        public Criteria andDurationMsNotEqualTo(Long value) {
+            addCriterion("duration_ms <>", value, "durationMs");
+            return (Criteria) this;
+        }
+
+        public Criteria andDurationMsGreaterThan(Long value) {
+            addCriterion("duration_ms >", value, "durationMs");
+            return (Criteria) this;
+        }
+
+        public Criteria andDurationMsGreaterThanOrEqualTo(Long value) {
+            addCriterion("duration_ms >=", value, "durationMs");
+            return (Criteria) this;
+        }
+
+        public Criteria andDurationMsLessThan(Long value) {
+            addCriterion("duration_ms <", value, "durationMs");
+            return (Criteria) this;
+        }
+
+        public Criteria andDurationMsLessThanOrEqualTo(Long value) {
+            addCriterion("duration_ms <=", value, "durationMs");
+            return (Criteria) this;
+        }
+
+        public Criteria andDurationMsIn(List<Long> values) {
+            addCriterion("duration_ms in", values, "durationMs");
+            return (Criteria) this;
+        }
+
+        public Criteria andDurationMsNotIn(List<Long> values) {
+            addCriterion("duration_ms not in", values, "durationMs");
+            return (Criteria) this;
+        }
+
+        public Criteria andDurationMsBetween(Long value1, Long value2) {
+            addCriterion("duration_ms between", value1, value2, "durationMs");
+            return (Criteria) this;
+        }
+
+        public Criteria andDurationMsNotBetween(Long value1, Long value2) {
+            addCriterion("duration_ms not between", value1, value2, "durationMs");
+            return (Criteria) this;
+        }
+
+        public Criteria andFetchedCountIsNull() {
+            addCriterion("fetched_count is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFetchedCountIsNotNull() {
+            addCriterion("fetched_count is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFetchedCountEqualTo(Integer value) {
+            addCriterion("fetched_count =", value, "fetchedCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFetchedCountNotEqualTo(Integer value) {
+            addCriterion("fetched_count <>", value, "fetchedCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFetchedCountGreaterThan(Integer value) {
+            addCriterion("fetched_count >", value, "fetchedCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFetchedCountGreaterThanOrEqualTo(Integer value) {
+            addCriterion("fetched_count >=", value, "fetchedCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFetchedCountLessThan(Integer value) {
+            addCriterion("fetched_count <", value, "fetchedCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFetchedCountLessThanOrEqualTo(Integer value) {
+            addCriterion("fetched_count <=", value, "fetchedCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFetchedCountIn(List<Integer> values) {
+            addCriterion("fetched_count in", values, "fetchedCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFetchedCountNotIn(List<Integer> values) {
+            addCriterion("fetched_count not in", values, "fetchedCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFetchedCountBetween(Integer value1, Integer value2) {
+            addCriterion("fetched_count between", value1, value2, "fetchedCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFetchedCountNotBetween(Integer value1, Integer value2) {
+            addCriterion("fetched_count not between", value1, value2, "fetchedCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSuccessCountIsNull() {
+            addCriterion("success_count is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSuccessCountIsNotNull() {
+            addCriterion("success_count is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSuccessCountEqualTo(Integer value) {
+            addCriterion("success_count =", value, "successCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSuccessCountNotEqualTo(Integer value) {
+            addCriterion("success_count <>", value, "successCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSuccessCountGreaterThan(Integer value) {
+            addCriterion("success_count >", value, "successCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSuccessCountGreaterThanOrEqualTo(Integer value) {
+            addCriterion("success_count >=", value, "successCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSuccessCountLessThan(Integer value) {
+            addCriterion("success_count <", value, "successCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSuccessCountLessThanOrEqualTo(Integer value) {
+            addCriterion("success_count <=", value, "successCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSuccessCountIn(List<Integer> values) {
+            addCriterion("success_count in", values, "successCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSuccessCountNotIn(List<Integer> values) {
+            addCriterion("success_count not in", values, "successCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSuccessCountBetween(Integer value1, Integer value2) {
+            addCriterion("success_count between", value1, value2, "successCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSuccessCountNotBetween(Integer value1, Integer value2) {
+            addCriterion("success_count not between", value1, value2, "successCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFailCountIsNull() {
+            addCriterion("fail_count is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFailCountIsNotNull() {
+            addCriterion("fail_count is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFailCountEqualTo(Integer value) {
+            addCriterion("fail_count =", value, "failCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFailCountNotEqualTo(Integer value) {
+            addCriterion("fail_count <>", value, "failCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFailCountGreaterThan(Integer value) {
+            addCriterion("fail_count >", value, "failCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFailCountGreaterThanOrEqualTo(Integer value) {
+            addCriterion("fail_count >=", value, "failCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFailCountLessThan(Integer value) {
+            addCriterion("fail_count <", value, "failCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFailCountLessThanOrEqualTo(Integer value) {
+            addCriterion("fail_count <=", value, "failCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFailCountIn(List<Integer> values) {
+            addCriterion("fail_count in", values, "failCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFailCountNotIn(List<Integer> values) {
+            addCriterion("fail_count not in", values, "failCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFailCountBetween(Integer value1, Integer value2) {
+            addCriterion("fail_count between", value1, value2, "failCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFailCountNotBetween(Integer value1, Integer value2) {
+            addCriterion("fail_count not between", value1, value2, "failCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNull() {
+            addCriterion("create_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNotNull() {
+            addCriterion("create_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeEqualTo(Date value) {
+            addCriterion("create_time =", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotEqualTo(Date value) {
+            addCriterion("create_time <>", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThan(Date value) {
+            addCriterion("create_time >", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("create_time >=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThan(Date value) {
+            addCriterion("create_time <", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("create_time <=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIn(List<Date> values) {
+            addCriterion("create_time in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotIn(List<Date> values) {
+            addCriterion("create_time not in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeBetween(Date value1, Date value2) {
+            addCriterion("create_time between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("create_time not between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIsNull() {
+            addCriterion("update_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIsNotNull() {
+            addCriterion("update_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeEqualTo(Date value) {
+            addCriterion("update_time =", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotEqualTo(Date value) {
+            addCriterion("update_time <>", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThan(Date value) {
+            addCriterion("update_time >", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("update_time >=", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThan(Date value) {
+            addCriterion("update_time <", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("update_time <=", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIn(List<Date> values) {
+            addCriterion("update_time in", values, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotIn(List<Date> values) {
+            addCriterion("update_time not in", values, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeBetween(Date value1, Date value2) {
+            addCriterion("update_time between", value1, value2, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("update_time not between", value1, value2, "updateTime");
+            return (Criteria) this;
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table spider_task
+     *
+     * @mbg.generated do_not_delete_during_merge Sat Oct 11 19:37:24 CST 2025
+     */
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table spider_task
+     *
+     * @mbg.generated Sat Oct 11 19:37:24 CST 2025
+     */
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 10 - 0
core/src/main/java/com/tzld/supply/service/SpiderTaskService.java

@@ -0,0 +1,10 @@
+package com.tzld.supply.service;
+
+import com.tzld.supply.model.po.spider.SpiderTask;
+
+import java.util.List;
+
+public interface SpiderTaskService {
+    // 获取 spider_task 列表
+    List<SpiderTask> getSpiderTaskList();
+}

+ 23 - 0
core/src/main/java/com/tzld/supply/service/impl/SpiderTaskServiceImpl.java

@@ -0,0 +1,23 @@
+package com.tzld.supply.service.impl;
+
+import com.tzld.supply.dao.mapper.supply.spider.SpiderTaskMapper;
+import com.tzld.supply.model.po.spider.SpiderTask;
+import com.tzld.supply.model.po.spider.SpiderTaskExample;
+import com.tzld.supply.service.SpiderTaskService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+@Service // 标记为服务层组件
+public class SpiderTaskServiceImpl implements SpiderTaskService {
+
+    @Resource // 注入 Mapper
+    private SpiderTaskMapper spiderTaskMapper;
+
+    @Override
+    public List<SpiderTask> getSpiderTaskList() {
+        // 调用 Mapper 查询列表
+        return spiderTaskMapper.selectByExample(new SpiderTaskExample());
+    }
+}

+ 5 - 5
core/src/main/resources/generator/mybatis-agent-generator-config.xml → core/src/main/resources/generator/mybatis-spider-generator-config.xml

@@ -24,7 +24,7 @@
         </commentGenerator>
 
         <jdbcConnection driverClass="com.mysql.jdbc.Driver"
-                        connectionURL="jdbc:mysql://rm-bp13g3ra2f59q49xs.mysql.singapore.rds.aliyuncs.com:3306/ai-supply?useUnicode=true&amp;characterEncoding=utf-8&amp;zeroDateTimeBehavior=convertToNull&amp;useSSL=false"
+                        connectionURL="jdbc:mysql://rm-bp13g3ra2f59q49xs.mysql.rds.aliyuncs.com:3306/ai_supply?useUnicode=true&amp;characterEncoding=utf-8&amp;zeroDateTimeBehavior=convertToNull&amp;useSSL=false"
                         userId="wqsd" password="wqsd@2025">
         </jdbcConnection>
 
@@ -32,21 +32,21 @@
             <property name="forceBigDecimals" value="false"/>
         </javaTypeResolver>
 
-        <javaModelGenerator targetPackage="com.tzld.piaoquan.supply.model.po.agent" targetProject="core/src/main/java">
+        <javaModelGenerator targetPackage="com.tzld.supply.model.po.spider" targetProject="core/src/main/java">
             <property name="constructorBased" value="false"/>
             <property name="enableSubPackages" value="true"/>
             <property name="immutable" value="false"/>
         </javaModelGenerator>
 
-        <sqlMapGenerator targetPackage="mapper.agent" targetProject="core/src/main/resources">
+        <sqlMapGenerator targetPackage="mapper.supply.spider" targetProject="core/src/main/resources">
             <property name="enableSubPackages" value="true"/>
         </sqlMapGenerator>
 
-        <javaClientGenerator targetPackage="com.tzld.piaoquan.supply.dao.mapper.agent" type="XMLMAPPER" targetProject="core/src/main/java">
+        <javaClientGenerator targetPackage="com.tzld.supply.dao.mapper.supply.spider" type="XMLMAPPER" targetProject="core/src/main/java">
             <property name="enableSubPackages" value="true"/>
         </javaClientGenerator>
 
-        <table tableName="agent_execute_detail_tokens" domainObjectName="" alias=""/>
+        <table tableName="spider_task" domainObjectName="" alias=""/>
     </context>
 
 </generatorConfiguration>

+ 5 - 0
core/src/main/resources/mapper/supply/ArticleContentLinkMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.tzld.supply.mapper.supply.ArticleContentLinkMapper">
+
+</mapper>

+ 511 - 0
core/src/main/resources/mapper/supply/spider/SpiderTaskMapper.xml

@@ -0,0 +1,511 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.tzld.supply.dao.mapper.supply.spider.SpiderTaskMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.supply.model.po.spider.SpiderTask">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Sat Oct 11 19:37:24 CST 2025.
+    -->
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="task_code" jdbcType="VARCHAR" property="taskCode" />
+    <result column="task_name" jdbcType="VARCHAR" property="taskName" />
+    <result column="source_id" jdbcType="BIGINT" property="sourceId" />
+    <result column="status" jdbcType="TINYINT" property="status" />
+    <result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
+    <result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
+    <result column="duration_ms" jdbcType="BIGINT" property="durationMs" />
+    <result column="fetched_count" jdbcType="INTEGER" property="fetchedCount" />
+    <result column="success_count" jdbcType="INTEGER" property="successCount" />
+    <result column="fail_count" jdbcType="INTEGER" property="failCount" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+  </resultMap>
+  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.tzld.supply.model.po.spider.SpiderTask">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Sat Oct 11 19:37:24 CST 2025.
+    -->
+    <result column="error_message" jdbcType="LONGVARCHAR" property="errorMessage" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Sat Oct 11 19:37:24 CST 2025.
+    -->
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Sat Oct 11 19:37:24 CST 2025.
+    -->
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Sat Oct 11 19:37:24 CST 2025.
+    -->
+    id, task_code, task_name, source_id, `status`, start_time, end_time, duration_ms, 
+    fetched_count, success_count, fail_count, 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 Sat Oct 11 19:37:24 CST 2025.
+    -->
+    error_message
+  </sql>
+  <select id="selectByExampleWithBLOBs" parameterType="com.tzld.supply.model.po.spider.SpiderTaskExample" resultMap="ResultMapWithBLOBs">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Sat Oct 11 19:37:24 CST 2025.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from spider_task
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByExample" parameterType="com.tzld.supply.model.po.spider.SpiderTaskExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Sat Oct 11 19:37:24 CST 2025.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from spider_task
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Sat Oct 11 19:37:24 CST 2025.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from spider_task
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Sat Oct 11 19:37:24 CST 2025.
+    -->
+    delete from spider_task
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.supply.model.po.spider.SpiderTaskExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Sat Oct 11 19:37:24 CST 2025.
+    -->
+    delete from spider_task
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.supply.model.po.spider.SpiderTask">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Sat Oct 11 19:37:24 CST 2025.
+    -->
+    insert into spider_task (id, task_code, task_name, 
+      source_id, `status`, start_time, 
+      end_time, duration_ms, fetched_count, 
+      success_count, fail_count, create_time, 
+      update_time, error_message)
+    values (#{id,jdbcType=BIGINT}, #{taskCode,jdbcType=VARCHAR}, #{taskName,jdbcType=VARCHAR}, 
+      #{sourceId,jdbcType=BIGINT}, #{status,jdbcType=TINYINT}, #{startTime,jdbcType=TIMESTAMP}, 
+      #{endTime,jdbcType=TIMESTAMP}, #{durationMs,jdbcType=BIGINT}, #{fetchedCount,jdbcType=INTEGER}, 
+      #{successCount,jdbcType=INTEGER}, #{failCount,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{updateTime,jdbcType=TIMESTAMP}, #{errorMessage,jdbcType=LONGVARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.supply.model.po.spider.SpiderTask">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Sat Oct 11 19:37:24 CST 2025.
+    -->
+    insert into spider_task
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="taskCode != null">
+        task_code,
+      </if>
+      <if test="taskName != null">
+        task_name,
+      </if>
+      <if test="sourceId != null">
+        source_id,
+      </if>
+      <if test="status != null">
+        `status`,
+      </if>
+      <if test="startTime != null">
+        start_time,
+      </if>
+      <if test="endTime != null">
+        end_time,
+      </if>
+      <if test="durationMs != null">
+        duration_ms,
+      </if>
+      <if test="fetchedCount != null">
+        fetched_count,
+      </if>
+      <if test="successCount != null">
+        success_count,
+      </if>
+      <if test="failCount != null">
+        fail_count,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="updateTime != null">
+        update_time,
+      </if>
+      <if test="errorMessage != null">
+        error_message,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=BIGINT},
+      </if>
+      <if test="taskCode != null">
+        #{taskCode,jdbcType=VARCHAR},
+      </if>
+      <if test="taskName != null">
+        #{taskName,jdbcType=VARCHAR},
+      </if>
+      <if test="sourceId != null">
+        #{sourceId,jdbcType=BIGINT},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=TINYINT},
+      </if>
+      <if test="startTime != null">
+        #{startTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="endTime != null">
+        #{endTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="durationMs != null">
+        #{durationMs,jdbcType=BIGINT},
+      </if>
+      <if test="fetchedCount != null">
+        #{fetchedCount,jdbcType=INTEGER},
+      </if>
+      <if test="successCount != null">
+        #{successCount,jdbcType=INTEGER},
+      </if>
+      <if test="failCount != null">
+        #{failCount,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="errorMessage != null">
+        #{errorMessage,jdbcType=LONGVARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.tzld.supply.model.po.spider.SpiderTaskExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Sat Oct 11 19:37:24 CST 2025.
+    -->
+    select count(*) from spider_task
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Sat Oct 11 19:37:24 CST 2025.
+    -->
+    update spider_task
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.taskCode != null">
+        task_code = #{record.taskCode,jdbcType=VARCHAR},
+      </if>
+      <if test="record.taskName != null">
+        task_name = #{record.taskName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.sourceId != null">
+        source_id = #{record.sourceId,jdbcType=BIGINT},
+      </if>
+      <if test="record.status != null">
+        `status` = #{record.status,jdbcType=TINYINT},
+      </if>
+      <if test="record.startTime != null">
+        start_time = #{record.startTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.endTime != null">
+        end_time = #{record.endTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.durationMs != null">
+        duration_ms = #{record.durationMs,jdbcType=BIGINT},
+      </if>
+      <if test="record.fetchedCount != null">
+        fetched_count = #{record.fetchedCount,jdbcType=INTEGER},
+      </if>
+      <if test="record.successCount != null">
+        success_count = #{record.successCount,jdbcType=INTEGER},
+      </if>
+      <if test="record.failCount != null">
+        fail_count = #{record.failCount,jdbcType=INTEGER},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.updateTime != null">
+        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.errorMessage != null">
+        error_message = #{record.errorMessage,jdbcType=LONGVARCHAR},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExampleWithBLOBs" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Sat Oct 11 19:37:24 CST 2025.
+    -->
+    update spider_task
+    set id = #{record.id,jdbcType=BIGINT},
+      task_code = #{record.taskCode,jdbcType=VARCHAR},
+      task_name = #{record.taskName,jdbcType=VARCHAR},
+      source_id = #{record.sourceId,jdbcType=BIGINT},
+      `status` = #{record.status,jdbcType=TINYINT},
+      start_time = #{record.startTime,jdbcType=TIMESTAMP},
+      end_time = #{record.endTime,jdbcType=TIMESTAMP},
+      duration_ms = #{record.durationMs,jdbcType=BIGINT},
+      fetched_count = #{record.fetchedCount,jdbcType=INTEGER},
+      success_count = #{record.successCount,jdbcType=INTEGER},
+      fail_count = #{record.failCount,jdbcType=INTEGER},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      error_message = #{record.errorMessage,jdbcType=LONGVARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Sat Oct 11 19:37:24 CST 2025.
+    -->
+    update spider_task
+    set id = #{record.id,jdbcType=BIGINT},
+      task_code = #{record.taskCode,jdbcType=VARCHAR},
+      task_name = #{record.taskName,jdbcType=VARCHAR},
+      source_id = #{record.sourceId,jdbcType=BIGINT},
+      `status` = #{record.status,jdbcType=TINYINT},
+      start_time = #{record.startTime,jdbcType=TIMESTAMP},
+      end_time = #{record.endTime,jdbcType=TIMESTAMP},
+      duration_ms = #{record.durationMs,jdbcType=BIGINT},
+      fetched_count = #{record.fetchedCount,jdbcType=INTEGER},
+      success_count = #{record.successCount,jdbcType=INTEGER},
+      fail_count = #{record.failCount,jdbcType=INTEGER},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      update_time = #{record.updateTime,jdbcType=TIMESTAMP}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.supply.model.po.spider.SpiderTask">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Sat Oct 11 19:37:24 CST 2025.
+    -->
+    update spider_task
+    <set>
+      <if test="taskCode != null">
+        task_code = #{taskCode,jdbcType=VARCHAR},
+      </if>
+      <if test="taskName != null">
+        task_name = #{taskName,jdbcType=VARCHAR},
+      </if>
+      <if test="sourceId != null">
+        source_id = #{sourceId,jdbcType=BIGINT},
+      </if>
+      <if test="status != null">
+        `status` = #{status,jdbcType=TINYINT},
+      </if>
+      <if test="startTime != null">
+        start_time = #{startTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="endTime != null">
+        end_time = #{endTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="durationMs != null">
+        duration_ms = #{durationMs,jdbcType=BIGINT},
+      </if>
+      <if test="fetchedCount != null">
+        fetched_count = #{fetchedCount,jdbcType=INTEGER},
+      </if>
+      <if test="successCount != null">
+        success_count = #{successCount,jdbcType=INTEGER},
+      </if>
+      <if test="failCount != null">
+        fail_count = #{failCount,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="errorMessage != null">
+        error_message = #{errorMessage,jdbcType=LONGVARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.tzld.supply.model.po.spider.SpiderTask">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Sat Oct 11 19:37:24 CST 2025.
+    -->
+    update spider_task
+    set task_code = #{taskCode,jdbcType=VARCHAR},
+      task_name = #{taskName,jdbcType=VARCHAR},
+      source_id = #{sourceId,jdbcType=BIGINT},
+      `status` = #{status,jdbcType=TINYINT},
+      start_time = #{startTime,jdbcType=TIMESTAMP},
+      end_time = #{endTime,jdbcType=TIMESTAMP},
+      duration_ms = #{durationMs,jdbcType=BIGINT},
+      fetched_count = #{fetchedCount,jdbcType=INTEGER},
+      success_count = #{successCount,jdbcType=INTEGER},
+      fail_count = #{failCount,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_time = #{updateTime,jdbcType=TIMESTAMP},
+      error_message = #{errorMessage,jdbcType=LONGVARCHAR}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.tzld.supply.model.po.spider.SpiderTask">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Sat Oct 11 19:37:24 CST 2025.
+    -->
+    update spider_task
+    set task_code = #{taskCode,jdbcType=VARCHAR},
+      task_name = #{taskName,jdbcType=VARCHAR},
+      source_id = #{sourceId,jdbcType=BIGINT},
+      `status` = #{status,jdbcType=TINYINT},
+      start_time = #{startTime,jdbcType=TIMESTAMP},
+      end_time = #{endTime,jdbcType=TIMESTAMP},
+      duration_ms = #{durationMs,jdbcType=BIGINT},
+      fetched_count = #{fetchedCount,jdbcType=INTEGER},
+      success_count = #{successCount,jdbcType=INTEGER},
+      fail_count = #{failCount,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_time = #{updateTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 16 - 3
server/src/main/java/com/tzld/supply/Application.java

@@ -1,20 +1,33 @@
 package com.tzld.supply;
 
+import com.tzld.supply.interceptor.CrosDomainAllowInterceptor;
 import org.mybatis.spring.annotation.MapperScan;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.web.servlet.ServletComponentScan;
 import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
 import org.springframework.cloud.openfeign.EnableFeignClients;
-import org.springframework.context.annotation.ComponentScan;
+import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 
 @SpringBootApplication
 @MapperScan("com.tzld.supply.dao")
 @ServletComponentScan("com.tzld.supply.controller")
 @EnableDiscoveryClient
 @EnableFeignClients
-public class Application {  // 新类名:Application
+public class Application implements WebMvcConfigurer {
+
+    private static final Logger LOGGER = LoggerFactory.getLogger(Application.class);
+
     public static void main(String[] args) {
-        SpringApplication.run(Application.class, args);  // IDEA 自动更新此处的类名引用
+        SpringApplication.run(Application.class, args);
+        LOGGER.info("supply-server Start Success");
+    }
+
+    @Override
+    public void addInterceptors(InterceptorRegistry registry) {
+        registry.addInterceptor(new CrosDomainAllowInterceptor()).addPathPatterns("/**");
     }
 }

+ 27 - 0
server/src/main/java/com/tzld/supply/controller/SpiderTaskController.java

@@ -0,0 +1,27 @@
+package com.tzld.supply.controller;
+
+import com.tzld.supply.common.base.CommonResponse;
+import com.tzld.supply.model.po.spider.SpiderTask;
+import com.tzld.supply.service.SpiderTaskService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+@RestController
+@RequestMapping("/api/spider-tasks")
+public class SpiderTaskController {
+
+    @Autowired
+    private SpiderTaskService spiderTaskService;
+
+
+    @GetMapping("/list")
+    public CommonResponse<List<SpiderTask>> getSpiderTaskList() {
+        List<SpiderTask> taskList = spiderTaskService.getSpiderTaskList();
+        // 包装为统一响应格式返回
+        return CommonResponse.success(taskList);
+    }
+}

+ 10 - 9
server/src/main/resources/application-dev.yml

@@ -3,15 +3,16 @@ server:
 
 spring:
   datasource:
-    driver-class-name: com.mysql.jdbc.Driver
-    url: jdbc:mysql://rm-bp13g3ra2f59q49xs.mysql.singapore.rds.aliyuncs.com:3306/ai_supply?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull
-    username: wqsd
-    password: wqsd@2025
-    type: com.zaxxer.hikari.HikariDataSource
-    hikari:
-      minimum-idle: 10
-      maximum-pool-size: 20
-      connection-test-query: SELECT 1
+    supply:
+      driver-class-name: com.mysql.jdbc.Driver
+      jdbc-url: jdbc:mysql://rm-bp13g3ra2f59q49xs.mysql.rds.aliyuncs.com:3306/ai_supply?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false
+      username: wqsd
+      password: wqsd@2025
+      type: com.zaxxer.hikari.HikariDataSource
+      hikari:
+        minimum-idle: 10
+        maximum-pool-size: 20
+        connection-test-query: SELECT 1
 
   redis:
     hostName: r-t4n023zec9wyjeer0spd.redis.singapore.rds.aliyuncs.com

+ 10 - 9
server/src/main/resources/application-prod.yml

@@ -3,15 +3,16 @@ server:
 
 spring:
   datasource:
-    driver-class-name: com.mysql.jdbc.Driver
-    url: jdbc:mysql://rm-bp13g3ra2f59q49xs.mysql.singapore.rds.aliyuncs.com:3306/ai_supply?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull
-    username: wqsd
-    password: wqsd@2025
-    type: com.zaxxer.hikari.HikariDataSource
-    hikari:
-      minimum-idle: 10
-      maximum-pool-size: 100
-      connection-test-query: SELECT 1
+    supply:
+      driver-class-name: com.mysql.jdbc.Driver
+      jdbc-url: jdbc:mysql://rm-bp13g3ra2f59q49xs.mysql.rds.aliyuncs.com:3306/ai_supply?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false
+      username: wqsd
+      password: wqsd@2025
+      type: com.zaxxer.hikari.HikariDataSource
+      hikari:
+        minimum-idle: 10
+        maximum-pool-size: 20
+        connection-test-query: SELECT 1
 
   redis:
     hostName: r-t4n1ff4vv1j0u6xm2y.redis.singapore.rds.aliyuncs.com

+ 10 - 9
server/src/main/resources/application-test.yml

@@ -3,15 +3,16 @@ server:
 
 spring:
   datasource:
-    driver-class-name: com.mysql.jdbc.Driver
-    url: jdbc:mysql://rm-bp13g3ra2f59q49xs.mysql.singapore.rds.aliyuncs.com:3306/ai_supply?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull
-    username: wqsd
-    password: wqsd@2025
-    type: com.zaxxer.hikari.HikariDataSource
-    hikari:
-      minimum-idle: 10
-      maximum-pool-size: 20
-      connection-test-query: SELECT 1
+    supply:
+      driver-class-name: com.mysql.jdbc.Driver
+      jdbc-url: jdbc:mysql://rm-bp13g3ra2f59q49xs.mysql.rds.aliyuncs.com:3306/ai_supply?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false
+      username: wqsd
+      password: wqsd@2025
+      type: com.zaxxer.hikari.HikariDataSource
+      hikari:
+        minimum-idle: 10
+        maximum-pool-size: 20
+        connection-test-query: SELECT 1
 
   redis:
     hostName: r-t4n023zec9wyjeer0s.redis.singapore.rds.aliyuncs.com

+ 9 - 1
server/src/main/resources/application.yml

@@ -23,6 +23,7 @@ mybatis:
   configuration:
     use-generated-keys: true
     map-underscore-to-camel-case: true
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl  # 直接输出到控制台(简单调试用)
 
 app:
   id: supply-server  # 应用标识
@@ -53,4 +54,11 @@ eureka:
     lease-renewal-interval-in-seconds: 30  # 心跳续约间隔(秒)
     lease-expiration-duration-in-seconds: 90  # 心跳过期时间(秒)
   client:
-    registry-fetch-interval-seconds: 5  # 拉取服务注册列表间隔(秒)
+    registry-fetch-interval-seconds: 5  # 拉取服务注册列表间隔(秒)
+
+logging:
+  level:
+    # 替换为你的 Mapper 接口所在包路径(根据错误日志中的包名调整)
+    com.tzld.supply.dao.mapper.supply.spider: DEBUG  # 输出该包下所有 Mapper 的 SQL 日志
+    # 可选:HikariCP 连接池日志(调试连接问题时开启)
+    com.zaxxer.hikari: INFO  # 连接池基本信息(避免 DEBUG 级别日志过多)