|
|
@@ -0,0 +1,222 @@
|
|
|
+<?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.ActivityMapper" >
|
|
|
+ <resultMap id="BaseResultMap" type="com.goafanti.common.model.Activity" >
|
|
|
+ <id column="id" property="id" jdbcType="BIGINT" />
|
|
|
+ <result column="start_time" property="startTime" jdbcType="TIMESTAMP" />
|
|
|
+ <result column="end_time" property="endTime" jdbcType="TIMESTAMP" />
|
|
|
+ <result column="name" property="name" jdbcType="VARCHAR" />
|
|
|
+ <result column="status" property="status" jdbcType="INTEGER" />
|
|
|
+ <result column="address" property="address" jdbcType="VARCHAR" />
|
|
|
+ <result column="host" property="host" jdbcType="VARCHAR" />
|
|
|
+ <result column="undertake" property="undertake" jdbcType="VARCHAR" />
|
|
|
+ <result column="asist" property="asist" jdbcType="VARCHAR" />
|
|
|
+ <result column="type" property="type" jdbcType="INTEGER" />
|
|
|
+ <result column="form" property="form" jdbcType="INTEGER" />
|
|
|
+ <result column="img_urls" property="imgUrls" jdbcType="VARCHAR" />
|
|
|
+ <result column="result" property="result" jdbcType="VARCHAR" />
|
|
|
+ </resultMap>
|
|
|
+ <resultMap id="ResultMapWithBLOBs" type="com.goafanti.common.model.Activity" extends="BaseResultMap" >
|
|
|
+ <result column="desc" property="desc" jdbcType="LONGVARCHAR" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Base_Column_List" >
|
|
|
+ id, start_time, end_time, name, status, address, host, undertake, asist, type, form,
|
|
|
+ img_urls, result
|
|
|
+ </sql>
|
|
|
+ <sql id="Blob_Column_List" >
|
|
|
+ desc
|
|
|
+ </sql>
|
|
|
+ <select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Long" >
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ ,
|
|
|
+ <include refid="Blob_Column_List" />
|
|
|
+ from activity
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
+ </select>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
|
|
|
+ delete from activity
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.goafanti.common.model.Activity" >
|
|
|
+ insert into activity (id, start_time, end_time,
|
|
|
+ name, status, address,
|
|
|
+ host, undertake, asist,
|
|
|
+ type, form, img_urls,
|
|
|
+ result, desc)
|
|
|
+ values (#{id,jdbcType=BIGINT}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP},
|
|
|
+ #{name,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{address,jdbcType=VARCHAR},
|
|
|
+ #{host,jdbcType=VARCHAR}, #{undertake,jdbcType=VARCHAR}, #{asist,jdbcType=VARCHAR},
|
|
|
+ #{type,jdbcType=INTEGER}, #{form,jdbcType=INTEGER}, #{imgUrls,jdbcType=VARCHAR},
|
|
|
+ #{result,jdbcType=VARCHAR}, #{desc,jdbcType=LONGVARCHAR})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.goafanti.common.model.Activity" >
|
|
|
+ insert into activity
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
+ <if test="id != null" >
|
|
|
+ id,
|
|
|
+ </if>
|
|
|
+ <if test="startTime != null" >
|
|
|
+ start_time,
|
|
|
+ </if>
|
|
|
+ <if test="endTime != null" >
|
|
|
+ end_time,
|
|
|
+ </if>
|
|
|
+ <if test="name != null" >
|
|
|
+ name,
|
|
|
+ </if>
|
|
|
+ <if test="status != null" >
|
|
|
+ status,
|
|
|
+ </if>
|
|
|
+ <if test="address != null" >
|
|
|
+ address,
|
|
|
+ </if>
|
|
|
+ <if test="host != null" >
|
|
|
+ host,
|
|
|
+ </if>
|
|
|
+ <if test="undertake != null" >
|
|
|
+ undertake,
|
|
|
+ </if>
|
|
|
+ <if test="asist != null" >
|
|
|
+ asist,
|
|
|
+ </if>
|
|
|
+ <if test="type != null" >
|
|
|
+ type,
|
|
|
+ </if>
|
|
|
+ <if test="form != null" >
|
|
|
+ form,
|
|
|
+ </if>
|
|
|
+ <if test="imgUrls != null" >
|
|
|
+ img_urls,
|
|
|
+ </if>
|
|
|
+ <if test="result != null" >
|
|
|
+ result,
|
|
|
+ </if>
|
|
|
+ <if test="desc != null" >
|
|
|
+ desc,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
+ <if test="id != null" >
|
|
|
+ #{id,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="startTime != null" >
|
|
|
+ #{startTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="endTime != null" >
|
|
|
+ #{endTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="name != null" >
|
|
|
+ #{name,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="status != null" >
|
|
|
+ #{status,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="address != null" >
|
|
|
+ #{address,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="host != null" >
|
|
|
+ #{host,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="undertake != null" >
|
|
|
+ #{undertake,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="asist != null" >
|
|
|
+ #{asist,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="type != null" >
|
|
|
+ #{type,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="form != null" >
|
|
|
+ #{form,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="imgUrls != null" >
|
|
|
+ #{imgUrls,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="result != null" >
|
|
|
+ #{result,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="desc != null" >
|
|
|
+ #{desc,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.Activity" >
|
|
|
+ update activity
|
|
|
+ <set >
|
|
|
+ <if test="startTime != null" >
|
|
|
+ start_time = #{startTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="endTime != null" >
|
|
|
+ end_time = #{endTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="name != null" >
|
|
|
+ name = #{name,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="status != null" >
|
|
|
+ status = #{status,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="address != null" >
|
|
|
+ address = #{address,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="host != null" >
|
|
|
+ host = #{host,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="undertake != null" >
|
|
|
+ undertake = #{undertake,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="asist != null" >
|
|
|
+ asist = #{asist,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="type != null" >
|
|
|
+ type = #{type,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="form != null" >
|
|
|
+ form = #{form,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="imgUrls != null" >
|
|
|
+ img_urls = #{imgUrls,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="result != null" >
|
|
|
+ result = #{result,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="desc != null" >
|
|
|
+ desc = #{desc,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.goafanti.common.model.Activity" >
|
|
|
+ update activity
|
|
|
+ set start_time = #{startTime,jdbcType=TIMESTAMP},
|
|
|
+ end_time = #{endTime,jdbcType=TIMESTAMP},
|
|
|
+ name = #{name,jdbcType=VARCHAR},
|
|
|
+ status = #{status,jdbcType=INTEGER},
|
|
|
+ address = #{address,jdbcType=VARCHAR},
|
|
|
+ host = #{host,jdbcType=VARCHAR},
|
|
|
+ undertake = #{undertake,jdbcType=VARCHAR},
|
|
|
+ asist = #{asist,jdbcType=VARCHAR},
|
|
|
+ type = #{type,jdbcType=INTEGER},
|
|
|
+ form = #{form,jdbcType=INTEGER},
|
|
|
+ img_urls = #{imgUrls,jdbcType=VARCHAR},
|
|
|
+ result = #{result,jdbcType=VARCHAR},
|
|
|
+ desc = #{desc,jdbcType=LONGVARCHAR}
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.Activity" >
|
|
|
+ update activity
|
|
|
+ set start_time = #{startTime,jdbcType=TIMESTAMP},
|
|
|
+ end_time = #{endTime,jdbcType=TIMESTAMP},
|
|
|
+ name = #{name,jdbcType=VARCHAR},
|
|
|
+ status = #{status,jdbcType=INTEGER},
|
|
|
+ address = #{address,jdbcType=VARCHAR},
|
|
|
+ host = #{host,jdbcType=VARCHAR},
|
|
|
+ undertake = #{undertake,jdbcType=VARCHAR},
|
|
|
+ asist = #{asist,jdbcType=VARCHAR},
|
|
|
+ type = #{type,jdbcType=INTEGER},
|
|
|
+ form = #{form,jdbcType=INTEGER},
|
|
|
+ img_urls = #{imgUrls,jdbcType=VARCHAR},
|
|
|
+ result = #{result,jdbcType=VARCHAR}
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
+ </update>
|
|
|
+</mapper>
|