提交 022b1c6c 作者: yanxin

事件分析删除内容回退

上级 34747ca4
package com.zzsn.event.controller.eventExtract;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.zzsn.event.constant.Result;
import com.zzsn.event.entity.EventExtract;
import com.zzsn.event.es.EsService;
import com.zzsn.event.service.EventExtractService;
import com.zzsn.event.vo.EventExtractVO;
import com.zzsn.event.vo.SubjectDataVo;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
/**
* @author lkg
* @date 2024/9/7
*/
@Api(tags = "挖掘的事件管理")
@RestController
@RequestMapping("/extract")
public class EventExtractController {
@Autowired
private EventExtractService eventExtractService;
@Autowired
private EsService esService;
/**
* 伪事件信息分页列表
*
* @param taskId 任务id
* @param searchWord 搜索词
* @param eventName 事件名称
* @param eventType 事件分类
* @param startTime 开始时间
* @param endTime 结束时间
* @param checkStatus 审核状态(2-不通过;1-通过;0-待审核)
* @param column 排序字段
* @param sortType 排序方式
* @param pageNo 偏移量
* @param pageSize 返回条数
* @author lkg
* @date 2024/9/9
*/
@GetMapping("/pageList")
public Result<?> pageList(@RequestParam(name = "taskId") String taskId,
@RequestParam(name = "searchWord", required = false) String searchWord,
@RequestParam(name = "eventName", required = false) String eventName,
@RequestParam(name = "startTime", required = false) String startTime,
@RequestParam(name = "endTime", required = false) String endTime,
@RequestParam(name = "eventType", required = false) String eventType,
@RequestParam(name = "checkStatus", required = false) Integer checkStatus,
@RequestParam(name = "column", required = false) String column,
@RequestParam(name = "sortType", required = false) String sortType,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
IPage<EventExtractVO> page = eventExtractService.pageList(taskId, searchWord, eventName, startTime, endTime,
eventType, checkStatus, column, sortType, pageNo, pageSize);
return Result.OK(page);
}
/**
* 伪事件来源资讯详情
*
* @param relatedIds 来源资讯id,多个逗号隔开
* @author lkg
* @date 2024/9/13
*/
@GetMapping("/dataInfoList")
public Result<?> dataInfoList(@RequestParam List<String> relatedIds) {
List<SubjectDataVo> subjectDataVos = esService.listByIds(relatedIds);
return Result.OK(subjectDataVos);
}
/**
* 审核
*
* @param eventExtract 伪事件信息
* @author lkg
* @date 2024/9/13
*/
@PostMapping("/modify")
public Result<?> modify(@RequestBody EventExtract eventExtract) {
eventExtractService.updateById(eventExtract);
return Result.OK();
}
/**
* 删除
*
* @param id 主键id
* @author lkg
* @date 2024/9/9
*/
@GetMapping("/delete")
public Result<?> delete(@RequestParam String id) {
eventExtractService.update(Wrappers.<EventExtract>lambdaUpdate().set(EventExtract::getDeleteStatus, 1)
.eq(EventExtract::getId, id));
return Result.OK();
}
}
package com.zzsn.event.controller.eventExtract;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.zzsn.event.constant.Result;
import com.zzsn.event.entity.EventExtractTask;
import com.zzsn.event.service.EventExtractTaskService;
import com.zzsn.event.service.OtherDataService;
import com.zzsn.event.util.tree.Node;
import com.zzsn.event.util.user.UserUtil;
import com.zzsn.event.util.user.UserVo;
import com.zzsn.event.vo.EventExtractTaskVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Date;
import java.util.List;
/**
* 事件抽取任务
*
* @author lkg
* @date 2024/9/13
*/
@RestController
@RequestMapping("/extract/task")
public class EventExtractTaskController {
@Autowired
private EventExtractTaskService eventExtractTaskService;
@Autowired
private OtherDataService otherDataService;
/**
* 事件抽取任务信息分页列表
*
* @param projectId 项目id
* @param searchWord 搜索词
* @param taskName 任务名称
* @param startTime 开始时间
* @param endTime 结束时间
* @param pageNo 当前页
* @param pageSize 返回条数
* @author lkg
* @date 2024/9/13
*/
@GetMapping("/pageList")
public Result<?> pageList(@RequestParam(required = false) String projectId,
@RequestParam(required = false) String searchWord,
@RequestParam(required = false) String taskName,
@RequestParam(required = false) String startTime,
@RequestParam(required = false) String endTime,
@RequestParam(defaultValue = "1") Integer pageNo,
@RequestParam(defaultValue = "10") Integer pageSize) {
IPage<EventExtractTaskVO> page = eventExtractTaskService.pageList(projectId, searchWord, taskName, startTime, endTime, pageNo, pageSize);
return Result.OK(page);
}
/**
* 查看详情
*
* @param id 任务id
* @author lkg
* @date 2024/9/14
*/
@GetMapping("/queryInfo")
public Result<?> queryInfo(@RequestParam String id){
EventExtractTask eventExtractTask = eventExtractTaskService.getById(id);
return Result.OK(eventExtractTask);
}
/**
* 新增/编辑
*
* @param eventExtractTask 事件抽取任务信息
* @author lkg
* @date 2024/9/13
*/
@PostMapping("/modify")
public Result<?> modify(@RequestBody EventExtractTask eventExtractTask) {
UserVo currentUser = UserUtil.getLoginUser();
eventExtractTask.setCreateBy(currentUser.getUsername());
eventExtractTask.setCreateTime(new Date());
eventExtractTaskService.saveOrUpdate(eventExtractTask);
return Result.OK();
}
/**
* 开启
*
* @param id 任务id
* @author lkg
* @date 2024/9/14
*/
@GetMapping("/open")
public Result<?> open(@RequestParam String id) {
eventExtractTaskService.update(Wrappers.<EventExtractTask>lambdaUpdate().set(EventExtractTask::getTaskStatus, 1)
.eq(EventExtractTask::getId, id));
return Result.OK();
}
/**
* 关闭
*
* @param id 任务id
* @author lkg
* @date 2024/9/14
*/
@GetMapping("/close")
public Result<?> close(@RequestParam String id) {
eventExtractTaskService.update(Wrappers.<EventExtractTask>lambdaUpdate().set(EventExtractTask::getTaskStatus, 0)
.eq(EventExtractTask::getId, id));
return Result.OK();
}
/**
* 删除
*
* @param id 任务id
* @author lkg
* @date 2024/9/13
*/
@GetMapping("/delete")
public Result<?> delete(@RequestParam String id) {
eventExtractTaskService.update(Wrappers.<EventExtractTask>lambdaUpdate().eq(EventExtractTask::getId, id)
.set(EventExtractTask::getDeleteStatus, 1));
return Result.OK();
}
/**
* 项目信息列表
*
* @author lkg
* @date 2024/9/14
*/
@GetMapping("/projectList")
public Result<?> projectList() {
List<Node> nodes = otherDataService.projectList();
return Result.OK(nodes);
}
/**
* 栏目信息列表
*
* @author lkg
* @date 2024/9/14
*/
@GetMapping("/columnList")
public Result<?> columnList() {
List<Node> nodes = otherDataService.columnList(null);
return Result.OK(nodes);
}
}
package com.zzsn.event.controller.plat;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.zzsn.event.constant.Constants;
import com.zzsn.event.constant.Result;
import com.zzsn.event.entity.CustomerDataPermissionMap;
import com.zzsn.event.entity.SubjectType;
import com.zzsn.event.entity.SubjectTypeMap;
import com.zzsn.event.entity.SysUserDataPermission;
import com.zzsn.event.service.ICustomerDataPermissionMapService;
import com.zzsn.event.service.ISubjectTypeMapService;
import com.zzsn.event.service.ISubjectTypeService;
import com.zzsn.event.service.ISysUserDataPermissionService;
import com.zzsn.event.util.tree.Node;
import com.zzsn.event.util.tree.TreeUtil;
import com.zzsn.event.util.user.UserUtil;
import com.zzsn.event.util.user.UserVo;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 事件后台管理-事件分类
*
* @author lkg
* @date 2024/4/29
*/
@Slf4j
@Api(tags = "-事件分类")
@RestController
@RequestMapping("/plat/manage/subjectType")
public class EventTypeController {
@Autowired
private ISubjectTypeService subjectTypeService;
@Autowired
private ISubjectTypeMapService subjectTypeMapService;
@Autowired
private ICustomerDataPermissionMapService customerDataPermissionMapService;
@Autowired
private ISysUserDataPermissionService sysUserDataPermissionService;
/**
* 事件分类列表-树型结构
*
* @author lkg
* @date 2024/4/28
*/
@GetMapping("/list")
public Result<?> typeList(@RequestParam(defaultValue = "2") Integer category) {
List<Node> nodes = subjectTypeService.enableList(category);
List<Node> tree = TreeUtil.tree(nodes, "0");
return Result.OK(tree);
}
/**
* 新增专题分类
*
* @param subjectType 专题分类
* @author lkg
* @date 2024/4/29
*/
@PostMapping("/add")
public Result<?> addSubjectType(@RequestBody SubjectType subjectType) {
UserVo currentUser = UserUtil.getLoginUser();
String pid = subjectType.getPid();
if (!"0".equals(pid)) {
int count = subjectTypeMapService.count(new LambdaQueryWrapper<SubjectTypeMap>().eq(SubjectTypeMap::getTypeId, pid));
if (count > 0) {
return Result.FAIL(501, "当前分类下存在专题");
}
}
subjectType.setCustomerId(currentUser.getCustomerId());
subjectTypeService.add(subjectType);
//权限
if (currentUser.getCategory().equals(Constants.ADMIN_USER)) {
customerDataPermissionMapService.save(new CustomerDataPermissionMap().setCustomerId(currentUser.getCustomerId()).setPermissionId(subjectType.getId()).setCategory(Constants.PERMISSION_SUBJECT));
}
if (currentUser.getCategory().equals(Constants.COMMON_USER)) {
sysUserDataPermissionService.save(new SysUserDataPermission().setUserId(currentUser.getUserId()).setPermissionId(subjectType.getId()).setCategory(Constants.PERMISSION_SUBJECT));
customerDataPermissionMapService.save(new CustomerDataPermissionMap().setCustomerId(currentUser.getCustomerId()).setPermissionId(subjectType.getId()).setCategory(Constants.PERMISSION_SUBJECT));
}
return Result.OK();
}
/**
* 编辑
*
* @param subjectType 专题分类
* @author lkg
* @date 2024/4/29
*/
@PostMapping("/edit")
public Result<?> edit(@RequestBody SubjectType subjectType){
subjectTypeService.edit(subjectType);
return Result.OK();
}
/**
* 删除
*
* @param id 专题分类id
* @author lkg
* @date 2024/4/29
*/
@GetMapping("/delete")
public Result<?> delete(@RequestParam String id){
int count = subjectTypeMapService.count(new LambdaQueryWrapper<SubjectTypeMap>().eq(SubjectTypeMap::getTypeId, id));
if (count > 0) {
return Result.FAIL(501, "当前分类下存在专题");
}
//删除数据权限关系
customerDataPermissionMapService.remove(Wrappers.<CustomerDataPermissionMap>lambdaQuery().eq(CustomerDataPermissionMap::getPermissionId, id));
sysUserDataPermissionService.remove(Wrappers.<SysUserDataPermission>lambdaQuery().eq(SysUserDataPermission::getPermissionId, id));
subjectTypeService.delete(id);
return Result.OK();
}
}
......@@ -10,10 +10,8 @@ import com.zzsn.event.entity.Event;
import com.zzsn.event.entity.KeyWords;
import com.zzsn.event.service.IEventService;
import com.zzsn.event.service.IKeyWordsService;
import com.zzsn.event.service.ISubjectInfoSourceMapService;
import com.zzsn.event.service.LabelEntityService;
import com.zzsn.event.util.RedisUtil;
import com.zzsn.event.util.tree.Node;
import com.zzsn.event.util.user.UserUtil;
import com.zzsn.event.util.user.UserVo;
import com.zzsn.event.vo.*;
......@@ -44,7 +42,7 @@ import java.util.concurrent.CompletableFuture;
@Api(tags = "事件后台管理")
@RestController
@RequestMapping("/plat/manage")
public class EventManageController {
public class NewEventManageController {
@Autowired
private IEventService eventService;
......@@ -116,11 +114,11 @@ public class EventManageController {
* @param id 事件id
* @return
*/
@GetMapping(value = "/queryById")
/*@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name = "id") String id) {
EventVO eventVO = eventService.queryInfo(id);
return Result.OK(eventVO);
}
}*/
/**
......
package com.zzsn.event.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.Date;
/**
* Description: 客户-数据权限关系表
* Author: EDY
* Date: 2023/8/1
*/
@Data
@TableName("customer_data_permission_map")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="customer_data_permission_map-客户-数据权限关系表", description="客户-数据权限关系表")
public class CustomerDataPermissionMap {
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键id")
private String id;
@ApiModelProperty(value = "客户id")
private String customerId;
@ApiModelProperty(value = "数据权限id")
private String permissionId;
@ApiModelProperty(value = "数据权限类型(project-项目;subject-专题;group-信息源组;keyword-关键词组;channel-栏目)")
private String category;
@ApiModelProperty(value = "创建人")
private String createBy;
@ApiModelProperty(value = "创建时间")
private Date createTime;
}
package com.zzsn.event.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* 挖掘到的事件
* @TableName event_extract
*/
@Data
@TableName("event_extract")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="event_extract对象", description="挖掘事件")
public class EventExtract implements Serializable {
/**ID*/
@TableId(value = "id",type = IdType.ASSIGN_ID)
private String id;
/**
* 唯一id
*/
@TableField("unique_id")
private String uniqueId;
/**
* 名称
*/
@TableField("event_name")
private String eventName;
/**
* 事件类型
*/
@TableField("event_type")
private String eventType;
/**
* 开始时间
*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@TableField("start_time")
private Date startTime;
/**
* 结束时间
*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@TableField("end_time")
private Date endTime;
/**
* 自定义事件标签
*/
@TableField("event_label")
private String eventLabel;
/**
* 事件描述
*/
@TableField("event_describe")
private String eventDescribe;
/**
* 事件来源资讯id,多个逗号隔开
*/
@TableField("related_id")
private String relatedId;
/**
* 项目id
*/
@TableField("project_id")
private String projectId;
/**
* 任务id
*/
@TableField("task_id")
private String taskId;
/**
* 审核状态(2-不通过;1-通过;0-待审核)
*/
@TableField("check_status")
private Integer checkStatus;
/**
* 删除状态(1-删除;0-未删除)
*/
@TableField("delete_status")
private Integer deleteStatus;
/**
* 抽取时间
*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@TableField("extract_time")
private Date extractTime;
/**
* 创建人id
*/
@TableField("create_by")
private String createBy;
/**
* 创建时间
*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@TableField("create_time")
private Date createTime;
}
package com.zzsn.event.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* 事件抽取任务表
* @TableName event_extract_task
*/
@Data
@TableName("event_extract_task")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="event_extract_task对象", description="挖掘事件任务")
public class EventExtractTask implements Serializable {
/**
* 任务id
*/
@TableId(value = "id",type = IdType.ASSIGN_ID)
private String id;
/**
* 任务名称
*/
@TableField("task_name")
private String taskName;
/**
* 项目id
*/
@TableField("project_id")
private String projectId;
/**
* 栏目id,多个用逗号隔开
*/
@TableField("column_id")
private String columnId;
/**
* 数据状态(0:未审核 1:审核通过 3:暂定 4:删除)
*/
@TableField("data_status")
private Integer dataStatus;
/**
* 数据开始时间
*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@TableField("start_time")
private Date startTime;
/**
* 数据结束时间
*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@TableField("end_time")
private Date endTime;
/**
* 任务状态(1-开启;0-关闭)
*/
@TableField("task_status")
private Integer taskStatus;
/**
* 最近一次执行时间
*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@TableField("last_update_time")
private Date lastUpdateTime;
/**
* 删除状态(1-删除;0-未删除)
*/
@TableField("delete_status")
private Integer deleteStatus;
/**
* 创建时间
*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@TableField("create_time")
private Date createTime;
/**
* 创建人
*/
@TableField("create_by")
private String createBy;
}
package com.zzsn.event.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import java.io.Serializable;
/**
* @author lkg
* @description: 用户数据权限
* @date 2022/6/20 11:59
*/
@Data
@TableName("sys_user_data_permission")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="sys_user_data_permission对象", description="用户数据权限表")
public class SysUserDataPermission implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**用户id*/
@Excel(name = "用户id", width = 15)
@ApiModelProperty(value = "用户id")
private String userId;
/**权限id*/
@Excel(name = "权限id", width = 15)
@ApiModelProperty(value = "权限id")
private String permissionId;
/**权限类别*/
@Excel(name = "权限类别", width = 15)
@ApiModelProperty(value = "权限类别")
private String category;
}
......@@ -3,6 +3,7 @@ package com.zzsn.event.es;
import cn.hutool.core.map.MapUtil;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
......@@ -1257,7 +1258,30 @@ public class EsService {
return data;
}
public List<SubjectDataVo> listByIds(List<String> ids) {
List<SubjectDataVo> dataList = new ArrayList<>();
SearchRequest searchRequest = new SearchRequest(Constants.SUBJECT_INDEX);
SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
//创建查询对象
BoolQueryBuilder boolQuery = QueryBuilders.boolQuery();
boolQuery.must(QueryBuilders.termsQuery("id", ids));
searchSourceBuilder.query(boolQuery);
searchRequest.source(searchSourceBuilder);
try {
SearchResponse searchResponse = client.search(searchRequest, RequestOptions.DEFAULT);
SearchHit[] hits = searchResponse.getHits().getHits();
if (hits != null && hits.length > 0) {
for (SearchHit hit : hits) {
String sourceAsString = hit.getSourceAsString();
SubjectDataVo subjectDataVo = JSONObject.parseObject(sourceAsString, SubjectDataVo.class);
dataList.add(subjectDataVo);
}
}
} catch (Exception e) {
e.printStackTrace();
}
return dataList;
}
/**
* 来源占比-专题分析页
*
......
package com.zzsn.event.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zzsn.event.entity.CustomerDataPermissionMap;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface CustomerDataPermissionMapMapper extends BaseMapper<CustomerDataPermissionMap> {
}
package com.zzsn.event.mapper;
import com.zzsn.event.entity.EventExtract;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zzsn.event.vo.EventExtractVO;
import com.zzsn.event.vo.EventFrontVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author lenovo
* @description 针对表【event_extract(事件)】的数据库操作Mapper
* @createDate 2024-09-07 18:00:28
* @Entity com.zzsn.event.entity.EventExtract
*/
@Mapper
public interface EventExtractMapper extends BaseMapper<EventExtract> {
/**
* 伪事件信息列表
*
* @param searchWord 搜索词
* @param eventName 事件名称
* @param eventType 时间分类
* @param startTime 开始时间
* @param endTime 结束时间
* @param checkStatus 审核状态(2-不通过;1-通过;0-待审核)
* @param offset 偏移量
* @param pageSize 返回条数
* @author lkg
* @date 2024/9/9
*/
List<EventExtractVO> pageList(@Param("taskId") String taskId, @Param("searchWord") String searchWord,
@Param("eventName") String eventName,
@Param("startTime") String startTime, @Param("endTime") String endTime,
@Param("eventType") String eventType, @Param("checkStatus") Integer checkStatus,
@Param("column") String column, @Param("sortType") String sortType,
@Param("offset") Integer offset, @Param("pageSize") Integer pageSize);
/**
* 伪事件信息总数量
*
* @param searchWord 搜索词
* @param eventName 事件名称
* @param eventType 时间分类
* @param startTime 开始时间
* @param endTime 结束时间
* @param checkStatus 审核状态(2-不通过;1-通过;0-待审核)
* @author lkg
* @date 2024/9/9
*/
Long totalCount(@Param("taskId") String taskId, @Param("searchWord") String searchWord,
@Param("eventName") String eventName,
@Param("startTime") String startTime, @Param("endTime") String endTime,
@Param("eventType") String eventType, @Param("checkStatus") Integer checkStatus);
/**
* 自动追踪事件列表-门户
*
* @param projectId 项目id
* @param eventName 事件名称
* @param eventTypes 事件分类id集合
* @param offset 偏移量
* @param pageSize 返回条数
* @author lkg
* @date 2024/9/9
*/
List<EventFrontVO> frontDigPageList(@Param("projectId") String projectId, @Param("eventName") String eventName,
@Param("eventTypes") List<String> eventTypes,
@Param("offset") Integer offset, @Param("pageSize") Integer pageSize);
/**
* 自动追踪事件总数量-门户
*
* @param projectId 项目id
* @param eventName 事件名称
* @param eventTypes 事件分类id集合
* @author lkg
* @date 2024/9/9
*/
Long frontDigTotalCount(@Param("projectId") String projectId, @Param("eventName") String eventName,
@Param("eventTypes") List<String> eventTypes);
}
package com.zzsn.event.mapper;
import com.zzsn.event.entity.EventExtractTask;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zzsn.event.vo.EventExtractTaskVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author lenovo
* @description 针对表【event_extract_task(事件抽取任务表)】的数据库操作Mapper
* @createDate 2024-09-13 11:31:47
* @Entity com.zzsn.event.entity.EventExtractTask
*/
@Mapper
public interface EventExtractTaskMapper extends BaseMapper<EventExtractTask> {
/**
* 事件抽取任务信息列表
*
* @param projectId 项目id
* @param searchWord 搜索词
* @param taskName 任务名称
* @param startTime 开始时间
* @param endTime 结束时间
* @param offset 偏移量
* @param pageSize 返回条数
* @author lkg
* @date 2024/9/13
*/
List<EventExtractTaskVO> pageList(@Param("projectId") String projectId, @Param("searchWord") String searchWord,
@Param("taskName") String taskName, @Param("startTime") String startTime, @Param("endTime") String endTime,
@Param("offset") Integer offset, @Param("pageSize") Integer pageSize);
/**
* 事件抽取任务信息总数量
*
* @param projectId 项目id
* @param searchWord 搜索词
* @param taskName 任务名称
* @param startTime 开始时间
* @param endTime 结束时间
* @author lkg
* @date 2024/9/13
*/
Long totalCount(@Param("projectId") String projectId, @Param("searchWord") String searchWord,
@Param("taskName") String taskName, @Param("startTime") String startTime, @Param("endTime") String endTime);
}
......@@ -2,6 +2,7 @@ package com.zzsn.event.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zzsn.event.entity.Event;
import com.zzsn.event.util.tree.Node;
import com.zzsn.event.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -160,7 +161,34 @@ public interface EventMapper extends BaseMapper<Event> {
*/
List<EventNewPlatVO> newPlatPageList(@Param("subjectCondition") SubjectCondition subjectCondition, @Param("offset") Integer offset, @Param("pageSize") Integer pageSize);
/**
* 总数量(专题分类)-新平台管理
*
* @param subjectCondition 筛选条件
* @author lkg
* @date 2024/4/28
*/
Integer newPlatCount(@Param("subjectCondition") SubjectCondition subjectCondition);
/**
* 分页列表(客户)-新平台管理
*
* @param subjectCondition 筛选条件
* @param offset 偏移量
* @param pageSize 返回条数
* @author lkg
* @date 2024/4/30
*/
List<EventNewPlatVO> newPlatCustomerPageList(@Param("subjectCondition") SubjectCondition subjectCondition, @Param("offset") Integer offset, @Param("pageSize") Integer pageSize);
/**
* 总数量(客户)-新平台管理
*
* @param subjectCondition 筛选条件
* @author lkg
* @date 2024/4/28
*/
Integer newPlatCustomerCount(@Param("subjectCondition") SubjectCondition subjectCondition);
/**
* 热点事件列表-前10
......@@ -236,6 +264,62 @@ public interface EventMapper extends BaseMapper<Event> {
*/
List<EventVO> eventList(@Param("eventIdList") List<String> eventIdList);
/**
* 专题绑定关键词数量
*
* @param idList 专题id集合
* @author lkg
* @date 2024/4/28
*/
List<SubjectPage> bindKeywordCountList(@Param("idList") List<String> idList);
/**
* 专题绑定的信息源集合
*
* @param subjectIds 专题id
* @author lkg
* @date 2024/4/24
*/
List<SubjectSourceVO> bindSourceList(@Param("subjectIds") List<String> subjectIds);
/**
* 专题绑定的信息源集合
*
* @param subjectIds 专题id
* @author lkg
* @date 2024/4/24
*/
List<SubjectSourceVO> excludeSourceList(@Param("subjectIds") List<String> subjectIds);
/**
* 项目列表
*
* @param userId 用户id
* @param customerId 客户id
* @author lkg
* @date 2024/4/29
*/
List<Node> projectList(@Param("userId") String userId, @Param("customerId") String customerId);
/**
* 分类下的事件id集合
*
* @param userId 用户id
* @param typeIds 分类id集合
* @author lkg
* @date 2024/5/6
*/
List<String> selectSubjectByTypeIds(@Param("userId") String userId, @Param("typeIds") List<String> typeIds);
/**
* 用户下的事件id集合
*
* @param userId 用户id
* @param customerId 客户id
* @author lkg
* @date 2024/5/6
*/
List<String> selectSubjectWithCustomer(@Param("userId") String userId, @Param("customerId") String customerId);
/**
* 专题绑定关键词的id集合
......@@ -245,4 +329,70 @@ public interface EventMapper extends BaseMapper<Event> {
* @date 2024/5/6
*/
List<String> bindKeyWordsIdList(@Param("subjectIds") List<String> subjectIds);
/**
* 专题绑定模型信息列表
*
* @param subjectIds 专题id集合
* @author lkg
* @date 2024/5/6
*/
List<LabelModelVo> selectLabelModelBySubjectId(@Param("subjectIds") List<String> subjectIds);
/**
* 企业标签下的企业信用代码集合
*
* @param labelIds 企业标签id集合
* @author lkg
* @date 2024/5/6
*/
List<String> codesByLabels(@Param("labelIds") List<String> labelIds);
/**
* 判断信息源是否在专题绑定的信息源组下
*
* @param subjectId 专题id
* @param sourceId 信息源id
* @author lkg
* @date 2024/4/24
*/
int ynBelowBindGroup(@Param("subjectId") String subjectId, @Param("sourceId") String sourceId);
/**
* 判断信息源是否在专题排除的信息源组下
*
* @param subjectId 专题id
* @param sourceId 信息源id
* @author lkg
* @date 2024/4/24
*/
int ynBelowExcludeGroup(@Param("subjectId") String subjectId, @Param("sourceId") String sourceId);
/**
* 专题绑定关键词信息-分页列表
*
* @param subjectIds 专题id集合
* @param groupName 词组名称
* @param wordName 关键词名称
* @param offset 偏移量
* @param pageSize 返回条数
* @author lkg
* @date 2024/5/7
*/
List<KeyWordsPage> bindKeyWordsList(@Param("subjectIds") List<String> subjectIds,
@Param("groupName") String groupName, @Param("wordName") String wordName,
@Param("offset") Integer offset, @Param("pageSize") Integer pageSize);
/**
* 专题绑定关键词信息-总数量
*
* @param subjectIds 专题id集合
* @param groupName 词组名称
* @param wordName 关键词名称
* @author lkg
* @date 2024/5/7
*/
Long bindKeyWordsCount(@Param("subjectIds") List<String> subjectIds, @Param("groupName") String groupName, @Param("wordName") String wordName);
}
package com.zzsn.event.mapper;
import com.zzsn.event.util.tree.Node;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 其他数据
*
* @author lkg
* @date 2024/9/13
*/
@Mapper
public interface OtherDataMapper {
/**
* 栏目集合
*
* @param columnIds 栏目id集合
* @author lkg
* @date 2024/9/13
*/
List<Node> columnList(@Param("columnIds") List<String> columnIds);
/**
* 项目集合
*
* @author lkg
* @date 2024/9/13
*/
List<Node> projectList();
}
......@@ -32,6 +32,25 @@ public interface SubjectTypeMapper extends BaseMapper<SubjectType> {
List<Node> enableList(@Param("category") Integer category,@Param("username") String createBy);
/**
* 可用的专题和客户列表
*
* @param userId 用户id
* @param customerId 客户id
* @author lkg
* @date 2024/4/30
*/
List<SubjectTreeVO> subjectAndCustomerTree(@Param("userId") String userId, @Param("customerId") String customerId);
/**
* 可用客户信息列表
*
* @param customerId 客户id
* @author lkg
* @date 2024/4/30
*/
List<SubjectTreeVO> enableCustomerList(@Param("customerId") String customerId);
/**
* 更新分类是否有子节点状态
*
* @param id 分类id
......@@ -102,4 +121,6 @@ public interface SubjectTypeMapper extends BaseMapper<SubjectType> {
* @date 2024/12/20
*/
Integer typeBindEventCount(@Param("typeIds") List<String> typeIds);
List<SubjectTreeVO> eventAndTypeTree();
}
package com.zzsn.event.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zzsn.event.entity.SysUserDataPermission;
import org.apache.ibatis.annotations.Mapper;
/**
* @author lkg
* @description:
* @date 2022/6/20 14:10
*/
@Mapper
public interface SysUserDataPermissionMapper extends BaseMapper<SysUserDataPermission> {
}
<?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.zzsn.event.mapper.EventExtractMapper">
<resultMap id="BaseResultMap" type="com.zzsn.event.entity.EventExtract">
<id property="id" column="id" jdbcType="VARCHAR"/>
<result property="eventName" column="event_name" jdbcType="VARCHAR"/>
<result property="eventType" column="event_type" jdbcType="INTEGER"/>
<result property="startTime" column="start_time" jdbcType="TIMESTAMP"/>
<result property="endTime" column="end_time" jdbcType="TIMESTAMP"/>
<result property="eventLabel" column="event_label" jdbcType="VARCHAR"/>
<result property="eventDescribe" column="event_describe" jdbcType="VARCHAR"/>
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
</resultMap>
<select id="pageList" resultType="com.zzsn.event.vo.EventExtractVO">
select t2.type_name,t1.id,t1.event_name,t1.event_type,t1.event_label,t1.extract_time,t1.check_status,t1.related_id
from event_extract t1
inner join event_category t2 on t1.event_type =t2.id
where t1.task_id = #{taskId} and t1.delete_status = 0
<if test="eventName!=null and eventName != ''">
and t1.event_name like CONCAT('%',#{eventName},'%')
</if>
<if test="eventType!=null and eventType != ''">
and t1.event_type = #{eventType}
</if>
<if test="startTime!=null and startTime != ''">
and t1.extract_time >= #{startTime}
</if>
<if test="endTime!=null and endTime != ''">
and t1.extract_time <![CDATA[ <= ]]> #{endTime}
</if>
<if test="searchWord != null and searchWord != ''">
and CONCAT_WS(',',t1.event_name,t1.event_label,t2.type_name) like concat('%',concat(#{searchWord},'%'))
</if>
<if test="checkStatus != null">
and t1.check_status = #{checkStatus}
</if>
<choose>
<when test="column != null and column != ''">
order by ${column}
<if test="sortType != null and sortType != ''">
${sortType}
</if>
</when>
<otherwise>
order by t1.extract_time desc
</otherwise>
</choose>
limit #{offset}, #{pageSize}
</select>
<select id="totalCount" resultType="Long">
select count(1) from event_extract t1
inner join event_category t2 on t1.event_type =t2.id
where t1.task_id = #{taskId} and t1.delete_status = 0
<if test="eventName!=null and eventName != ''">
and t1.event_name like CONCAT('%',#{eventName},'%')
</if>
<if test="eventType!=null and eventType != ''">
and t1.event_type = #{eventType}
</if>
<if test="startTime!=null and startTime != ''">
and t1.extract_time >= #{startTime}
</if>
<if test="endTime!=null and endTime != ''">
and t1.extract_time <![CDATA[ <= ]]> #{endTime}
</if>
<if test="searchWord != null and searchWord != ''">
and CONCAT_WS(',',t1.event_name,t1.event_label,t2.type_name) like concat('%',concat(#{searchWord},'%'))
</if>
<if test="checkStatus != null">
and t1.check_status = #{checkStatus}
</if>
</select>
<select id="frontDigPageList" resultType="com.zzsn.event.vo.EventFrontVO">
select t2.type_name,t1.id,t1.event_name,t1.extract_time as publishDate
from event_extract t1
inner join event_category t2 on t1.event_type =t2.id
where t1.check_status = 1 and t1.delete_status = 0
<if test="projectId!=null and projectId != ''">
and t1.project_id = #{projectId}
</if>
<if test="eventName!=null and eventName != ''">
and t1.event_name like CONCAT('%',#{eventName},'%')
</if>
<if test="eventTypes != null and eventTypes.size() > 0">
and t1.event_type in
<foreach collection="eventTypes" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
order by t1.extract_time desc
limit #{offset}, #{pageSize}
</select>
<select id="frontDigTotalCount" resultType="Long">
select count(1) from event_extract t1
where t1.check_status = 1 and t1.delete_status = 0
<if test="projectId!=null and projectId != ''">
and t1.project_id = #{projectId}
</if>
<if test="eventName!=null and eventName != ''">
and t1.event_name like CONCAT('%',#{eventName},'%')
</if>
<if test="eventTypes != null and eventTypes.size() > 0">
and t1.event_type in
<foreach collection="eventTypes" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
</mapper>
<?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.zzsn.event.mapper.EventExtractTaskMapper">
<resultMap id="BaseResultMap" type="com.zzsn.event.entity.EventExtractTask">
<id property="id" column="id" jdbcType="VARCHAR"/>
<result property="taskName" column="task_name" jdbcType="VARCHAR"/>
<result property="projectId" column="project_id" jdbcType="VARCHAR"/>
<result property="columnId" column="column_id" jdbcType="VARCHAR"/>
<result property="dataStatus" column="data_status" jdbcType="INTEGER"/>
<result property="startTime" column="start_time" jdbcType="TIMESTAMP"/>
<result property="endTime" column="end_time" jdbcType="TIMESTAMP"/>
<result property="taskStatus" column="task_status" jdbcType="INTEGER"/>
<result property="lastUpdateTime" column="last_update_time" jdbcType="TIMESTAMP"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
</resultMap>
<select id="pageList" resultType="com.zzsn.event.vo.EventExtractTaskVO">
select task.id,task.task_name,task.column_id,task.task_status,task.last_update_time,task.create_time,p.project_name
from event_extract_task task inner join project p on task.project_id = p.id
where task.delete_status = 0
<if test="projectId != null and projectId != ''">
and task.project_id = #{projectId}
</if>
<if test="taskName != null and taskName != ''">
and task.task_name like concat('%',concat(#{taskName},'%'))
</if>
<if test="startTime != null and startTime != ''">
and task.create_time >= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
and task.create_time <![CDATA[ <= ]]> #{endTime}
</if>
<if test="searchWord != null and searchWord != ''">
and CONCAT_WS(',',task.task_name,p.project_name) like concat('%',concat(#{searchWord},'%'))
</if>
order by task.create_time desc
limit #{offset},#{pageSize}
</select>
<select id="totalCount" resultType="Long">
select count(1) from event_extract_task task inner join project p on task.project_id = p.id
where task.delete_status = 0
<if test="projectId != null and projectId != ''">
and task.project_id = #{projectId}
</if>
<if test="taskName != null and taskName != ''">
and task.task_name like concat('%',concat(#{taskName},'%'))
</if>
<if test="startTime != null and startTime != ''">
and task.create_time >= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
and task.create_time <![CDATA[ <= ]]> #{endTime}
</if>
<if test="searchWord != null and searchWord != ''">
and CONCAT_WS(',',task.task_name,p.project_name) like concat('%',concat(#{searchWord},'%'))
</if>
</select>
</mapper>
<?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.zzsn.event.mapper.OtherDataMapper">
<select id="columnList" resultType="com.zzsn.event.util.tree.Node">
select id,channel_name as name from sys_base_channel where id not in(0,1)
<if test="columnIds != null and columnIds.size() > 0">
and id in
<foreach collection="columnIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
order by create_time
</select>
<select id="projectList" resultType="com.zzsn.event.util.tree.Node">
select id,project_name as name from project where is_delete = 0 order by create_time
</select>
</mapper>
......@@ -122,4 +122,56 @@
#{typeId}
</foreach>
</select>
<select id="subjectAndCustomerTree" resultType="com.zzsn.event.vo.SubjectTreeVO">
select c.id, c.event_name as name, m.id as pid, 'true' as ynSubject,c.start_time,c.end_time
from event c inner join
(
select a.id, b.permission_id
from customer_data_permission_map b
inner join customer a on b.customer_id = a.id and a.status = 1
and a.is_delete = 0 and b.category = 'subject'
<if test="userId !=null and userId != ''">
and b.permission_id in
(
select permission_id from sys_user_data_permission where category = 'subject'
where user_id = #{userId}
)
</if>
) m
on c.id = m.permission_id
where c.status = 1
<if test="customerId !=null and customerId != ''">
and m.id = #{customerId}
</if>
order by c.create_time desc
</select>
<select id="enableCustomerList" resultType="com.zzsn.event.vo.SubjectTreeVO">
select id,customer_name as name,'0' as pid,'false' as ynSubject from customer where status = 1 and is_delete = 0
<if test="customerId!=null and customerId != ''">
and id = #{customerId}
</if>
</select>
<select id="eventAndTypeTree" resultType="com.zzsn.event.vo.SubjectTreeVO">
select x.* from (
select s.id,s.type_name as name,s.pid,'false' as ynSubject,null as startTime,null as endTime,s.create_time
from subject_type s
where s.category = 2 and s.status = 1
union
select n.id,n.name,m.id as pid,'true' as ynSubject,n.start_time,n.end_time,n.create_time from
(
select s.id,s.type_name as name,s.pid from subject_type s
where s.category = 2 and s.status = 1
) m
inner join subject_type_map stm on m.id = stm.type_id
inner join
(
select s.id,s.event_name as name,s.start_time,s.end_time,s.create_time from event s
where s.status = 1
) n on stm.subject_id = n.id
) x
order by x.create_time desc
</select>
</mapper>
\ No newline at end of file
package com.zzsn.event.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zzsn.event.entity.EventExtract;
import com.zzsn.event.vo.EventExtractVO;
import com.zzsn.event.vo.EventFrontVO;
/**
* @author lenovo
* @description 针对表【event_extract(事件)】的数据库操作Service
* @createDate 2024-09-07 18:00:28
*/
public interface EventExtractService extends IService<EventExtract> {
/**
* 伪事件信息分页列表
*
* @param taskId 任务id
* @param searchWord 搜索词
* @param eventName 事件名称
* @param eventType 时间分类
* @param startTime 开始时间
* @param endTime 结束时间
* @param checkStatus 审核状态(2-不通过;1-通过;0-待审核)
* @param column 排序字段
* @param sortType 排序方式
* @param pageNo 偏移量
* @param pageSize 返回条数
* @author lkg
* @date 2024/9/9
*/
IPage<EventExtractVO> pageList(String taskId, String searchWord, String eventName, String startTime, String endTime,
String eventType, Integer checkStatus, String column, String sortType, Integer pageNo, Integer pageSize);
/**
* 自动追踪事件分页列表-门户
*
* @param projectId 项目id
* @param eventName 事件名称
* @param eventType 时间分类
* @param pageNo 偏移量
* @param pageSize 返回条数
* @author lkg
* @date 2024/9/9
*/
IPage<EventFrontVO> frontDigPageList(String projectId, String eventName, String eventType, Integer pageNo, Integer pageSize);
}
package com.zzsn.event.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zzsn.event.entity.EventExtractTask;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zzsn.event.vo.EventExtractTaskVO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author lenovo
* @description 针对表【event_extract_task(事件抽取任务表)】的数据库操作Service
* @createDate 2024-09-13 11:31:47
*/
public interface EventExtractTaskService extends IService<EventExtractTask> {
/**
* 事件抽取任务信息分页列表
*
* @param projectId 项目id
* @param searchWord 搜索词
* @param taskName 任务名称
* @param startTime 开始时间
* @param endTime 结束时间
* @param pageNo 当前页
* @param pageSize 返回条数
* @author lkg
* @date 2024/9/13
*/
IPage<EventExtractTaskVO> pageList(String projectId, String searchWord, String taskName, String startTime, String endTime,
Integer pageNo, Integer pageSize);
}
package com.zzsn.event.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zzsn.event.entity.CustomerDataPermissionMap;
/**
* @Description: 客户表
* @Author: jeecg-boot
* @Date: 2021-12-01
* @Version: V1.0
*/
public interface ICustomerDataPermissionMapService extends IService<CustomerDataPermissionMap> {
}
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zzsn.event.entity.Event;
import com.zzsn.event.util.tree.Node;
import com.zzsn.event.vo.*;
import java.util.Date;
......@@ -94,6 +95,17 @@ public interface IEventService extends IService<Event> {
Page<EventNewPlatVO> newPlatPageList(SubjectCondition subjectCondition, Integer pageNo, Integer pageSize);
/**
* 分页列表(客户)-新平台管理
*
* @param subjectCondition 筛选条件
* @param pageNo 当前页
* @param pageSize 返回条数
* @author lkg
* @date 2024/4/28
*/
IPage<EventNewPlatVO> newPlatCustomerPageList(SubjectCondition subjectCondition, Integer pageNo, Integer pageSize);
/**
* 热点事件列表-前10
*
* @param startTime 开始时间
......@@ -123,7 +135,7 @@ public interface IEventService extends IService<Event> {
void deleteMain(String id);
List<StatisticsKeyWordVo> hotWords(String index, String id, Integer number);
/**
* 公开且发布的事件信息集合
......@@ -169,6 +181,36 @@ public interface IEventService extends IService<Event> {
List<EventVO> eventList(List<String> eventIdList);
/**
* 项目列表
*
* @param userId 用户id
* @param customerId 客户id
* @author lkg
* @date 2024/4/29
*/
List<Node> projectList(String userId, String customerId);
/**
* 分类下的专题id集合
*
* @param userId 用户id
* @param typeIds 分类id集合
* @author lkg
* @date 2024/5/6
*/
List<String> selectSubjectByTypeIds(String userId, List<String> typeIds);
/**
* 用户下的事件id集合
*
* @param userId 用户id
* @param customerId 客户id
* @author lkg
* @date 2024/5/6
*/
List<String> selectSubjectWithCustomer(String userId, String customerId);
/**
* 专题绑定关键词的id集合
*
* @param subjectIds 专题id集合
......@@ -176,4 +218,75 @@ public interface IEventService extends IService<Event> {
* @date 2024/5/6
*/
List<String> bindKeyWordsIdList(List<String> subjectIds);
/**
* 专题绑定模型信息列表
*
* @param subjectIds 专题id集合
* @author lkg
* @date 2024/5/6
*/
List<LabelModelVo> selectLabelModelBySubjectId(List<String> subjectIds);
/**
* 企业标签下的企业信用代码集合
*
* @param labelIds 企业标签id集合
* @author lkg
* @date 2024/5/6
*/
List<String> codesByLabels(List<String> labelIds);
/**
* 专题直接绑定信息源-批量
*
* @param directBindInfoVO 参数封装
* @author lkg
* @date 2024/4/24
*/
void directBindInfoSource(DirectBindInfoVO directBindInfoVO);
/**
* 专题直接解绑信息源-批量
*
* @param directBindInfoVO 参数封装
* @author lkg
* @date 2024/4/24
*/
void directRemoveInfoSource(DirectBindInfoVO directBindInfoVO);
/**
* 删除专题下已屏蔽的信息源(即恢复绑定关系)
*
* @param subjectId 专题id
* @param infoSourceId 信息源id
* @author lkg
* @date 2024/5/7
*/
void removeUnBindInfoSource(String subjectId, String infoSourceId);
/**
* 专题关联信息源时间段内的采集量统计
*
* @param subjectIds 专题id集合
* @param startDate 开始时间
* @param endDate 结束时间
* @author lkg
* @date 2024/5/7
*/
List<List<String>> subjectStatistics(List<String> subjectIds, String startDate, String endDate);
/**
* 专题绑定的关键词组-分页列表
*
* @param subjectIds 专题id集合
* @param groupName 词组名称
* @param wordName 关键词名称
* @param pageNo 当前页
* @param pageSize 返回条数
* @author lkg
* @date 2024/5/7
*/
IPage<KeyWordsPage> bindKeyWordsList(List<String> subjectIds, String groupName, String wordName, Integer pageNo, Integer pageSize);
}
......@@ -111,4 +111,14 @@ public interface ISubjectTypeService extends IService<SubjectType> {
* @date 2025/1/8
*/
List<SubjectTypeTreeVO> typeAndBindCountTreeList(Integer category);
/**
* 可用的专题和客户列表
*
* @param customerId 客户id
* @author lkg
* @date 2024/4/30
*/
List<SubjectTreeVO> subjectAndCustomerTree(String userId,String customerId);
List<SubjectTreeVO> eventAndTypeTree();
}
package com.zzsn.event.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zzsn.event.entity.SysUserDataPermission;
/**
* @author lkg
* @description:
* @date 2022/6/20 14:10
*/
public interface ISysUserDataPermissionService extends IService<SysUserDataPermission> {
}
package com.zzsn.event.service;
import com.zzsn.event.util.tree.Node;
import java.util.List;
/**
* 其他数据
*
* @author lkg
* @date 2024/9/13
*/
public interface OtherDataService {
/**
* 栏目集合
*
* @author lkg
* @date 2024/9/13
*/
List<Node> columnList(List<String> columnIds);
/**
* 项目集合
*
* @author lkg
* @date 2024/9/13
*/
List<Node> projectList();
}
package com.zzsn.event.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zzsn.event.entity.CustomerDataPermissionMap;
import com.zzsn.event.mapper.CustomerDataPermissionMapMapper;
import com.zzsn.event.service.ICustomerDataPermissionMapService;
import org.springframework.stereotype.Service;
/**
* @Description: 客户表
* @Author: jeecg-boot
* @Date: 2021-12-01
* @Version: V1.0
*/
@Service
public class CustomerDataPermissionMapImpl extends ServiceImpl<CustomerDataPermissionMapMapper, CustomerDataPermissionMap> implements ICustomerDataPermissionMapService {
}
package com.zzsn.event.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zzsn.event.entity.EventExtract;
import com.zzsn.event.service.EventExtractService;
import com.zzsn.event.mapper.EventExtractMapper;
import com.zzsn.event.service.IEventCategoryService;
import com.zzsn.event.util.tree.Node;
import com.zzsn.event.util.tree.TreeUtil;
import com.zzsn.event.vo.EventExtractVO;
import com.zzsn.event.vo.EventFrontVO;
import com.zzsn.event.vo.EventManageVO;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
* @author lenovo
* @description 针对表【event_extract(事件)】的数据库操作Service实现
* @createDate 2024-09-07 18:00:28
*/
@Service
public class EventExtractServiceImpl extends ServiceImpl<EventExtractMapper, EventExtract> implements EventExtractService {
@Autowired
private IEventCategoryService eventCategoryService;
@Override
public IPage<EventExtractVO> pageList(String taskId, String searchWord, String eventName,
String startTime, String endTime, String eventType,
Integer checkStatus, String column, String sortType, Integer pageNo, Integer pageSize) {
int offset = (pageNo - 1) * pageSize;
List<EventExtractVO> pageList = baseMapper.pageList(taskId, searchWord, eventName, startTime, endTime, eventType, checkStatus, column, sortType, offset, pageSize);
Long totalCount = baseMapper.totalCount(taskId, searchWord, eventName, startTime, endTime, eventType, checkStatus);
IPage<EventExtractVO> pageData = new Page<>(pageNo, pageSize, totalCount);
pageData.setRecords(pageList);
return pageData;
}
@Override
public IPage<EventFrontVO> frontDigPageList(String projectId, String eventName, String eventType, Integer pageNo, Integer pageSize) {
int offset = (pageNo - 1) * pageSize;
List<String> eventTypes = new ArrayList<>();
if (StringUtils.isNotEmpty(eventType)) {
List<Node> nodes = eventCategoryService.categoryList();
eventTypes = TreeUtil.belowList(nodes, eventType, true);
}
List<EventFrontVO> pageList = baseMapper.frontDigPageList(projectId, eventName, eventTypes, offset, pageSize);
Long count = baseMapper.frontDigTotalCount(projectId, eventName, eventTypes);
IPage<EventFrontVO> pageData = new Page<>(pageNo, pageSize, count);
pageData.setRecords(pageList);
return pageData;
}
}
package com.zzsn.event.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zzsn.event.entity.EventExtract;
import com.zzsn.event.entity.EventExtractTask;
import com.zzsn.event.mapper.EventExtractTaskMapper;
import com.zzsn.event.service.EventExtractService;
import com.zzsn.event.service.EventExtractTaskService;
import com.zzsn.event.service.OtherDataService;
import com.zzsn.event.util.tree.Node;
import com.zzsn.event.vo.EventExtractTaskVO;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
/**
* @author lenovo
* @description 针对表【event_extract_task(事件抽取任务表)】的数据库操作Service实现
* @createDate 2024-09-13 11:31:47
*/
@Service
public class EventExtractTaskServiceImpl extends ServiceImpl<EventExtractTaskMapper, EventExtractTask>
implements EventExtractTaskService{
@Autowired
private EventExtractService eventExtractService;
@Autowired
private OtherDataService otherDataService;
@Override
public IPage<EventExtractTaskVO> pageList(String projectId, String searchWord, String taskName, String startTime, String endTime, Integer pageNo, Integer pageSize) {
int offset = (pageNo - 1) * pageSize;
Long count = baseMapper.totalCount(projectId, searchWord, taskName, startTime, endTime);
IPage<EventExtractTaskVO> pageData = new Page<>(pageNo, pageSize,count);
if (count > 0) {
List<EventExtractTaskVO> pageList = baseMapper.pageList(projectId, searchWord, taskName, startTime, endTime, offset, pageSize);
List<String> taskIds = new ArrayList<>();
Set<String> columnIds = new HashSet<>();
pageList.forEach(e->{
taskIds.add(e.getId());
String columnId = e.getColumnId();
Collections.addAll(columnIds, columnId.split(","));
});
// 任务数据范围(栏目名称)
List<Node> columnList = otherDataService.columnList(new ArrayList<>(columnIds));
Map<String, Node> columnMap = columnList.stream().collect(Collectors.toMap(Node::getId,Function.identity()));
//任务抽取事件的数量统计
Map<String, List<EventExtract>> map = new HashMap<>();
List<EventExtract> eventExtractList = eventExtractService.list(Wrappers.<EventExtract>lambdaQuery().select(EventExtract::getTaskId, EventExtract::getCheckStatus)
.in(EventExtract::getTaskId, taskIds));
if (CollectionUtils.isNotEmpty(eventExtractList)) {
map = eventExtractList.stream().collect(Collectors.groupingBy(EventExtract::getTaskId));
}
for (EventExtractTaskVO taskVO : pageList) {
//任务抽取事件的数量
String taskId = taskVO.getId();
List<EventExtract> eventExtracts = map.get(taskId);
if (CollectionUtils.isNotEmpty(eventExtracts)) {
long noCheckCount = eventExtracts.stream().filter(e -> e.getCheckStatus() == 0).count();
taskVO.setExtractEventCount(eventExtracts.size());
taskVO.setNoCheckExtractEventCount((int)noCheckCount);
} else {
taskVO.setExtractEventCount(0);
taskVO.setNoCheckExtractEventCount(0);
}
//数据范围
String columnId = taskVO.getColumnId();
StringBuilder stringBuilder = new StringBuilder();
for (String s : columnId.split(",")) {
Node column = columnMap.get(s);
stringBuilder.append(",").append(column.getName());
}
taskVO.setColumnName(stringBuilder.substring(1));
}
pageData.setRecords(pageList);
}
return pageData;
}
}
package com.zzsn.event.service.impl;
import com.zzsn.event.mapper.OtherDataMapper;
import com.zzsn.event.service.OtherDataService;
import com.zzsn.event.util.tree.Node;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
*
*
* @author lkg
* @date 2024/9/13
*/
@Service
public class OtherDataServiceImpl implements OtherDataService {
@Resource
private OtherDataMapper otherDataMapper;
@Override
public List<Node> columnList(List<String> columnIds) {
return otherDataMapper.columnList(columnIds);
}
@Override
public List<Node> projectList() {
return otherDataMapper.projectList();
}
}
......@@ -20,10 +20,7 @@ import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
/**
......@@ -114,6 +111,21 @@ public class SubjectTypeServiceImpl extends ServiceImpl<SubjectTypeMapper, Subje
}
@Override
public List<SubjectTreeVO> subjectAndCustomerTree(String userId,String customerId) {
List<SubjectTreeVO> subjectTreeVOS = baseMapper.enableCustomerList(customerId);
List<SubjectTreeVO> list = baseMapper.subjectAndCustomerTree(userId,customerId);
subjectTreeVOS.addAll(list);
List<SubjectTreeVO> tree = TreeUtil.tree(subjectTreeVOS, "0");
tree.forEach(this::subjectNumCount);
return tree;
}
@Override
public List<SubjectTreeVO> eventAndTypeTree() {
return baseMapper.eventAndTypeTree();
}
@Override
public List<String> researchCenterBelowIdList(String typeId, Integer category) {
String username = UserUtil.getLoginUser().getUsername();
List<Node> nodes = baseMapper.enableList(category,username);
......@@ -202,7 +214,21 @@ public class SubjectTypeServiceImpl extends ServiceImpl<SubjectTypeMapper, Subje
}
return sum;
}
private void subjectNumCount(SubjectTreeVO subjectTreeVO) {
Boolean ynSubject = subjectTreeVO.getYnSubject();
if (!ynSubject) {
int num = 0;
List<? extends Node> children = subjectTreeVO.getChildren();
if (CollectionUtils.isNotEmpty(children)) {
for (Node node : children) {
SubjectTreeVO subjectTreeNode = (SubjectTreeVO)node;
subjectNumCount(subjectTreeNode);
num = num + 1;
}
subjectTreeVO.setSubjectCount(num);
}
}
}
@Override
public List<SubjectTypeVo> subjectListByType(String parentId) {
if (!parentId.equals("0")) {
......
package com.zzsn.event.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zzsn.event.entity.SysUserDataPermission;
import com.zzsn.event.mapper.SysUserDataPermissionMapper;
import com.zzsn.event.service.ISysUserDataPermissionService;
import org.springframework.stereotype.Service;
/**
* @author lkg
* @description:
* @date 2022/6/20 14:10
*/
@Service
public class SysUserDataPermissionServiceImpl extends ServiceImpl<SysUserDataPermissionMapper, SysUserDataPermission> implements ISysUserDataPermissionService {
}
package com.zzsn.event.task;
import com.alibaba.fastjson2.JSON;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.zzsn.event.constant.Constants;
import com.zzsn.event.entity.EventExtractTask;
import com.zzsn.event.es.EsService;
import com.zzsn.event.service.EventExtractTaskService;
import com.zzsn.event.util.DateUtil;
import com.zzsn.event.util.RedisUtil;
import com.zzsn.event.vo.EventDigDataVO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.ListUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
/**
* 事件挖掘任务
*
* @author lkg
* @date 2024/8/30
*/
@Slf4j
@Component
public class EventDigTask {
@Autowired
private EventExtractTaskService eventExtractTaskService;
@Autowired
private EsService esService;
@Resource
private KafkaTemplate<String, String> kafkaTemplate;
@Autowired
private RedisUtil redisUtil;
private final static String EVENT_DIG_TIME_KEY = "EVENT_DIG_HANDLER_TIME::";
/*@Scheduled(cron = "0 0/5 * * * ?")
public void sendData() {
List<EventExtractTask> extractTaskList = eventExtractTaskService.list(Wrappers.<EventExtractTask>lambdaQuery().eq(EventExtractTask::getDeleteStatus, 0)
.eq(EventExtractTask::getTaskStatus, 1));
for (EventExtractTask eventExtractTask : extractTaskList) {
CompletableFuture.runAsync(() -> {
String taskId = eventExtractTask.getId();
eventExtractTaskService.update(Wrappers.<EventExtractTask>lambdaUpdate().set(EventExtractTask::getLastUpdateTime, new Date())
.eq(EventExtractTask::getId, taskId));
String projectId = eventExtractTask.getProjectId();
String columnId = eventExtractTask.getColumnId();
Integer dataStatus = eventExtractTask.getDataStatus();
String endTime = null;
if (eventExtractTask.getEndTime() != null) {
endTime = DateUtil.dateToString(eventExtractTask.getEndTime());
}
String startTime = DateUtil.dateToString(eventExtractTask.getStartTime());
String redisKey = EVENT_DIG_TIME_KEY + taskId;
Object object = redisUtil.get(redisKey);
if (object != null) {
startTime = object.toString();
}
List<EventDigDataVO> eventDigDataVOS = esService.pageListOfColumn(columnId, dataStatus, startTime, endTime, 120);
if (CollectionUtils.isNotEmpty(eventDigDataVOS)) {
//分批发送
List<List<EventDigDataVO>> partition = ListUtils.partition(eventDigDataVOS, 30);
partition.forEach(e -> {
Map<String, Object> dataMap = new HashMap<>();
dataMap.put("taskId", taskId);
dataMap.put("projectId", projectId);
dataMap.put("dataList", e);
kafkaTemplate.send(Constants.EVENT_DIG_SEND_TOPIC, JSON.toJSONString(dataMap));
});
String processDate = eventDigDataVOS.get(eventDigDataVOS.size() - 1).getProcessDate();
if (endTime != null && processDate.compareTo(endTime) >= 0) {
eventExtractTaskService.update(Wrappers.<EventExtractTask>lambdaUpdate().set(EventExtractTask::getTaskStatus, 0)
.eq(EventExtractTask::getId, taskId));
log.info("事件抽取任务-{},数据范围内的资讯已全部处理完,任务状态关闭", taskId);
} else {
//将最新时间存入redis,供下次使用
redisUtil.set(redisKey, processDate);
log.info("事件抽取任务-{},本次kafka推送开始时间为-{},总条数为-{}", taskId, startTime, eventDigDataVOS.size());
}
}
});
}
}*/
}
......@@ -15,7 +15,6 @@ import java.util.List;
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class UserVo implements Serializable {
/**
* 登录人id
*/
......@@ -121,4 +120,7 @@ public class UserVo implements Serializable {
/**用户绑定的角色所属的项目的id集合*/
List<String> projectIds;
private String userId;
private String customerId;
}
package com.zzsn.event.vo;
import lombok.Getter;
import lombok.Setter;
/**
*
*
* @author lkg
* @date 2024/8/30
*/
@Getter
@Setter
public class EventDigDataVO extends SubjectDataVo{
private String processDate;
}
package com.zzsn.event.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
* 事件挖掘任务
*
* @author lkg
* @date 2024/9/13
*/
@Getter
@Setter
public class EventExtractTaskVO {
private String id;
private String taskName;
private String projectName;
private String columnId;
private String columnName;
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date createTime;
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date lastUpdateTime;
private Integer taskStatus;
private Integer extractEventCount;
private Integer noCheckExtractEventCount;
}
package com.zzsn.event.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
*
*
* @author lkg
* @date 2024/4/8
*/
@Data
public class EventExtractVO {
private String id;
private String eventName;
private Integer eventType;
private String typeName;
private String eventLabel;
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date extractTime;
private Integer checkStatus;
private String relatedId;
}
......@@ -32,4 +32,8 @@ public class SubjectCondition {
private Integer facePublic;
/**用户账号*/
private String username;
private String userId;
private String customerId;
}
package com.zzsn.event.vo;
import lombok.Data;
/**
* @Description: 3
* @Author: jeecg-boot
* @Date: 2023-08-01
* @Version: V1.0
*/
@Data
public class SubjectInfoSourceLabelTypeVo {
/**信息源组id*/
private String sourceId;
/**专题id*/
private String subjectId;
}
......@@ -20,4 +20,6 @@ public class SubjectTreeVO extends Node {
private String startTime;
private String endTime;
private String createTime;
private Integer subjectCount;
}
package com.zzsn.event.xxljob.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* @Description: 信息源表
* @Author: jeecg-boot
* @Date: 2021-10-15
* @Version: V1.0
*/
@ApiModel(value="info_source对象", description="信息源表")
@Data
@TableName("info_source")
public class InfoSource implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**信息源编码*/
@ApiModelProperty(value = "信息源编码")
private String infoSourceCode;
/**信息源名称*/
@ApiModelProperty(value = "信息源名称")
private String webSiteName;
/**栏目名称*/
@ApiModelProperty(value = "栏目名称")
private String siteName;
/**栏目地址*/
@ApiModelProperty(value = "栏目地址")
private String siteUri;
/**网站重要级别*/
@ApiModelProperty(value = "网站重要级别")
private String siteLevel;
/**国家*/
@ApiModelProperty(value = "国家")
private String country;
/**是否境外*/
@ApiModelProperty(value = "是否境外")
private String ynOther;
/**地区*/
@ApiModelProperty(value = "地区")
private String area;
/**是否需要登录*/
@ApiModelProperty(value = "是否需要登录")
private Integer ynLogin;
/**语种*/
@ApiModelProperty(value = "语种")
private String language;
/**是否公共*/
@ApiModelProperty(value = "是否公共")
private String ynPublic;
/**是否需要翻墙*/
@ApiModelProperty(value = "是否需要翻墙")
private Integer ynAbroad;
/**是否需要代理*/
@ApiModelProperty(value = "是否需要代理")
private Integer ynAgent;
/**动态爬取*/
@ApiModelProperty(value = "动态爬取")
private Integer ynBrowser;
/**调度时间间隔*/
@ApiModelProperty(value = "调度时间间隔")
private String period;
/**调度周期(cron自动生成)*/
@ApiModelProperty(value = "调度周期(cron自动生成)")
private String cron;
/**调度周期说明*/
@ApiModelProperty(value = "调度周期说明")
private String remarkCron;
/**信息源状态*/
@ApiModelProperty(value = "信息源状态")
private Integer status;
/**网站可信度*/
@ApiModelProperty(value = "网站可信度")
private Integer siteReliability;
/**信息源综合评分*/
@ApiModelProperty(value = "信息源综合评分")
private Integer score;
/**爬取深度*/
@ApiModelProperty(value = "爬取深度")
private Integer crawlDepth;
/**爬取方式*/
@ApiModelProperty(value = "爬取方式")
private Integer crawlType;
/**历史数据URL*/
@ApiModelProperty(value = "历史数据URL")
private String hisUriExp;
/**历史数据开始时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "历史数据开始时间")
private Date hisDateStarttime;
/**历史数据结束时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "历史数据结束时间")
private Date hisDateEndtime;
/**创建人*/
@ApiModelProperty(value = "创建人")
private String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private Date updateTime;
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private String sysOrgCode;
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论