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

62 lines
2.7 KiB
Java
Raw Normal View History

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);
2024-06-06 12:56:33 +08:00
@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);
}