|
@@ -0,0 +1,208 @@
|
|
|
+<?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="edu.travel.education.mapper.HappyEntryMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="edu.travel.education.entity.HappyEntry">
|
|
|
+ <!--@mbg.generated-->
|
|
|
+ <!--@Table happy_entry-->
|
|
|
+ <id column="id" jdbcType="BIGINT" property="id" />
|
|
|
+ <result column="surname" jdbcType="VARCHAR" property="surname" />
|
|
|
+ <result column="name" jdbcType="VARCHAR" property="name" />
|
|
|
+ <result column="phone" jdbcType="VARCHAR" property="phone" />
|
|
|
+ <result column="area_code" jdbcType="VARCHAR" property="areaCode" />
|
|
|
+ <result column="course_type" jdbcType="INTEGER" property="courseType" />
|
|
|
+ <result column="age" jdbcType="INTEGER" property="age" />
|
|
|
+ <result column="email" jdbcType="VARCHAR" property="email" />
|
|
|
+ <result column="project" jdbcType="VARCHAR" property="project" />
|
|
|
+ <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
+ <result column="create_user_id" jdbcType="BIGINT" property="createUserId" />
|
|
|
+ <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
+ <result column="update_user_id" jdbcType="BIGINT" property="updateUserId" />
|
|
|
+ <result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ <!--@mbg.generated-->
|
|
|
+ id, surname, `name`, phone, area_code, course_type, age, email, project, create_time,
|
|
|
+ create_user_id, update_time, update_user_id, delete_flag
|
|
|
+ </sql>
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
|
+ <!--@mbg.generated-->
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from happy_entry
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
+ </select>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
|
+ <!--@mbg.generated-->
|
|
|
+ delete from happy_entry
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="edu.travel.education.entity.HappyEntry">
|
|
|
+ <!--@mbg.generated-->
|
|
|
+ insert into happy_entry (id, surname, `name`,
|
|
|
+ phone, area_code, course_type,
|
|
|
+ age, email, project,
|
|
|
+ create_time, create_user_id, update_time,
|
|
|
+ update_user_id, delete_flag)
|
|
|
+ values (#{id,jdbcType=BIGINT}, #{surname,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
|
|
+ #{phone,jdbcType=VARCHAR}, #{areaCode,jdbcType=VARCHAR}, #{courseType,jdbcType=INTEGER},
|
|
|
+ #{age,jdbcType=INTEGER}, #{email,jdbcType=VARCHAR}, #{project,jdbcType=VARCHAR},
|
|
|
+ #{createTime,jdbcType=TIMESTAMP}, #{createUserId,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ #{updateUserId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=INTEGER})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="edu.travel.education.entity.HappyEntry">
|
|
|
+ <!--@mbg.generated-->
|
|
|
+ insert into happy_entry
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">
|
|
|
+ id,
|
|
|
+ </if>
|
|
|
+ <if test="surname != null">
|
|
|
+ surname,
|
|
|
+ </if>
|
|
|
+ <if test="name != null">
|
|
|
+ `name`,
|
|
|
+ </if>
|
|
|
+ <if test="phone != null">
|
|
|
+ phone,
|
|
|
+ </if>
|
|
|
+ <if test="areaCode != null">
|
|
|
+ area_code,
|
|
|
+ </if>
|
|
|
+ <if test="courseType != null">
|
|
|
+ course_type,
|
|
|
+ </if>
|
|
|
+ <if test="age != null">
|
|
|
+ age,
|
|
|
+ </if>
|
|
|
+ <if test="email != null">
|
|
|
+ email,
|
|
|
+ </if>
|
|
|
+ <if test="project != null">
|
|
|
+ project,
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time,
|
|
|
+ </if>
|
|
|
+ <if test="createUserId != null">
|
|
|
+ create_user_id,
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ update_time,
|
|
|
+ </if>
|
|
|
+ <if test="updateUserId != null">
|
|
|
+ update_user_id,
|
|
|
+ </if>
|
|
|
+ <if test="deleteFlag != null">
|
|
|
+ delete_flag,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">
|
|
|
+ #{id,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="surname != null">
|
|
|
+ #{surname,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="name != null">
|
|
|
+ #{name,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="phone != null">
|
|
|
+ #{phone,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="areaCode != null">
|
|
|
+ #{areaCode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="courseType != null">
|
|
|
+ #{courseType,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="age != null">
|
|
|
+ #{age,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="email != null">
|
|
|
+ #{email,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="project != null">
|
|
|
+ #{project,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="createUserId != null">
|
|
|
+ #{createUserId,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updateUserId != null">
|
|
|
+ #{updateUserId,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="deleteFlag != null">
|
|
|
+ #{deleteFlag,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="edu.travel.education.entity.HappyEntry">
|
|
|
+ <!--@mbg.generated-->
|
|
|
+ update happy_entry
|
|
|
+ <set>
|
|
|
+ <if test="surname != null">
|
|
|
+ surname = #{surname,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="name != null">
|
|
|
+ `name` = #{name,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="phone != null">
|
|
|
+ phone = #{phone,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="areaCode != null">
|
|
|
+ area_code = #{areaCode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="courseType != null">
|
|
|
+ course_type = #{courseType,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="age != null">
|
|
|
+ age = #{age,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="email != null">
|
|
|
+ email = #{email,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="project != null">
|
|
|
+ project = #{project,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="createUserId != null">
|
|
|
+ create_user_id = #{createUserId,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updateUserId != null">
|
|
|
+ update_user_id = #{updateUserId,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="deleteFlag != null">
|
|
|
+ delete_flag = #{deleteFlag,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="edu.travel.education.entity.HappyEntry">
|
|
|
+ <!--@mbg.generated-->
|
|
|
+ update happy_entry
|
|
|
+ set surname = #{surname,jdbcType=VARCHAR},
|
|
|
+ `name` = #{name,jdbcType=VARCHAR},
|
|
|
+ phone = #{phone,jdbcType=VARCHAR},
|
|
|
+ area_code = #{areaCode,jdbcType=VARCHAR},
|
|
|
+ course_type = #{courseType,jdbcType=INTEGER},
|
|
|
+ age = #{age,jdbcType=INTEGER},
|
|
|
+ email = #{email,jdbcType=VARCHAR},
|
|
|
+ project = #{project,jdbcType=VARCHAR},
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ create_user_id = #{createUserId,jdbcType=BIGINT},
|
|
|
+ update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ update_user_id = #{updateUserId,jdbcType=BIGINT},
|
|
|
+ delete_flag = #{deleteFlag,jdbcType=INTEGER}
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
+ </update>
|
|
|
+</mapper>
|