|
|
|
@ -19,10 +19,10 @@
|
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
|
|
|
|
<mapper namespace="org.apache.dolphinscheduler.dao.mapper.AuditLogMapper"> |
|
|
|
|
<sql id="baseSql"> |
|
|
|
|
id, user_id, model_type, operation_type, model_id, model_name, time, detail, description, latency |
|
|
|
|
id, user_id, model_type, operation_type, model_id, model_name, create_time, detail, description, latency |
|
|
|
|
</sql> |
|
|
|
|
<sql id="baseSqlV2"> |
|
|
|
|
${alias}.id, ${alias}.user_id, ${alias}.model_type, ${alias}.operation_type, ${alias}.model_id, ${alias}.model_name, ${alias}.time, ${alias}.detail, ${alias}.description, ${alias}.latency |
|
|
|
|
${alias}.id, ${alias}.user_id, ${alias}.model_type, ${alias}.operation_type, ${alias}.model_id, ${alias}.model_name, ${alias}.create_time, ${alias}.detail, ${alias}.description, ${alias}.latency |
|
|
|
|
</sql> |
|
|
|
|
|
|
|
|
|
<select id="queryAuditLog" resultType="org.apache.dolphinscheduler.dao.entity.AuditLog"> |
|
|
|
@ -36,7 +36,7 @@
|
|
|
|
|
join t_ds_user u on log.user_id = u.id |
|
|
|
|
where 1 = 1 |
|
|
|
|
<if test="startDate != null"> |
|
|
|
|
and log.time > #{startDate} and log.time <![CDATA[ <=]]> #{endDate} |
|
|
|
|
and log.create_time > #{startDate} and log.create_time <![CDATA[ <=]]> #{endDate} |
|
|
|
|
</if> |
|
|
|
|
<if test="modelTypeList != null and modelTypeList.size() > 0"> |
|
|
|
|
and log.model_type in |
|
|
|
@ -56,7 +56,7 @@
|
|
|
|
|
<if test="modelName != null and modelName != ''"> |
|
|
|
|
and log.model_name like concat ('%', #{modelName}, '%') |
|
|
|
|
</if> |
|
|
|
|
order by log.time desc |
|
|
|
|
order by log.create_time desc |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
</mapper> |
|
|
|
|