| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <?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.tdba.cxb.ares.api.repository.UserBindMapper">
- <insert id="insertSelective">
- insert into user_bind
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="null != uid">
- uid,
- </if>
- <if test="null != createTime">
- create_time,
- </if>
- <if test="null != delFlag">
- del_flag,
- </if>
- <if test="null != bindUid">
- bind_uid,
- </if>
- <if test="null != type">
- type,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="null != uid">
- #{ uid },
- </if>
- <if test="null != createTime">
- #{ createTime },
- </if>
- <if test="null != delFlag">
- #{ delFlag },
- </if>
- <if test="null != bindUid">
- #{ bindUid },
- </if>
- <if test="null != type">
- #{ type },
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective">
- update user_bind
- <set>
- <if test="null != uid">
- uid = #{ uid },
- </if>
- <if test="null != createTime">
- create_time = #{ createTime },
- </if>
- <if test="null != delFlag">
- del_flag = #{ delFlag },
- </if>
- <if test="null != bindUid">
- bind_uid = #{ bindUid },
- </if>
- <if test="null != type">
- type = #{ type },
- </if>
- </set>
- where id = #{id}
- </update>
- <select id="selectByUid" resultType="com.tdba.cxb.ares.api.model.UserBind">
- select * from user_bind where del_flag = 0 and uid = #{uid}
- </select>
- <select id="selectUid" resultType="java.lang.Integer">
- select uid from user_bind where del_flag = 0 and type = 0 and bind_uid = #{bindUid}
- </select>
- </mapper>
|