若依 2.0
This commit is contained in:
46
src/main/resources/mybatis/monitor/LogininforMapper.xml
Normal file
46
src/main/resources/mybatis/monitor/LogininforMapper.xml
Normal file
@ -0,0 +1,46 @@
|
||||
<?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.project.monitor.logininfor.mapper.LogininforMapper">
|
||||
|
||||
<resultMap type="Logininfor" id="LogininforResult">
|
||||
<id property="infoId" column="info_id" />
|
||||
<result property="loginName" column="login_name" />
|
||||
<result property="status" column="status" />
|
||||
<result property="ipaddr" column="ipaddr" />
|
||||
<result property="loginLocation" column="login_location" />
|
||||
<result property="browser" column="browser" />
|
||||
<result property="os" column="os" />
|
||||
<result property="msg" column="msg" />
|
||||
<result property="loginTime" column="login_time" />
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertLogininfor" parameterType="Logininfor">
|
||||
insert into sys_logininfor (login_name, status, ipaddr, login_location, browser, os, msg, login_time)
|
||||
values (#{loginName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg}, sysdate())
|
||||
</insert>
|
||||
|
||||
<select id="selectLogininforList" parameterType="Logininfor" resultMap="LogininforResult">
|
||||
select * from sys_logininfor
|
||||
<where>
|
||||
<if test="ipaddr != null and ipaddr != ''">
|
||||
AND ipaddr like concat('%', #{ipaddr}, '%')
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
<if test="loginName != null and loginName != ''">
|
||||
AND login_name like concat('%', #{loginName}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<delete id="deleteLogininforByIds" parameterType="Integer">
|
||||
delete from sys_logininfor where info_id in
|
||||
<foreach collection="array" item="infoId" open="(" separator="," close=")">
|
||||
#{infoId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user