添加行为记录表

This commit is contained in:
chenshaohua
2026-07-24 13:43:39 +08:00
parent 9b6b38d6b6
commit 83ac495842
7 changed files with 316 additions and 0 deletions

View File

@@ -0,0 +1,63 @@
<?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.ruoyi.cms.mapper.msg.HrUserBehaviorRecordMapper">
<resultMap type="com.ruoyi.cms.domain.msg.HrUserBehaviorRecord" id="HrUserBehaviorRecordResult">
<id column="id" property="id"/>
<result column="actor_type" property="actorType"/>
<result column="actor_id" property="actorId"/>
<result column="target_type" property="targetType"/>
<result column="target_id" property="targetId"/>
<result column="behavior_type" property="behaviorType"/>
<result column="view_duration" property="viewDuration"/>
<result column="view_times" property="viewTimes"/>
<result column="behavior_status" property="behaviorStatus"/>
<result column="del_flag" property="delFlag"/>
<result column="create_by" property="createBy"/>
<result column="create_time" property="createTime"/>
<result column="update_by" property="updateBy"/>
<result column="update_time" property="updateTime"/>
<result column="remark" property="remark"/>
</resultMap>
<sql id="selectHrUserBehaviorRecordVo">
SELECT id, actor_type, actor_id, target_type, target_id, behavior_type,
view_duration, view_times, behavior_status, del_flag,
create_by, create_time, update_by, update_time, remark
FROM hr_user_behavior_record
</sql>
<!-- 查询列表 -->
<select id="selectBehaviorRecordList" resultMap="HrUserBehaviorRecordResult">
<include refid="selectHrUserBehaviorRecordVo"/>
<where> del_flag = '0'
<if test="actorType != null">
AND actor_type = #{actorType}
</if>
<if test="actorId != null">
AND actor_id = #{actorId}
</if>
<if test="targetType != null">
AND target_type = #{targetType}
</if>
<if test="targetId != null">
AND target_id = #{targetId}
</if>
<if test="behaviorType != null">
AND behavior_type = #{behaviorType}
</if>
<if test="behaviorStatus != null">
AND behavior_status = #{behaviorStatus}
</if>
<if test="beginTime != null">
AND create_time &gt;= #{beginTime}
</if>
<if test="endTime != null">
AND create_time &lt;= #{endTime}
</if>
</where>
ORDER BY create_time DESC
</select>
</mapper>