| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233 |
- <?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.goafanti.common.dao.UserMidMapper">
- <resultMap id="BaseResultMap" type="com.goafanti.common.model.UserMid">
- <id column="id" jdbcType="INTEGER" property="id" />
- <result column="uid" jdbcType="VARCHAR" property="uid" />
- <result column="aid" jdbcType="VARCHAR" property="aid" />
- <result column="last_follow_time" jdbcType="TIMESTAMP" property="lastFollowTime" />
- <result column="last_sign_time" jdbcType="TIMESTAMP" property="lastSignTime" />
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
- <result column="big_customer" jdbcType="INTEGER" property="bigCustomer" />
- <result column="update_aid" jdbcType="VARCHAR" property="updateAid" />
- <result column="update_name" jdbcType="VARCHAR" property="updateName" />
- <result column="date_update_time" jdbcType="TIMESTAMP" property="dateUpdateTime" />
- <result column="channel_type" jdbcType="INTEGER" property="channelType" />
- </resultMap>
- <sql id="Base_Column_List">
- id, `uid`, aid, last_follow_time, last_sign_time, create_time, big_customer, update_aid,
- update_name, date_update_time, channel_type
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from user_mid
- where id = #{id,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
- delete from user_mid
- where id = #{id,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.goafanti.common.model.UserMid">
- insert into user_mid (id, `uid`, aid,
- last_follow_time, last_sign_time, create_time,
- big_customer, update_aid, update_name,
- date_update_time, channel_type)
- values (#{id,jdbcType=INTEGER}, #{uid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR},
- #{lastFollowTime,jdbcType=TIMESTAMP}, #{lastSignTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
- #{bigCustomer,jdbcType=INTEGER}, #{updateAid,jdbcType=VARCHAR}, #{updateName,jdbcType=VARCHAR},
- #{dateUpdateTime,jdbcType=TIMESTAMP}, #{channelType,jdbcType=INTEGER})
- </insert>
- <insert id="insertSelective" parameterType="com.goafanti.common.model.UserMid">
- insert into user_mid
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">
- id,
- </if>
- <if test="uid != null">
- `uid`,
- </if>
- <if test="aid != null">
- aid,
- </if>
- <if test="lastFollowTime != null">
- last_follow_time,
- </if>
- <if test="lastSignTime != null">
- last_sign_time,
- </if>
- <if test="createTime != null">
- create_time,
- </if>
- <if test="bigCustomer != null">
- big_customer,
- </if>
- <if test="updateAid != null">
- update_aid,
- </if>
- <if test="updateName != null">
- update_name,
- </if>
- <if test="dateUpdateTime != null">
- date_update_time,
- </if>
- <if test="channelType != null">
- channel_type,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">
- #{id,jdbcType=INTEGER},
- </if>
- <if test="uid != null">
- #{uid,jdbcType=VARCHAR},
- </if>
- <if test="aid != null">
- #{aid,jdbcType=VARCHAR},
- </if>
- <if test="lastFollowTime != null">
- #{lastFollowTime,jdbcType=TIMESTAMP},
- </if>
- <if test="lastSignTime != null">
- #{lastSignTime,jdbcType=TIMESTAMP},
- </if>
- <if test="createTime != null">
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="bigCustomer != null">
- #{bigCustomer,jdbcType=INTEGER},
- </if>
- <if test="updateAid != null">
- #{updateAid,jdbcType=VARCHAR},
- </if>
- <if test="updateName != null">
- #{updateName,jdbcType=VARCHAR},
- </if>
- <if test="dateUpdateTime != null">
- #{dateUpdateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="channelType != null">
- #{channelType,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.UserMid">
- update user_mid
- <set>
- <if test="uid != null">
- `uid` = #{uid,jdbcType=VARCHAR},
- </if>
- <if test="aid != null">
- aid = #{aid,jdbcType=VARCHAR},
- </if>
- <if test="lastFollowTime != null">
- last_follow_time = #{lastFollowTime,jdbcType=TIMESTAMP},
- </if>
- <if test="lastSignTime != null">
- last_sign_time = #{lastSignTime,jdbcType=TIMESTAMP},
- </if>
- <if test="createTime != null">
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="bigCustomer != null">
- big_customer = #{bigCustomer,jdbcType=INTEGER},
- </if>
- <if test="updateAid != null">
- update_aid = #{updateAid,jdbcType=VARCHAR},
- </if>
- <if test="updateName != null">
- update_name = #{updateName,jdbcType=VARCHAR},
- </if>
- <if test="dateUpdateTime != null">
- date_update_time = #{dateUpdateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="channelType != null">
- channel_type = #{channelType,jdbcType=INTEGER},
- </if>
- </set>
- where id = #{id,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.UserMid">
- update user_mid
- set `uid` = #{uid,jdbcType=VARCHAR},
- aid = #{aid,jdbcType=VARCHAR},
- last_follow_time = #{lastFollowTime,jdbcType=TIMESTAMP},
- last_sign_time = #{lastSignTime,jdbcType=TIMESTAMP},
- create_time = #{createTime,jdbcType=TIMESTAMP},
- big_customer = #{bigCustomer,jdbcType=INTEGER},
- update_aid = #{updateAid,jdbcType=VARCHAR},
- update_name = #{updateName,jdbcType=VARCHAR},
- date_update_time = #{dateUpdateTime,jdbcType=TIMESTAMP},
- channel_type = #{channelType,jdbcType=INTEGER}
- where id = #{id,jdbcType=INTEGER}
- </update>
- <update id="updateByUid" parameterType="com.goafanti.common.model.UserMid">
- update user_mid
- <set>
- <if test="aid != null">
- aid = #{aid,jdbcType=VARCHAR},
- </if>
- <if test="lastFollowTime != null">
- last_follow_time = #{lastFollowTime,jdbcType=TIMESTAMP},
- </if>
- <if test="lastSignTime != null">
- last_sign_time = #{lastSignTime,jdbcType=TIMESTAMP},
- </if>
- <if test="createTime != null">
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="bigCustomer != null">
- big_customer = #{bigCustomer,jdbcType=INTEGER},
- </if>
- <if test="updateAid != null">
- update_aid = #{updateAid,jdbcType=VARCHAR},
- </if>
- <if test="updateName != null">
- update_name = #{updateName,jdbcType=VARCHAR},
- </if>
- <if test="dateUpdateTime != null">
- date_update_time = #{dateUpdateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="channelType != null">
- channel_type = #{channelType,jdbcType=INTEGER},
- </if>
- </set>
- where `uid` = #{uid,jdbcType=VARCHAR}
- </update>
- <update id="updateListByUid" parameterType="com.goafanti.common.model.UserMid">
- update user_mid
- <set>
- <if test="aid != null">
- aid = #{aid,jdbcType=VARCHAR},
- </if>
- <if test="updateFollow ==1">
- last_follow_time = null,
- </if>
- <if test="lastSignTime != null">
- last_sign_time = #{lastSignTime,jdbcType=TIMESTAMP},
- </if>
- <if test="createTime != null">
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="bigCustomer != null">
- big_customer = #{bigCustomer,jdbcType=INTEGER},
- </if>
- <if test="updateAid != null">
- update_aid = #{updateAid,jdbcType=VARCHAR},
- </if>
- <if test="updateName != null">
- update_name = #{updateName,jdbcType=VARCHAR},
- </if>
- <if test="dateUpdateTime != null">
- date_update_time = #{dateUpdateTime,jdbcType=TIMESTAMP},
- </if>
- </set>
- where `uid` in
- <foreach item="item" collection="list" separator="," open="(" close=")" index="">
- #{item}
- </foreach>
- </update>
- </mapper>
|