temp定时任务修改
This commit is contained in:
@@ -1,120 +0,0 @@
|
||||
package org.xyzh.news.controller;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.xyzh.api.news.collection.DataCollectionService;
|
||||
import org.xyzh.common.core.domain.ResultDomain;
|
||||
import org.xyzh.common.dto.resource.TbDataCollectionConfig;
|
||||
import org.xyzh.common.dto.resource.TbDataCollectionLog;
|
||||
|
||||
/**
|
||||
* @description 数据采集控制器
|
||||
* @filename DataCollectionController.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/news/collection")
|
||||
public class DataCollectionController {
|
||||
private static final Logger logger = LoggerFactory.getLogger(DataCollectionController.class);
|
||||
|
||||
@Autowired
|
||||
private DataCollectionService dataCollectionService;
|
||||
|
||||
/**
|
||||
* 获取配置列表
|
||||
*/
|
||||
@GetMapping("/config/list")
|
||||
public ResultDomain<TbDataCollectionConfig> getConfigList(TbDataCollectionConfig filter) {
|
||||
return null;
|
||||
// return dataCollectionService.getConfigList(filter);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID获取配置详情
|
||||
*/
|
||||
@GetMapping("/config/{configID}")
|
||||
public ResultDomain<TbDataCollectionConfig> getConfigById(@PathVariable String configID) {
|
||||
return dataCollectionService.getConfigById(configID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建配置
|
||||
*/
|
||||
@PostMapping("/config/create")
|
||||
public ResultDomain<TbDataCollectionConfig> createConfig(@RequestBody TbDataCollectionConfig config) {
|
||||
return dataCollectionService.createConfig(config);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新配置
|
||||
*/
|
||||
@PutMapping("/config/update")
|
||||
public ResultDomain<TbDataCollectionConfig> updateConfig(@RequestBody TbDataCollectionConfig config) {
|
||||
return dataCollectionService.updateConfig(config);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除配置
|
||||
*/
|
||||
@DeleteMapping("/config/{configID}")
|
||||
public ResultDomain<Boolean> deleteConfig(@PathVariable String configID) {
|
||||
return dataCollectionService.deleteConfig(configID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新配置状态
|
||||
*/
|
||||
@PutMapping("/config/{configID}/status")
|
||||
public ResultDomain<TbDataCollectionConfig> updateConfigStatus(
|
||||
@PathVariable String configID,
|
||||
@RequestParam Integer status) {
|
||||
return dataCollectionService.updateConfigStatus(configID, status);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取日志列表
|
||||
*/
|
||||
@GetMapping("/log/list")
|
||||
public ResultDomain<TbDataCollectionLog> getLogList(TbDataCollectionLog filter) {
|
||||
return null;
|
||||
// return dataCollectionService.getLogList(filter);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID获取日志详情
|
||||
*/
|
||||
@GetMapping("/log/{logID}")
|
||||
public ResultDomain<TbDataCollectionLog> getLogById(@PathVariable String logID) {
|
||||
return dataCollectionService.getLogById(logID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建日志
|
||||
*/
|
||||
@PostMapping("/log/create")
|
||||
public ResultDomain<TbDataCollectionLog> createLog(@RequestBody TbDataCollectionLog log) {
|
||||
return dataCollectionService.createLog(log);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除日志
|
||||
*/
|
||||
@DeleteMapping("/log/{logID}")
|
||||
public ResultDomain<Boolean> deleteLog(@PathVariable String logID) {
|
||||
return null;
|
||||
// return dataCollectionService.deleteLog(logID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取活跃配置
|
||||
*/
|
||||
@GetMapping("/active")
|
||||
public ResultDomain<TbDataCollectionLog> getActiveConfigs() {
|
||||
return null;
|
||||
// return dataCollectionService.getActiveConfigs();
|
||||
}
|
||||
}
|
||||
@@ -1,253 +0,0 @@
|
||||
package org.xyzh.news.controller;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.xyzh.common.core.domain.ResultDomain;
|
||||
import org.xyzh.common.dto.resource.TbResource;
|
||||
import org.xyzh.common.dto.resource.TbDataCollectionConfig;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @description 资源管理控制器
|
||||
* @filename ResourceManagementController.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/news/management")
|
||||
public class ResourceManagementController {
|
||||
private static final Logger logger = LoggerFactory.getLogger(ResourceManagementController.class);
|
||||
|
||||
// ==================== 数据采集管理 ====================
|
||||
|
||||
/**
|
||||
* 配置采集来源
|
||||
*/
|
||||
@PostMapping("/collection/config-source")
|
||||
public ResultDomain<TbDataCollectionConfig> configCollectionSource(@RequestBody Map<String, Object> configData) {
|
||||
// TODO: 实现配置采集来源
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置采集频率
|
||||
*/
|
||||
@PutMapping("/collection/frequency")
|
||||
public ResultDomain<Boolean> setCollectionFrequency(@RequestBody Map<String, Object> params) {
|
||||
// TODO: 实现设置采集频率(天/周)
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 手动触发采集
|
||||
*/
|
||||
@PostMapping("/collection/manual-trigger")
|
||||
public ResultDomain<Boolean> manualTriggerCollection(@RequestParam String configID) {
|
||||
// TODO: 实现手动触发采集
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取采集配置列表
|
||||
*/
|
||||
@GetMapping("/collection/config-list")
|
||||
public ResultDomain<TbDataCollectionConfig> getCollectionConfigList() {
|
||||
// TODO: 实现获取采集配置列表
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新采集配置
|
||||
*/
|
||||
@PutMapping("/collection/config-update")
|
||||
public ResultDomain<TbDataCollectionConfig> updateCollectionConfig(@RequestBody TbDataCollectionConfig config) {
|
||||
// TODO: 实现更新采集配置
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除采集配置
|
||||
*/
|
||||
@DeleteMapping("/collection/config/{configID}")
|
||||
public ResultDomain<Boolean> deleteCollectionConfig(@PathVariable String configID) {
|
||||
// TODO: 实现删除采集配置
|
||||
return null;
|
||||
}
|
||||
|
||||
// ==================== 文章编辑管理 ====================
|
||||
|
||||
/**
|
||||
* 手动新建文章
|
||||
*/
|
||||
@PostMapping("/article/create")
|
||||
public ResultDomain<TbResource> createArticle(@RequestBody Map<String, Object> articleData) {
|
||||
// TODO: 实现手动新建文章(富文本编辑器,插入图片/链接)
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑文章内容
|
||||
*/
|
||||
@PutMapping("/article/edit")
|
||||
public ResultDomain<TbResource> editArticle(@RequestBody TbResource article) {
|
||||
// TODO: 实现编辑文章内容
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除文章
|
||||
*/
|
||||
@DeleteMapping("/article/{articleID}")
|
||||
public ResultDomain<Boolean> deleteArticle(@PathVariable String articleID) {
|
||||
// TODO: 实现删除文章
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置文章状态
|
||||
*/
|
||||
@PutMapping("/article/status")
|
||||
public ResultDomain<Boolean> setArticleStatus(@RequestBody Map<String, Object> params) {
|
||||
// TODO: 实现设置文章状态(草稿/已发布)
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传文章图片
|
||||
*/
|
||||
@PostMapping("/article/upload-image")
|
||||
public ResultDomain<String> uploadArticleImage(@RequestParam("file") String file) {
|
||||
// TODO: 实现上传文章图片
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 插入文章链接
|
||||
*/
|
||||
@PutMapping("/article/insert-link")
|
||||
public ResultDomain<Boolean> insertArticleLink(@RequestBody Map<String, Object> params) {
|
||||
// TODO: 实现插入文章链接
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取文章编辑历史
|
||||
*/
|
||||
@GetMapping("/article/edit-history/{articleID}")
|
||||
public ResultDomain<Map<String, Object>> getArticleEditHistory(@PathVariable String articleID) {
|
||||
// TODO: 实现获取文章编辑历史
|
||||
return null;
|
||||
}
|
||||
|
||||
// ==================== 数据记录管理 ====================
|
||||
|
||||
/**
|
||||
* 记录数据采集信息
|
||||
*/
|
||||
@PostMapping("/record/collection")
|
||||
public ResultDomain<Boolean> recordCollectionData(@RequestBody Map<String, Object> recordData) {
|
||||
// TODO: 实现记录数据采集时间、采集数量、采集状态
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 记录文章发布信息
|
||||
*/
|
||||
@PostMapping("/record/publish")
|
||||
public ResultDomain<Boolean> recordPublishData(@RequestBody Map<String, Object> publishData) {
|
||||
// TODO: 实现记录文章发布时间、发布人、修改记录
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取采集记录列表
|
||||
*/
|
||||
@GetMapping("/record/collection-list")
|
||||
public ResultDomain<Map<String, Object>> getCollectionRecordList(
|
||||
@RequestParam(required = false) Date startDate,
|
||||
@RequestParam(required = false) Date endDate) {
|
||||
// TODO: 实现获取采集记录列表
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取发布记录列表
|
||||
*/
|
||||
@GetMapping("/record/publish-list")
|
||||
public ResultDomain<Map<String, Object>> getPublishRecordList(
|
||||
@RequestParam(required = false) String publisher,
|
||||
@RequestParam(required = false) Date startDate,
|
||||
@RequestParam(required = false) Date endDate) {
|
||||
// TODO: 实现获取发布记录列表
|
||||
return null;
|
||||
}
|
||||
|
||||
// ==================== 自动发布管理 ====================
|
||||
|
||||
/**
|
||||
* 配置文章自动发布时间
|
||||
*/
|
||||
@PutMapping("/auto-publish/schedule")
|
||||
public ResultDomain<Boolean> scheduleAutoPublish(@RequestBody Map<String, Object> scheduleData) {
|
||||
// TODO: 实现配置文章自动发布时间
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置发布前核验规则
|
||||
*/
|
||||
@PutMapping("/auto-publish/verification")
|
||||
public ResultDomain<Boolean> setVerificationRules(@RequestBody Map<String, Object> rules) {
|
||||
// TODO: 实现设置发布前核验规则(如内容审核)
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 配置通知方式
|
||||
*/
|
||||
@PutMapping("/auto-publish/notification")
|
||||
public ResultDomain<Boolean> configNotification(@RequestBody Map<String, Object> notificationConfig) {
|
||||
// TODO: 实现设置通知方式(邮件/站内信)、提醒格式
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 开启/关闭自动发布
|
||||
*/
|
||||
@PutMapping("/auto-publish/toggle")
|
||||
public ResultDomain<Boolean> toggleAutoPublish(@RequestBody Map<String, Object> params) {
|
||||
// TODO: 实现支持关闭自动发布
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取自动发布配置
|
||||
*/
|
||||
@GetMapping("/auto-publish/config")
|
||||
public ResultDomain<Map<String, Object>> getAutoPublishConfig() {
|
||||
// TODO: 实现获取自动发布配置
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取自动发布任务列表
|
||||
*/
|
||||
@GetMapping("/auto-publish/task-list")
|
||||
public ResultDomain<Map<String, Object>> getAutoPublishTaskList() {
|
||||
// TODO: 实现获取自动发布任务列表
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 手动执行自动发布任务
|
||||
*/
|
||||
@PostMapping("/auto-publish/execute")
|
||||
public ResultDomain<Boolean> executeAutoPublishTask(@RequestParam String taskID) {
|
||||
// TODO: 实现手动执行自动发布任务
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,147 +0,0 @@
|
||||
package org.xyzh.news.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.xyzh.common.core.page.PageParam;
|
||||
import org.xyzh.common.dto.resource.TbDataCollectionConfig;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description DataCollectionConfigMapper.java文件描述 数据采集配置数据访问层
|
||||
* @filename DataCollectionConfigMapper.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
@Mapper
|
||||
public interface DataCollectionConfigMapper extends BaseMapper<TbDataCollectionConfig> {
|
||||
|
||||
/**
|
||||
* @description 查询数据采集配置列表
|
||||
* @param filter 过滤条件
|
||||
* @return List<TbDataCollectionConfig> 数据采集配置列表
|
||||
* @author yslg
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
List<TbDataCollectionConfig> selectDataCollectionConfigs(TbDataCollectionConfig filter);
|
||||
|
||||
/**
|
||||
* @description 根据配置ID查询配置信息
|
||||
* @param configId 配置ID
|
||||
* @return TbDataCollectionConfig 配置信息
|
||||
* @author yslg
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
TbDataCollectionConfig selectByConfigId(@Param("configId") String configId);
|
||||
|
||||
/**
|
||||
* @description 根据名称查询配置
|
||||
* @param name 配置名称
|
||||
* @return TbDataCollectionConfig 配置信息
|
||||
* @author yslg
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
TbDataCollectionConfig selectByName(@Param("name") String name);
|
||||
|
||||
/**
|
||||
* @description 根据状态查询配置列表
|
||||
* @param status 状态
|
||||
* @return List<TbDataCollectionConfig> 配置列表
|
||||
* @author yslg
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
List<TbDataCollectionConfig> selectByStatus(@Param("status") Integer status);
|
||||
|
||||
/**
|
||||
* @description 根据类型查询配置列表
|
||||
* @param type 类型
|
||||
* @return List<TbDataCollectionConfig> 配置列表
|
||||
* @author yslg
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
List<TbDataCollectionConfig> selectByType(@Param("type") Integer type);
|
||||
|
||||
/**
|
||||
* @description 查询启用的配置列表
|
||||
* @return List<TbDataCollectionConfig> 配置列表
|
||||
* @author yslg
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
List<TbDataCollectionConfig> selectActiveConfigs();
|
||||
|
||||
/**
|
||||
* @description 检查配置名称是否存在
|
||||
* @param name 配置名称
|
||||
* @param excludeId 排除的配置ID(用于更新时排除自身)
|
||||
* @return int 存在的数量
|
||||
* @author yslg
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
int countByName(@Param("name") String name, @Param("excludeId") String excludeId);
|
||||
|
||||
/**
|
||||
* @description 插入数据采集配置
|
||||
* @param dataCollectionConfig 数据采集配置
|
||||
* @return int 影响行数
|
||||
* @author yslg
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
int insertDataCollectionConfig(TbDataCollectionConfig dataCollectionConfig);
|
||||
|
||||
/**
|
||||
* @description 更新数据采集配置
|
||||
* @param dataCollectionConfig 数据采集配置
|
||||
* @return int 影响行数
|
||||
* @author yslg
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
int updateDataCollectionConfig(TbDataCollectionConfig dataCollectionConfig);
|
||||
|
||||
/**
|
||||
* @description 删除数据采集配置
|
||||
* @param dataCollectionConfig 数据采集配置
|
||||
* @return int 影响行数
|
||||
* @author yslg
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
int deleteDataCollectionConfig(TbDataCollectionConfig dataCollectionConfig);
|
||||
|
||||
/**
|
||||
* @description 批量插入数据采集配置
|
||||
* @param dataCollectionConfigList 数据采集配置列表
|
||||
* @return int 影响行数
|
||||
* @author yslg
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
int batchInsertDataCollectionConfigs(@Param("dataCollectionConfigList") List<TbDataCollectionConfig> dataCollectionConfigList);
|
||||
|
||||
/**
|
||||
* @description 批量删除数据采集配置
|
||||
* @param ids 配置ID列表
|
||||
* @return int 影响行数
|
||||
* @author yslg
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
int batchDeleteDataCollectionConfigs(@Param("ids") List<String> ids);
|
||||
|
||||
/**
|
||||
* @description 分页查询数据采集配置
|
||||
* @param filter 过滤条件
|
||||
* @param pageParam 分页参数
|
||||
* @return List<TbDataCollectionConfig> 数据采集配置列表
|
||||
* @author yslg
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
List<TbDataCollectionConfig> selectDataCollectionConfigsPage(@Param("filter") TbDataCollectionConfig filter, @Param("pageParam") PageParam pageParam);
|
||||
|
||||
/**
|
||||
* @description 统计数据采集配置总数
|
||||
* @param filter 过滤条件
|
||||
* @return long 总数
|
||||
* @author yslg
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
long countDataCollectionConfigs(@Param("filter") TbDataCollectionConfig filter);
|
||||
}
|
||||
@@ -1,147 +0,0 @@
|
||||
package org.xyzh.news.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.xyzh.common.core.page.PageParam;
|
||||
import org.xyzh.common.dto.resource.TbDataCollectionLog;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description DataCollectionLogMapper.java文件描述 数据采集记录数据访问层
|
||||
* @filename DataCollectionLogMapper.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
@Mapper
|
||||
public interface DataCollectionLogMapper extends BaseMapper<TbDataCollectionLog> {
|
||||
|
||||
/**
|
||||
* @description 查询数据采集记录列表
|
||||
* @param filter 过滤条件
|
||||
* @return List<TbDataCollectionLog> 数据采集记录列表
|
||||
* @author yslg
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
List<TbDataCollectionLog> selectDataCollectionLogs(TbDataCollectionLog filter);
|
||||
|
||||
/**
|
||||
* @description 根据记录ID查询记录信息
|
||||
* @param logId 记录ID
|
||||
* @return TbDataCollectionLog 记录信息
|
||||
* @author yslg
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
TbDataCollectionLog selectByLogId(@Param("logId") String logId);
|
||||
|
||||
/**
|
||||
* @description 根据配置ID查询记录列表
|
||||
* @param configId 配置ID
|
||||
* @return List<TbDataCollectionLog> 记录列表
|
||||
* @author yslg
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
List<TbDataCollectionLog> selectByConfigId(@Param("configId") String configId);
|
||||
|
||||
/**
|
||||
* @description 根据状态查询记录列表
|
||||
* @param status 状态
|
||||
* @return List<TbDataCollectionLog> 记录列表
|
||||
* @author yslg
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
List<TbDataCollectionLog> selectByStatus(@Param("status") Integer status);
|
||||
|
||||
/**
|
||||
* @description 根据类型查询记录列表
|
||||
* @param type 类型
|
||||
* @return List<TbDataCollectionLog> 记录列表
|
||||
* @author yslg
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
List<TbDataCollectionLog> selectByType(@Param("type") Integer type);
|
||||
|
||||
/**
|
||||
* @description 查询最新的记录列表
|
||||
* @param limit 限制数量
|
||||
* @return List<TbDataCollectionLog> 记录列表
|
||||
* @author yslg
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
List<TbDataCollectionLog> selectLatestLogs(@Param("limit") Integer limit);
|
||||
|
||||
/**
|
||||
* @description 查询采集统计信息
|
||||
* @param configId 配置ID
|
||||
* @return TbDataCollectionLog 统计信息
|
||||
* @author yslg
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
TbDataCollectionLog selectCollectionStatistics(@Param("configId") String configId);
|
||||
|
||||
/**
|
||||
* @description 插入数据采集记录
|
||||
* @param dataCollectionLog 数据采集记录
|
||||
* @return int 影响行数
|
||||
* @author yslg
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
int insertDataCollectionLog(TbDataCollectionLog dataCollectionLog);
|
||||
|
||||
/**
|
||||
* @description 更新数据采集记录
|
||||
* @param dataCollectionLog 数据采集记录
|
||||
* @return int 影响行数
|
||||
* @author yslg
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
int updateDataCollectionLog(TbDataCollectionLog dataCollectionLog);
|
||||
|
||||
/**
|
||||
* @description 删除数据采集记录
|
||||
* @param dataCollectionLog 数据采集记录
|
||||
* @return int 影响行数
|
||||
* @author yslg
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
int deleteDataCollectionLog(TbDataCollectionLog dataCollectionLog);
|
||||
|
||||
/**
|
||||
* @description 批量插入数据采集记录
|
||||
* @param dataCollectionLogList 数据采集记录列表
|
||||
* @return int 影响行数
|
||||
* @author yslg
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
int batchInsertDataCollectionLogs(@Param("dataCollectionLogList") List<TbDataCollectionLog> dataCollectionLogList);
|
||||
|
||||
/**
|
||||
* @description 批量删除数据采集记录
|
||||
* @param ids 记录ID列表
|
||||
* @return int 影响行数
|
||||
* @author yslg
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
int batchDeleteDataCollectionLogs(@Param("ids") List<String> ids);
|
||||
|
||||
/**
|
||||
* @description 分页查询数据采集记录
|
||||
* @param filter 过滤条件
|
||||
* @param pageParam 分页参数
|
||||
* @return List<TbDataCollectionLog> 数据采集记录列表
|
||||
* @author yslg
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
List<TbDataCollectionLog> selectDataCollectionLogsPage(@Param("filter") TbDataCollectionLog filter, @Param("pageParam") PageParam pageParam);
|
||||
|
||||
/**
|
||||
* @description 统计数据采集记录总数
|
||||
* @param filter 过滤条件
|
||||
* @return long 总数
|
||||
* @author yslg
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
long countDataCollectionLogs(@Param("filter") TbDataCollectionLog filter);
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
package org.xyzh.news.service;
|
||||
|
||||
import org.xyzh.api.news.collection.DataCollectionService;
|
||||
|
||||
/**
|
||||
* @description 数据采集服务接口
|
||||
* @filename NCDataCollectionService.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
public interface NCDataCollectionService extends DataCollectionService {
|
||||
|
||||
}
|
||||
@@ -1,126 +0,0 @@
|
||||
package org.xyzh.news.service.impl;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.xyzh.common.core.domain.ResultDomain;
|
||||
import org.xyzh.common.dto.resource.TbDataCollectionConfig;
|
||||
import org.xyzh.common.dto.resource.TbDataCollectionLog;
|
||||
import org.xyzh.news.mapper.DataCollectionConfigMapper;
|
||||
import org.xyzh.news.mapper.DataCollectionLogMapper;
|
||||
import org.xyzh.api.news.collection.DataCollectionService;
|
||||
|
||||
/**
|
||||
* @description 数据采集服务实现类
|
||||
* @filename NCDataCollectionServiceImpl.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
@Service
|
||||
public class NCDataCollectionServiceImpl implements DataCollectionService {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(NCDataCollectionServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private DataCollectionConfigMapper dataCollectionConfigMapper;
|
||||
|
||||
@Autowired
|
||||
private DataCollectionLogMapper dataCollectionLogMapper;
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbDataCollectionLog> batchExecuteCollection(List<String> configIDs) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbDataCollectionConfig> createConfig(TbDataCollectionConfig config) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbDataCollectionLog> createLog(TbDataCollectionLog log) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<Boolean> deleteConfig(String configID) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbDataCollectionLog> executeCollection(String configID) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<String> getCollectionStatus(String configID) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbDataCollectionConfig> getConfigById(String configID) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbDataCollectionConfig> getConfigList(Integer status) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbDataCollectionLog> getConfigStatistics(String configID) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbDataCollectionLog> getLogById(String logID) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbDataCollectionLog> getLogList(String configID, Date startDate, Date endDate) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<Boolean> stopCollection(String configID) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbDataCollectionConfig> updateConfig(TbDataCollectionConfig config) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbDataCollectionConfig> updateConfigStatus(String configID, Integer status) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbDataCollectionConfig> updateLastCollectTime(String configID, Date lastCollectTime) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,216 +0,0 @@
|
||||
<?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="org.xyzh.news.mapper.DataCollectionConfigMapper">
|
||||
|
||||
<!-- 基础结果映射 -->
|
||||
<resultMap id="BaseResultMap" type="org.xyzh.common.dto.resource.TbDataCollectionConfig">
|
||||
<id column="id" property="id" jdbcType="VARCHAR"/>
|
||||
<result column="name" property="name" jdbcType="VARCHAR"/>
|
||||
<result column="source_url" property="sourceUrl" jdbcType="VARCHAR"/>
|
||||
<result column="source_type" property="sourceType" jdbcType="VARCHAR"/>
|
||||
<result column="frequency" property="frequency" jdbcType="VARCHAR"/>
|
||||
<result column="tag_id" property="tagID" jdbcType="VARCHAR"/>
|
||||
<result column="status" property="status" jdbcType="INTEGER"/>
|
||||
<result column="last_collect_time" property="lastCollectTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="creator" property="creator" jdbcType="VARCHAR"/>
|
||||
<result column="updater" property="updater" jdbcType="VARCHAR"/>
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="delete_time" property="deleteTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 基础字段 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, name, source_url, source_type, frequency, tag_id, status,
|
||||
last_collect_time, creator, updater, create_time, update_time,
|
||||
delete_time, deleted
|
||||
</sql>
|
||||
|
||||
<!-- 通用条件 -->
|
||||
<sql id="Where_Clause">
|
||||
<where>
|
||||
deleted = 0
|
||||
<if test="name != null and name != ''">
|
||||
AND name LIKE CONCAT('%', #{name}, '%')
|
||||
</if>
|
||||
<if test="sourceType != null and sourceType != ''">
|
||||
AND source_type = #{sourceType}
|
||||
</if>
|
||||
<if test="frequency != null and frequency != ''">
|
||||
AND frequency = #{frequency}
|
||||
</if>
|
||||
<if test="tagID != null and tagID != ''">
|
||||
AND tag_id = #{tagID}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- selectDataCollectionConfigs -->
|
||||
<select id="selectDataCollectionConfigs" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM tb_data_collection_config
|
||||
<include refid="Where_Clause"/>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<!-- 根据配置ID查询配置信息 -->
|
||||
<select id="selectByConfigId" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List" />
|
||||
FROM tb_data_collection_config
|
||||
WHERE id = #{configId} AND deleted = 0
|
||||
</select>
|
||||
|
||||
<!-- 根据名称查询配置 -->
|
||||
<select id="selectByName" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List" />
|
||||
FROM tb_data_collection_config
|
||||
WHERE name = #{name} AND deleted = 0
|
||||
</select>
|
||||
|
||||
<!-- 根据状态查询配置列表 -->
|
||||
<select id="selectByStatus" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List" />
|
||||
FROM tb_data_collection_config
|
||||
WHERE status = #{status} AND deleted = 0
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<!-- 根据类型查询配置列表 -->
|
||||
<select id="selectByType" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List" />
|
||||
FROM tb_data_collection_config
|
||||
WHERE source_type = #{type} AND deleted = 0
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<!-- 查询启用的配置列表 -->
|
||||
<select id="selectActiveConfigs" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List" />
|
||||
FROM tb_data_collection_config
|
||||
WHERE status = 1 AND deleted = 0
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<!-- 检查配置名称是否存在 -->
|
||||
<select id="countByName" resultType="int">
|
||||
SELECT COUNT(1)
|
||||
FROM tb_data_collection_config
|
||||
WHERE name = #{name} AND deleted = 0
|
||||
<if test="excludeId != null and excludeId != ''">
|
||||
AND id != #{excludeId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 插入数据采集配置 -->
|
||||
<insert id="insertDataCollectionConfig" parameterType="org.xyzh.common.dto.resource.TbDataCollectionConfig">
|
||||
INSERT INTO tb_data_collection_config (
|
||||
id, name, source_url, source_type, frequency, tag_id, status,
|
||||
last_collect_time, creator, updater, create_time, update_time,
|
||||
delete_time, deleted
|
||||
) VALUES (
|
||||
#{id}, #{name}, #{sourceUrl}, #{sourceType}, #{frequency}, #{tagID}, #{status},
|
||||
#{lastCollectTime}, #{creator}, #{updater}, #{createTime}, #{updateTime},
|
||||
#{deleteTime}, #{deleted}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 更新数据采集配置 -->
|
||||
<update id="updateDataCollectionConfig" parameterType="org.xyzh.common.dto.resource.TbDataCollectionConfig">
|
||||
UPDATE tb_data_collection_config
|
||||
<set>
|
||||
<if test="name != null and name != ''">
|
||||
name = #{name},
|
||||
</if>
|
||||
<if test="sourceUrl != null and sourceUrl != ''">
|
||||
source_url = #{sourceUrl},
|
||||
</if>
|
||||
<if test="sourceType != null and sourceType != ''">
|
||||
source_type = #{sourceType},
|
||||
</if>
|
||||
<if test="frequency != null and frequency != ''">
|
||||
frequency = #{frequency},
|
||||
</if>
|
||||
<if test="tagID != null and tagID != ''">
|
||||
tag_id = #{tagID},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status},
|
||||
</if>
|
||||
<if test="lastCollectTime != null">
|
||||
last_collect_time = #{lastCollectTime},
|
||||
</if>
|
||||
<if test="updater != null and updater != ''">
|
||||
updater = #{updater},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime},
|
||||
</if>
|
||||
<if test="deleteTime != null">
|
||||
delete_time = #{deleteTime},
|
||||
</if>
|
||||
<if test="deleted != null">
|
||||
deleted = #{deleted},
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 删除数据采集配置 -->
|
||||
<delete id="deleteDataCollectionConfig" parameterType="org.xyzh.common.dto.resource.TbDataCollectionConfig">
|
||||
DELETE FROM tb_data_collection_config
|
||||
WHERE id = #{id}
|
||||
</delete>
|
||||
|
||||
<!-- 批量插入数据采集配置 -->
|
||||
<insert id="batchInsertDataCollectionConfigs" parameterType="java.util.List">
|
||||
INSERT INTO tb_data_collection_config (
|
||||
id, name, source_url, source_type, frequency, tag_id, status,
|
||||
last_collect_time, creator, updater, create_time, update_time,
|
||||
delete_time, deleted
|
||||
) VALUES
|
||||
<foreach collection="dataCollectionConfigList" item="item" separator=",">
|
||||
(
|
||||
#{item.id}, #{item.name}, #{item.sourceUrl}, #{item.sourceType}, #{item.frequency},
|
||||
#{item.tagID}, #{item.status}, #{item.lastCollectTime}, #{item.creator},
|
||||
#{item.updater}, #{item.createTime}, #{item.updateTime}, #{item.deleteTime}, #{item.deleted}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!-- 批量删除数据采集配置 -->
|
||||
<delete id="batchDeleteDataCollectionConfigs">
|
||||
DELETE FROM tb_data_collection_config
|
||||
WHERE id IN
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 分页查询数据采集配置 -->
|
||||
<select id="selectDataCollectionConfigsPage" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List" />
|
||||
FROM tb_data_collection_config
|
||||
<include refid="Where_Clause" />
|
||||
ORDER BY create_time DESC
|
||||
LIMIT #{pageParam.pageSize} OFFSET #{pageParam.offset}
|
||||
</select>
|
||||
|
||||
<!-- 统计数据采集配置总数 -->
|
||||
<select id="countDataCollectionConfigs" resultType="long">
|
||||
SELECT COUNT(1)
|
||||
FROM tb_data_collection_config
|
||||
<include refid="Where_Clause" />
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,188 +0,0 @@
|
||||
<?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="org.xyzh.news.mapper.DataCollectionLogMapper">
|
||||
|
||||
<!-- 基础结果映射 -->
|
||||
<resultMap id="BaseResultMap" type="org.xyzh.common.dto.resource.TbDataCollectionLog">
|
||||
<id column="id" property="id" jdbcType="VARCHAR"/>
|
||||
<result column="config_id" property="configID" jdbcType="VARCHAR"/>
|
||||
<result column="collect_count" property="collectCount" jdbcType="INTEGER"/>
|
||||
<result column="success_count" property="successCount" jdbcType="INTEGER"/>
|
||||
<result column="fail_count" property="failCount" jdbcType="INTEGER"/>
|
||||
<result column="status" property="status" jdbcType="INTEGER"/>
|
||||
<result column="message" property="message" jdbcType="LONGVARCHAR"/>
|
||||
<result column="collect_time" property="collectTime" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 基础字段 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, config_id, collect_count, success_count, fail_count, status,
|
||||
message, collect_time
|
||||
</sql>
|
||||
|
||||
<!-- 通用条件 -->
|
||||
<sql id="Where_Clause">
|
||||
<where>
|
||||
<if test="configID != null and configID != ''">
|
||||
AND config_id = #{configID}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- selectDataCollectionLogs -->
|
||||
<select id="selectDataCollectionLogs" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM tb_data_collection_log
|
||||
<include refid="Where_Clause"/>
|
||||
ORDER BY collect_time DESC
|
||||
</select>
|
||||
|
||||
<!-- 根据记录ID查询记录信息 -->
|
||||
<select id="selectByLogId" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List" />
|
||||
FROM tb_data_collection_log
|
||||
WHERE id = #{logId}
|
||||
</select>
|
||||
|
||||
<!-- 根据配置ID查询记录列表 -->
|
||||
<select id="selectByConfigId" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List" />
|
||||
FROM tb_data_collection_log
|
||||
WHERE config_id = #{configId}
|
||||
ORDER BY collect_time DESC
|
||||
</select>
|
||||
|
||||
<!-- 根据状态查询记录列表 -->
|
||||
<select id="selectByStatus" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List" />
|
||||
FROM tb_data_collection_log
|
||||
WHERE status = #{status}
|
||||
ORDER BY collect_time DESC
|
||||
</select>
|
||||
|
||||
<!-- 根据类型查询记录列表 -->
|
||||
<select id="selectByType" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List" />
|
||||
FROM tb_data_collection_log
|
||||
ORDER BY collect_time DESC
|
||||
</select>
|
||||
|
||||
<!-- 查询最新的记录列表 -->
|
||||
<select id="selectLatestLogs" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List" />
|
||||
FROM tb_data_collection_log
|
||||
ORDER BY collect_time DESC
|
||||
<if test="limit != null and limit > 0">
|
||||
LIMIT #{limit}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 查询采集统计信息 -->
|
||||
<select id="selectCollectionStatistics" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
config_id,
|
||||
SUM(collect_count) as collect_count,
|
||||
SUM(success_count) as success_count,
|
||||
SUM(fail_count) as fail_count,
|
||||
MAX(collect_time) as collect_time
|
||||
FROM tb_data_collection_log
|
||||
WHERE config_id = #{configId}
|
||||
GROUP BY config_id
|
||||
</select>
|
||||
|
||||
<!-- 插入数据采集记录 -->
|
||||
<insert id="insertDataCollectionLog" parameterType="org.xyzh.common.dto.resource.TbDataCollectionLog">
|
||||
INSERT INTO tb_data_collection_log (
|
||||
id, config_id, collect_count, success_count, fail_count, status,
|
||||
message, collect_time
|
||||
) VALUES (
|
||||
#{id}, #{configID}, #{collectCount}, #{successCount}, #{failCount}, #{status},
|
||||
#{message}, #{collectTime}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 更新数据采集记录 -->
|
||||
<update id="updateDataCollectionLog" parameterType="org.xyzh.common.dto.resource.TbDataCollectionLog">
|
||||
UPDATE tb_data_collection_log
|
||||
<set>
|
||||
<if test="configID != null and configID != ''">
|
||||
config_id = #{configID},
|
||||
</if>
|
||||
<if test="collectCount != null">
|
||||
collect_count = #{collectCount},
|
||||
</if>
|
||||
<if test="successCount != null">
|
||||
success_count = #{successCount},
|
||||
</if>
|
||||
<if test="failCount != null">
|
||||
fail_count = #{failCount},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status},
|
||||
</if>
|
||||
<if test="message != null and message != ''">
|
||||
message = #{message},
|
||||
</if>
|
||||
<if test="collectTime != null">
|
||||
collect_time = #{collectTime},
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 删除数据采集记录 -->
|
||||
<delete id="deleteDataCollectionLog" parameterType="org.xyzh.common.dto.resource.TbDataCollectionLog">
|
||||
DELETE FROM tb_data_collection_log
|
||||
WHERE id = #{id}
|
||||
</delete>
|
||||
|
||||
<!-- 批量插入数据采集记录 -->
|
||||
<insert id="batchInsertDataCollectionLogs" parameterType="java.util.List">
|
||||
INSERT INTO tb_data_collection_log (
|
||||
id, config_id, collect_count, success_count, fail_count, status,
|
||||
message, collect_time
|
||||
) VALUES
|
||||
<foreach collection="dataCollectionLogList" item="item" separator=",">
|
||||
(
|
||||
#{item.id}, #{item.configID}, #{item.collectCount}, #{item.successCount},
|
||||
#{item.failCount}, #{item.status}, #{item.message}, #{item.collectTime}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!-- 批量删除数据采集记录 -->
|
||||
<delete id="batchDeleteDataCollectionLogs">
|
||||
DELETE FROM tb_data_collection_log
|
||||
WHERE id IN
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 分页查询数据采集记录 -->
|
||||
<select id="selectDataCollectionLogsPage" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List" />
|
||||
FROM tb_data_collection_log
|
||||
<include refid="Where_Clause" />
|
||||
ORDER BY collect_time DESC
|
||||
LIMIT #{pageParam.pageSize} OFFSET #{pageParam.offset}
|
||||
</select>
|
||||
|
||||
<!-- 统计数据采集记录总数 -->
|
||||
<select id="countDataCollectionLogs" resultType="long">
|
||||
SELECT COUNT(1)
|
||||
FROM tb_data_collection_log
|
||||
<include refid="Where_Clause" />
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user