<?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.terra.system.mapper.sys.ResLogMapper">
|
<select id="selectCount" resultType="java.lang.Integer">
|
select count(*) from lf.sys_res_log
|
<where>
|
<if test="resid != null">
|
resid = #{resid}
|
</if>
|
</where>
|
</select>
|
|
<select id="selectByPage" resultType="com.terra.system.entity.sys.ResLogEntity">
|
select * from lf.sys_res_log
|
<where>
|
<if test="resid != null">
|
resid = #{resid}
|
</if>
|
</where>
|
order by id desc
|
limit #{limit} offset #{offset}
|
</select>
|
|
<select id="selectAll" resultType="com.terra.system.entity.sys.ResLogEntity">
|
select * from lf.sys_res_log order by id desc;
|
</select>
|
|
<select id="selectById" resultType="com.terra.system.entity.sys.ResLogEntity">
|
select * from lf.sys_res_log where id = #{id}
|
</select>
|
|
<insert id="insert" parameterType="com.terra.system.entity.sys.ResLogEntity">
|
insert into lf.sys_res_log
|
(resid,type,ip,url,create_user,create_time)
|
values
|
(#{resid},#{type},#{ip},#{url},#{createUser},now())
|
</insert>
|
|
<insert id="inserts">
|
insert into lf.sys_res_log
|
(resid,type,ip,url,create_user,create_time)
|
values
|
<foreach collection="list" item="item" index="index" separator=",">
|
(#{item.resid},#{item.type},#{item.ip},#{item.url},#{item.createUser},now())
|
</foreach>
|
</insert>
|
|
<delete id="delete">
|
delete from lf.sys_res_log where id = #{id}
|
</delete>
|
|
<delete id="deletes">
|
delete from lf.sys_res_log where id in
|
<foreach item="id" collection="ids" index="index" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
|
<update id="update">
|
update lf.sys_res_log
|
set resid=#{resid},type=#{type},ip=#{ip},url=#{url}
|
where id=#{id}
|
</update>
|
|
<update id="updates">
|
<foreach collection="list" item="item" index="index" separator=";">
|
update lf.sys_res_log
|
set resid=#{item.resid},type=#{item.type},ip=#{item.ip},url=#{item.url}
|
where id = #{item.id}
|
</foreach>
|
</update>
|
</mapper>
|