| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- <?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.anlovek.saas.mapper.LoginHistoryMapper">
- <resultMap id="BaseResultMap" type="com.anlovek.saas.mapper.LoginHistory">
- <id column="id" jdbcType="BIGINT" property="id" />
- <result column="username" jdbcType="VARCHAR" property="username" />
- <result column="login_time" jdbcType="TIMESTAMP" property="loginTime" />
- <result column="login_ip" jdbcType="CHAR" property="loginIp" />
- <result column="success" jdbcType="BIT" property="success" />
- <result column="other_info" jdbcType="VARCHAR" property="otherInfo" />
- </resultMap>
- <sql id="Base_Column_List">
- id, username, login_time, login_ip, success, other_info
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from sys_user_login_history
- where id = #{id,jdbcType=BIGINT}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
- delete from sys_user_login_history
- where id = #{id,jdbcType=BIGINT}
- </delete>
- <insert id="insert" parameterType="com.anlovek.saas.mapper.LoginHistory">
- insert into sys_user_login_history (id, username, login_time,
- login_ip, success, other_info
- )
- values (#{id,jdbcType=BIGINT}, #{username,jdbcType=VARCHAR}, #{loginTime,jdbcType=TIMESTAMP},
- #{loginIp,jdbcType=CHAR}, #{success,jdbcType=BIT}, #{otherInfo,jdbcType=VARCHAR}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.anlovek.saas.mapper.LoginHistory">
- insert into sys_user_login_history
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">
- id,
- </if>
- <if test="username != null">
- username,
- </if>
- <if test="loginTime != null">
- login_time,
- </if>
- <if test="loginIp != null">
- login_ip,
- </if>
- <if test="success != null">
- success,
- </if>
- <if test="otherInfo != null">
- other_info,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">
- #{id,jdbcType=BIGINT},
- </if>
- <if test="username != null">
- #{username,jdbcType=VARCHAR},
- </if>
- <if test="loginTime != null">
- #{loginTime,jdbcType=TIMESTAMP},
- </if>
- <if test="loginIp != null">
- #{loginIp,jdbcType=CHAR},
- </if>
- <if test="success != null">
- #{success,jdbcType=BIT},
- </if>
- <if test="otherInfo != null">
- #{otherInfo,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.anlovek.saas.mapper.LoginHistory">
- update sys_user_login_history
- <set>
- <if test="username != null">
- username = #{username,jdbcType=VARCHAR},
- </if>
- <if test="loginTime != null">
- login_time = #{loginTime,jdbcType=TIMESTAMP},
- </if>
- <if test="loginIp != null">
- login_ip = #{loginIp,jdbcType=CHAR},
- </if>
- <if test="success != null">
- success = #{success,jdbcType=BIT},
- </if>
- <if test="otherInfo != null">
- other_info = #{otherInfo,jdbcType=VARCHAR},
- </if>
- </set>
- where id = #{id,jdbcType=BIGINT}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.anlovek.saas.mapper.LoginHistory">
- update sys_user_login_history
- set username = #{username,jdbcType=VARCHAR},
- login_time = #{loginTime,jdbcType=TIMESTAMP},
- login_ip = #{loginIp,jdbcType=CHAR},
- success = #{success,jdbcType=BIT},
- other_info = #{otherInfo,jdbcType=VARCHAR}
- where id = #{id,jdbcType=BIGINT}
- </update>
- </mapper>
|