| | |
| | | <?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"> |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.se.system.mapper.SysCtrlLogMapper"> |
| | | |
| | | |
| | | <resultMap type="SysCtrlLog" id="SysCtrlLogResult"> |
| | | <result property="logId" column="log_id" /> |
| | | <result property="tabId" column="tab_id" /> |
| | | <result property="title" column="title" /> |
| | | <result property="type" column="type" /> |
| | | <result property="ip" column="ip" /> |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="selectSysCtrlLogVo"> |
| | | select log_id, title, type, ip, url, method, args, msg, oper, time, remark from sys_ctrl_log |
| | | select log_id, tab_id, title, type, ip, url, method, args, msg, oper, time, remark from sys_ctrl_log |
| | | </sql> |
| | | |
| | | <select id="selectSysCtrlLogList" parameterType="SysCtrlLog" resultMap="SysCtrlLogResult"> |
| | | <include refid="selectSysCtrlLogVo"/> |
| | | <where> |
| | | <where> |
| | | <if test="tabId != null "> and tab_id = #{tabId}</if> |
| | | <if test="title != null and title != ''"> and title = #{title}</if> |
| | | <if test="type != null and type != ''"> and type = #{type}</if> |
| | | <if test="ip != null and ip != ''"> and ip = #{ip}</if> |
| | |
| | | <if test="time != null "> and time = #{time}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | <select id="selectSysCtrlLogByLogId" parameterType="Long" resultMap="SysCtrlLogResult"> |
| | | <include refid="selectSysCtrlLogVo"/> |
| | | where log_id = #{logId} |
| | |
| | | <insert id="insertSysCtrlLog" parameterType="SysCtrlLog" useGeneratedKeys="true" keyProperty="logId"> |
| | | insert into sys_ctrl_log |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="tabId != null">tab_id,</if> |
| | | <if test="title != null and title != ''">title,</if> |
| | | <if test="type != null">type,</if> |
| | | <if test="ip != null">ip,</if> |
| | |
| | | <if test="oper != null">oper,</if> |
| | | <if test="time != null">time,</if> |
| | | <if test="remark != null">remark,</if> |
| | | </trim> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="tabId != null">#{tabId},</if> |
| | | <if test="title != null and title != ''">#{title},</if> |
| | | <if test="type != null">#{type},</if> |
| | | <if test="ip != null">#{ip},</if> |
| | |
| | | <if test="oper != null">#{oper},</if> |
| | | <if test="time != null">#{time},</if> |
| | | <if test="remark != null">#{remark},</if> |
| | | </trim> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateSysCtrlLog" parameterType="SysCtrlLog"> |
| | | update sys_ctrl_log |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="tabId != null">tab_id = #{tabId},</if> |
| | | <if test="title != null and title != ''">title = #{title},</if> |
| | | <if test="type != null">type = #{type},</if> |
| | | <if test="ip != null">ip = #{ip},</if> |
| | |
| | | </delete> |
| | | |
| | | <delete id="deleteSysCtrlLogByLogIds" parameterType="String"> |
| | | delete from sys_ctrl_log where log_id in |
| | | delete from sys_ctrl_log where log_id in |
| | | <foreach item="logId" collection="array" open="(" separator="," close=")"> |
| | | #{logId} |
| | | </foreach> |