| 1234567891011121314151617181920212223242526 |
- <?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.usoftchina.saas.auth.mapper.AuthorizeLogMapper">
- <insert id="insert">
- insert into au_authorize_log(app_id,account_id,client_ip,user_agent,login_time)
- values (#{appId,jdbcType=VARCHAR}, #{accountId,jdbcType=BIGINT}, #{clientIp,jdbcType=VARCHAR},
- #{userAgent,jdbcType=VARCHAR}, #{loginTime,jdbcType=TIMESTAMP})
- </insert>
- <resultMap id="BaseResultMap" type="com.usoftchina.saas.auth.po.AuthorizeLog">
- <id column="id" property="id" jdbcType="BIGINT" />
- <result column="account_id" property="accountId" jdbcType="BIGINT" />
- <result column="client_ip" property="clientIp" jdbcType="VARCHAR" />
- <result column="user_agent" property="userAgent" jdbcType="VARCHAR" />
- <result column="login_time" property="loginTime" jdbcType="TIMESTAMP" />
- <result column="app_id" property="appId" jdbcType="VARCHAR" />
- </resultMap>
- <select id="selectByAppIdAndAccountId" resultMap="BaseResultMap">
- select * from au_authorize_log where app_id=#{appId} and account_id=#{accountId}
- order by login_time desc
- </select>
- <insert id="insertVirtual" parameterType="com.usoftchina.saas.auth.po.VirtualAuthorizeLog">
- insert into au_virtual_authorize_log(app_id,mobile,client_ip,user_agent,login_time)
- values (#{appId,jdbcType=VARCHAR}, #{mobile,jdbcType=BIGINT}, #{clientIp,jdbcType=VARCHAR},
- #{userAgent,jdbcType=VARCHAR}, #{loginTime,jdbcType=TIMESTAMP})
- </insert>
- </mapper>
|