| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- <?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.yaorong.eai.web.regist.mapper.UserMapper">
- <resultMap id="userResultMap" type="com.yaorong.eai.web.regist.vo.UserVo">
- <id property="id" column="id" jdbcType="BIGINT"/>
- <result property="username" column="username" jdbcType="VARCHAR"/>
- <result property="password" column="password" jdbcType="VARCHAR"/>
- <result property="phone" column="phone" jdbcType="VARCHAR"/>
- <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
- <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
- <result property="createBy" column="create_by" jdbcType="VARCHAR"/>
- <result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
- <result property="age" column="age" jdbcType="INTEGER"/>
- <result property="sex" column="sex" jdbcType="INTEGER"/>
- </resultMap>
- <select id="findAll" resultType="map">
- SELECT * FROM ea_user
- </select>
- <select id="selectByColumn" resultMap="userResultMap" parameterType="com.yaorong.eai.web.regist.vo.UserVo">
- select * from ea_user where 1=1
- <if test="null != phone">
- and phone = #{phone}
- </if>
- <if test="null != password">
- and password=#{password}
- </if>
- </select>
- <select id="countByColumn" resultType="integer" parameterType="com.yaorong.eai.web.regist.vo.UserVo">
- select count(1) from ea_user where 1=1
- <if test="null != phone">
- and phone = #{phone}
- </if>
- <!-- <if test="null != password">-->
- <!-- and password=#{password}-->
- <!-- </if>-->
- </select>
- <insert id="insertSelective" parameterType="com.yaorong.eai.web.regist.vo.UserVo">
- insert into ea_user
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">
- id,
- </if>
- <if test="name != null">
- name,
- </if>
- <if test="phone != null">
- phone,
- </if>
- <if test="password != null">
- password,
- </if>
- <if test="createTime != null">
- create_time,
- </if>
- <if test="updateTime != null">
- update_time,
- </if>
- <if test="createBy != null">
- create_by,
- </if>
- <if test="updateBy != null">
- update_by,
- </if>
- <if test="age != null">
- age,
- </if>
- <if test="sex != null">
- sex,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">
- #{id,jdbcType=BIGINT},
- </if>
- <if test="name != null">
- #{name,jdbcType=VARCHAR},
- </if>
- <if test="phone != null">
- #{phone,jdbcType=VARCHAR},
- </if>
- <if test="password != null">
- #{password,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null">
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateTime != null">
- #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="createBy != null">
- #{createBy,jdbcType=VARCHAR},
- </if>
- <if test="updateBy != null">
- #{updateBy,jdbcType=VARCHAR},
- </if>
- <if test="age != null">
- #{age,jdbcType=INTEGER},
- </if>
- <if test="sex != null">
- #{sex,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- </mapper>
|