This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
enderbyendera-realtime-prot…/src/main/java/com/realtime/protection/server/command/CommandMapper.java
PushM aa6188b1ef 1、指令is_judged变更为四个状态,修改指令研判接口
2、修改处理研判后任务的逻辑,若指令存在,增加is_judged判断,如果为2,要变为1,其他不变。如果指令不存在,isjudged默认为2
2024-06-16 01:10:36 +08:00

64 lines
2.8 KiB
Java

package com.realtime.protection.server.command;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.realtime.protection.configuration.entity.task.FiveTupleWithMask;
import com.realtime.protection.configuration.entity.task.TaskCommandInfo;
import com.realtime.protection.configuration.entity.whitelist.WhiteListObject;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface CommandMapper {
void createCommand(@Param("info") TaskCommandInfo taskCommandInfo);
void createCommands(@Param("command_infos") List<TaskCommandInfo> taskCommandInfos);
Boolean stopCommandsByTaskId(@Param("task_id") Long taskId);
@DS("doris")
Boolean removeCommandsByTaskId(@Param("task_id") Long taskId);
Boolean startCommandsByTaskId(@Param("task_id") Long taskId);
Boolean setCommandJudged(@Param("command_id") String commandId,
@Param("is_judged") Integer isJudged);
List<TaskCommandInfo> queryCommandInfos(@Param("task_id") Long taskId,
@Param("src_ip") String sourceIP,
@Param("src_port") String sourcePort,
@Param("dst_ip") String destinationIP,
@Param("dst_port") String destinationPort,
@Param("page") Integer page,
@Param("page_num") Integer pageNum);
TaskCommandInfo queryCommandInfoByUUID(@Param("uuid") String uuid);
String queryCommandInfo(@Param("command_info") TaskCommandInfo commandInfo);
Integer queryCommandTotalNum(@Param("task_id") Long taskId,
@Param("src_ip") String sourceIP,
@Param("src_port") String sourcePort,
@Param("dst_ip") String destinationIP,
@Param("dst_port") String destinationPort);
void createCommandInWhiteListHit(@Param("info") TaskCommandInfo commandInfo);
void updateCommandHistoryExpireTime(@Param("command_id") String commandUUID);
void insertCommandHistory(@Param("command_id") String commandUUID);
void updateCommandHistoryExpireTimeBatch(@Param("commandIds")List<String> commandIds);
void insertCommandHistoryBatch(@Param("commandIds")List<String> commandIds);
@DS("mysql")
List<WhiteListObject> whiteListCommandCheck(@Param("command") FiveTupleWithMask fiveTupleWithMask);
@DS("mysql")
void createCommandWhiteListConnect(@Param("command_id") String uuid, @Param("whiteLists") List<WhiteListObject> whiteListsHit);
void updateCommandIsJudgedIfIgnoreThisTime(@Param("command_id") String commandUUID);
}