|
|
<?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.yoho.unions.dal.UnionUicRegisterMapper" >
|
|
|
<resultMap id="BaseResultMap" type="com.yoho.unions.dal.model.UnionUicRegister" >
|
|
|
<id column="uid" property="uid" jdbcType="INTEGER" />
|
|
|
<result column="udid" property="udid" jdbcType="INTEGER" />
|
|
|
<result column="invite_code" property="inviteCode" jdbcType="VARCHAR" />
|
|
|
<result column="ip" property="ip" jdbcType="VARCHAR" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List" >
|
|
|
uid, udid, invite_code, ip
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from union_uic_register
|
|
|
where uid = #{uid,jdbcType=INTEGER}
|
|
|
</select>
|
|
|
<select id="selectByUids" resultType="java.lang.Integer" parameterType="java.lang.Integer" >
|
|
|
select uid
|
|
|
from union_uic_register
|
|
|
where uid in
|
|
|
<foreach collection="list" item="uid" close=")" open="(" separator=",">
|
|
|
#{uid}
|
|
|
</foreach>
|
|
|
</select>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
|
|
delete from union_uic_register
|
|
|
where uid = #{uid,jdbcType=INTEGER}
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.yoho.unions.dal.model.UnionUicRegister" >
|
|
|
insert into union_uic_register (uid, udid, invite_code,
|
|
|
ip)
|
|
|
values (#{uid,jdbcType=INTEGER}, #{udid,jdbcType=INTEGER}, #{inviteCode,jdbcType=VARCHAR},
|
|
|
#{ip,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.yoho.unions.dal.model.UnionUicRegister" >
|
|
|
insert into union_uic_register
|
|
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
<if test="uid != null" >
|
|
|
uid,
|
|
|
</if>
|
|
|
<if test="udid != null" >
|
|
|
udid,
|
|
|
</if>
|
|
|
<if test="inviteCode != null" >
|
|
|
invite_code,
|
|
|
</if>
|
|
|
<if test="ip != null" >
|
|
|
ip,
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
<if test="uid != null" >
|
|
|
#{uid,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="udid != null" >
|
|
|
#{udid,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="inviteCode != null" >
|
|
|
#{inviteCode,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="ip != null" >
|
|
|
#{ip,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.yoho.unions.dal.model.UnionUicRegister" >
|
|
|
update union_uic_register
|
|
|
<set >
|
|
|
<if test="udid != null" >
|
|
|
udid = #{udid,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="inviteCode != null" >
|
|
|
invite_code = #{inviteCode,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="ip != null" >
|
|
|
ip = #{ip,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
</set>
|
|
|
where uid = #{uid,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.yoho.unions.dal.model.UnionUicRegister" >
|
|
|
update union_uic_register
|
|
|
set udid = #{udid,jdbcType=INTEGER},
|
|
|
invite_code = #{inviteCode,jdbcType=VARCHAR},
|
|
|
ip = #{ip,jdbcType=VARCHAR}
|
|
|
where uid = #{uid,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
</mapper> |
|
|
\ No newline at end of file |
...
|
...
|
|