|
@@ -0,0 +1,82 @@
|
|
|
|
|
+<?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.ActivityUserMapper" >
|
|
|
|
|
+ <resultMap id="BaseResultMap" type="com.goafanti.common.model.ActivityUser" >
|
|
|
|
|
+ <id column="aid" property="aid" jdbcType="BIGINT" />
|
|
|
|
|
+ <id column="uid" property="uid" jdbcType="VARCHAR" />
|
|
|
|
|
+ <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
|
|
|
|
+ <result column="last_update_time" property="lastUpdateTime" jdbcType="TIMESTAMP" />
|
|
|
|
|
+ </resultMap>
|
|
|
|
|
+ <sql id="Base_Column_List" >
|
|
|
|
|
+ aid, uid, create_time, last_update_time
|
|
|
|
|
+ </sql>
|
|
|
|
|
+ <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="com.goafanti.common.model.ActivityUserKey" >
|
|
|
|
|
+ select
|
|
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
|
|
+ from activity_user
|
|
|
|
|
+ where aid = #{aid,jdbcType=BIGINT}
|
|
|
|
|
+ and uid = #{uid,jdbcType=VARCHAR}
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="com.goafanti.common.model.ActivityUserKey" >
|
|
|
|
|
+ delete from activity_user
|
|
|
|
|
+ where aid = #{aid,jdbcType=BIGINT}
|
|
|
|
|
+ and uid = #{uid,jdbcType=VARCHAR}
|
|
|
|
|
+ </delete>
|
|
|
|
|
+ <insert id="insert" parameterType="com.goafanti.common.model.ActivityUser" >
|
|
|
|
|
+ insert into activity_user (aid, uid, create_time,
|
|
|
|
|
+ last_update_time)
|
|
|
|
|
+ values (#{aid,jdbcType=BIGINT}, #{uid,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ #{lastUpdateTime,jdbcType=TIMESTAMP})
|
|
|
|
|
+ </insert>
|
|
|
|
|
+ <insert id="insertSelective" parameterType="com.goafanti.common.model.ActivityUser" >
|
|
|
|
|
+ insert into activity_user
|
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
|
|
+ <if test="aid != null" >
|
|
|
|
|
+ aid,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="uid != null" >
|
|
|
|
|
+ uid,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createTime != null" >
|
|
|
|
|
+ create_time,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="lastUpdateTime != null" >
|
|
|
|
|
+ last_update_time,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
|
|
+ <if test="aid != null" >
|
|
|
|
|
+ #{aid,jdbcType=BIGINT},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="uid != null" >
|
|
|
|
|
+ #{uid,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createTime != null" >
|
|
|
|
|
+ #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="lastUpdateTime != null" >
|
|
|
|
|
+ #{lastUpdateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ </insert>
|
|
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.ActivityUser" >
|
|
|
|
|
+ update activity_user
|
|
|
|
|
+ <set >
|
|
|
|
|
+ <if test="createTime != null" >
|
|
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="lastUpdateTime != null" >
|
|
|
|
|
+ last_update_time = #{lastUpdateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </set>
|
|
|
|
|
+ where aid = #{aid,jdbcType=BIGINT}
|
|
|
|
|
+ and uid = #{uid,jdbcType=VARCHAR}
|
|
|
|
|
+ </update>
|
|
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.ActivityUser" >
|
|
|
|
|
+ update activity_user
|
|
|
|
|
+ set create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ last_update_time = #{lastUpdateTime,jdbcType=TIMESTAMP}
|
|
|
|
|
+ where aid = #{aid,jdbcType=BIGINT}
|
|
|
|
|
+ and uid = #{uid,jdbcType=VARCHAR}
|
|
|
|
|
+ </update>
|
|
|
|
|
+</mapper>
|