123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174 |
- <?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.juxiao.xchat.module.xbd.mapper.users.PrettyErBanNoMapper">
- <resultMap id="BaseResultMap" type="com.juxiao.xchat.module.xbd.domain.users.PrettyErbanNo" >
- <id column="pretty_id" property="prettyId" jdbcType="INTEGER" />
- <result column="pretty_erban_no" property="prettyErbanNo" jdbcType="BIGINT" />
- <result column="status" property="status" jdbcType="TINYINT" />
- <result column="use_for" property="useFor" jdbcType="TINYINT" />
- <result column="user_uid" property="userUid" jdbcType="BIGINT" />
- <result column="user_erban_no" property="userErbanNo" jdbcType="BIGINT" />
- <result column="pretty_desc" property="prettyDesc" jdbcType="VARCHAR" />
- <result column="start_valid_time" property="startValidTime" jdbcType="TIMESTAMP" />
- <result column="end_valid_time" property="endValidTime" jdbcType="TIMESTAMP" />
- <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
- </resultMap>
- <sql id="Base_Column_List" >
- pretty_id, pretty_erban_no, status, use_for, user_uid, user_erban_no, pretty_desc,
- start_valid_time, end_valid_time, create_time
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from pretty_erban_no
- where pretty_id = #{prettyId,jdbcType=INTEGER}
- </select>
- <insert id="insert" parameterType="com.juxiao.xchat.module.xbd.domain.users.PrettyErbanNo" >
- <selectKey resultType="java.lang.Integer" keyProperty="prettyId" order="AFTER" >
- SELECT LAST_INSERT_ID()
- </selectKey>
- insert into pretty_erban_no (pretty_erban_no, status, use_for,
- user_uid, user_erban_no, pretty_desc,
- start_valid_time, end_valid_time, create_time
- )
- values (#{prettyErbanNo,jdbcType=BIGINT}, #{status,jdbcType=TINYINT}, #{useFor,jdbcType=TINYINT},
- #{userUid,jdbcType=BIGINT}, #{userErbanNo,jdbcType=BIGINT}, #{prettyDesc,jdbcType=VARCHAR},
- #{startValidTime,jdbcType=TIMESTAMP}, #{endValidTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.juxiao.xchat.module.xbd.domain.users.PrettyErbanNo" >
- <selectKey resultType="java.lang.Integer" keyProperty="prettyId" order="AFTER" >
- SELECT LAST_INSERT_ID()
- </selectKey>
- insert into pretty_erban_no
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="prettyErbanNo != null" >
- pretty_erban_no,
- </if>
- <if test="status != null" >
- status,
- </if>
- <if test="useFor != null" >
- use_for,
- </if>
- <if test="userUid != null" >
- user_uid,
- </if>
- <if test="userErbanNo != null" >
- user_erban_no,
- </if>
- <if test="prettyDesc != null" >
- pretty_desc,
- </if>
- <if test="startValidTime != null" >
- start_valid_time,
- </if>
- <if test="endValidTime != null" >
- end_valid_time,
- </if>
- <if test="createTime != null" >
- create_time,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="prettyErbanNo != null" >
- #{prettyErbanNo,jdbcType=BIGINT},
- </if>
- <if test="status != null" >
- #{status,jdbcType=TINYINT},
- </if>
- <if test="useFor != null" >
- #{useFor,jdbcType=TINYINT},
- </if>
- <if test="userUid != null" >
- #{userUid,jdbcType=BIGINT},
- </if>
- <if test="userErbanNo != null" >
- #{userErbanNo,jdbcType=BIGINT},
- </if>
- <if test="prettyDesc != null" >
- #{prettyDesc,jdbcType=VARCHAR},
- </if>
- <if test="startValidTime != null" >
- #{startValidTime,jdbcType=TIMESTAMP},
- </if>
- <if test="endValidTime != null" >
- #{endValidTime,jdbcType=TIMESTAMP},
- </if>
- <if test="createTime != null" >
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.juxiao.xchat.module.xbd.domain.users.PrettyErbanNo" >
- update pretty_erban_no
- <set >
- <if test="prettyErbanNo != null" >
- pretty_erban_no = #{prettyErbanNo,jdbcType=BIGINT},
- </if>
- <if test="status != null" >
- status = #{status,jdbcType=TINYINT},
- </if>
- <if test="useFor != null" >
- use_for = #{useFor,jdbcType=TINYINT},
- </if>
- <if test="userUid != null" >
- user_uid = #{userUid,jdbcType=BIGINT},
- </if>
- <if test="userErbanNo != null" >
- user_erban_no = #{userErbanNo,jdbcType=BIGINT},
- </if>
- <if test="prettyDesc != null" >
- pretty_desc = #{prettyDesc,jdbcType=VARCHAR},
- </if>
- <if test="startValidTime != null" >
- start_valid_time = #{startValidTime,jdbcType=TIMESTAMP},
- </if>
- <if test="endValidTime != null" >
- end_valid_time = #{endValidTime,jdbcType=TIMESTAMP},
- </if>
- <if test="createTime != null" >
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- </set>
- where pretty_id = #{prettyId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.juxiao.xchat.module.xbd.domain.users.PrettyErbanNo" >
- update pretty_erban_no
- set pretty_erban_no = #{prettyErbanNo,jdbcType=BIGINT},
- status = #{status,jdbcType=TINYINT},
- use_for = #{useFor,jdbcType=TINYINT},
- user_uid = #{userUid,jdbcType=BIGINT},
- user_erban_no = #{userErbanNo,jdbcType=BIGINT},
- pretty_desc = #{prettyDesc,jdbcType=VARCHAR},
- start_valid_time = #{startValidTime,jdbcType=TIMESTAMP},
- end_valid_time = #{endValidTime,jdbcType=TIMESTAMP},
- create_time = #{createTime,jdbcType=TIMESTAMP}
- where pretty_id = #{prettyId,jdbcType=INTEGER}
- </update>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from pretty_erban_no
- where pretty_id = #{prettyId,jdbcType=INTEGER}
- </delete>
- <select id="selectByErBanNo" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from pretty_erban_no
- where pretty_erban_no = #{prettyErBanNo}
- </select>
- <delete id="deleteByPrettyErBanNoORStatus">
- delete from pretty_erban_no
- where pretty_erban_no = #{prettyErBanNo} and status = #{status}
- </delete>
- </mapper>
|