16b73dffee
2、适配南网达梦数据库安全版SQL语句Group by 不支持自定义函数 3、达梦数据库驱动改为达梦提供的指定版本 4、修改syslog-consumer模块yaml 文件kafka 变量名称 5、修改访问日志告警表新增4个字段,完善异常行为详情页面显示字段
82 lines
3.6 KiB
XML
82 lines
3.6 KiB
XML
<?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.common.mapper.DeviceCollectTaskMapper">
|
|
|
|
<resultMap id="BaseResultMap" type="com.common.entity.DeviceCollectTask">
|
|
<id column="id" property="id" />
|
|
<result column="created_at" property="createdAt" />
|
|
<result column="updated_at" property="updatedAt" />
|
|
<result column="deleted_at" property="deletedAt" />
|
|
<result column="device_id" property="deviceId" />
|
|
<result column="method" property="method" />
|
|
<result column="task_name" property="taskName" />
|
|
<result column="first_time" property="firstTime" />
|
|
<result column="last_success_time" property="lastSuccessTime" />
|
|
<result column="last_failed_time" property="lastFailedTime" />
|
|
<result column="detail_id" property="detailId" />
|
|
<result column="epm" property="epm" />
|
|
<result column="epm_peak" property="epmPeak" />
|
|
<result column="process_architecture" property="processArchitecture" />
|
|
<result column="task_count" property="taskCount" />
|
|
<result column="recent_discover_time" property="recentDiscoverTime" />
|
|
<result column="epm_upper_limit" property="epmUpperLimit" />
|
|
<result column="expire_time" property="expireTime" />
|
|
<result column="remark" property="remark" />
|
|
<result column="device_ip" property="deviceIp" />
|
|
<result column="organization_id" property="organizationId" />
|
|
</resultMap>
|
|
|
|
<sql id="Base_Column_List">
|
|
id, created_at, updated_at, deleted_at, device_id, method, task_name,
|
|
first_time, last_success_time, last_failed_time, detail_id, epm, epm_peak,
|
|
process_architecture, task_count, recent_discover_time, epm_upper_limit,
|
|
expire_time, remark, device_ip, organization_id
|
|
</sql>
|
|
|
|
<!-- 多条件组合查询 -->
|
|
<select id="selectByCondition" parameterType="com.common.entity.DeviceCollectTask" resultMap="BaseResultMap">
|
|
SELECT <include refid="Base_Column_List" />
|
|
FROM device_collect_task
|
|
<where>
|
|
<if test="deviceId != null">
|
|
AND device_id = #{deviceId}
|
|
</if>
|
|
<if test="method != null">
|
|
AND method = #{method}
|
|
</if>
|
|
<if test="taskName != null and taskName != ''">
|
|
AND task_name LIKE CONCAT('%', #{taskName}, '%')
|
|
</if>
|
|
<if test="detailId != null">
|
|
AND detail_id = #{detailId}
|
|
</if>
|
|
<if test="processArchitecture != null">
|
|
AND process_architecture = #{processArchitecture}
|
|
</if>
|
|
<if test="epmUpperLimit != null">
|
|
AND epm_upper_limit = #{epmUpperLimit}
|
|
</if>
|
|
<!-- 时间范围查询 -->
|
|
<if test="firstTime != null">
|
|
AND first_time >= #{firstTime}
|
|
</if>
|
|
<if test="lastSuccessTime != null">
|
|
AND last_success_time >= #{lastSuccessTime}
|
|
</if>
|
|
<!-- 新增字段查询 -->
|
|
<if test="deviceIp != null and deviceIp != ''">
|
|
AND device_ip = #{deviceIp}
|
|
</if>
|
|
<if test="organizationId != null">
|
|
AND organization_id = #{organizationId}
|
|
</if>
|
|
<if test="remark != null and remark != ''">
|
|
AND remark LIKE CONCAT('%', #{remark}, '%')
|
|
</if>
|
|
</where>
|
|
ORDER BY updated_at DESC
|
|
</select>
|
|
|
|
</mapper> |