FrontLoginInfoMapper.xml
1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?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.lhcredit.project.business.frontLoginInfo.mapper.FrontLoginInfoMapper">
<resultMap type="FrontLoginInfo" id="FrontLoginInfoResult">
<result property="id" column="id" />
<result property="loginName" column="login_name" />
<result property="loginIp" column="login_ip" />
<result property="status" column="status" />
<result property="msg" column="msg" />
<result property="loginTime" column="login_time" />
</resultMap>
<sql id="selectFrontLoginInfoVo">
select id,login_name,login_ip,status,msg,login_time from front_login_info
</sql>
<insert id="insertFrontLoginInfo" parameterType="FrontLoginInfo" useGeneratedKeys="true" keyProperty="id">
insert into front_login_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="loginName != null and loginName != '' ">login_name,</if>
<if test="loginIp != null and loginIp != '' ">login_ip,</if>
<if test="status != null and status != '' ">status,</if>
<if test="msg != null and msg != '' "> msg ,</if>
<if test="loginTime != null ">login_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="loginName != null and loginName != '' ">#{loginName},</if>
<if test="loginIp != null and loginIp != '' ">#{loginIp},</if>
<if test="status != null and status != '' ">#{status},</if>
<if test="msg != null and msg != '' "> #{msg} ,</if>
<if test="loginTime != null ">#{loginTime},</if>
</trim>
</insert>
</mapper>