| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260 |
- <?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" />
- <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
- <result column="enroll_deadline" property="enrollDeadline" jdbcType="TIMESTAMP" />
- <result column="title_url" property="titleUrl" 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, create_time, enroll_deadline, title_url
- </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, create_time, enroll_deadline,
- title_url, 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}, #{createTime,jdbcType=TIMESTAMP}, #{enrollDeadline,jdbcType=TIMESTAMP},
- #{titleUrl,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="createTime != null" >
- create_time,
- </if>
- <if test="enrollDeadline != null" >
- enroll_deadline,
- </if>
- <if test="titleUrl != null" >
- title_url,
- </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="createTime != null" >
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="enrollDeadline != null" >
- #{enrollDeadline,jdbcType=TIMESTAMP},
- </if>
- <if test="titleUrl != null" >
- #{titleUrl,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="createTime != null" >
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="enrollDeadline != null" >
- enroll_deadline = #{enrollDeadline,jdbcType=TIMESTAMP},
- </if>
- <if test="titleUrl != null" >
- title_url = #{titleUrl,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},
- create_time = #{createTime,jdbcType=TIMESTAMP},
- enroll_deadline = #{enrollDeadline,jdbcType=TIMESTAMP},
- title_url = #{titleUrl,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},
- create_time = #{createTime,jdbcType=TIMESTAMP},
- enroll_deadline = #{enrollDeadline,jdbcType=TIMESTAMP},
- title_url = #{titleUrl,jdbcType=VARCHAR}
- where id = #{id,jdbcType=BIGINT}
- </update>
- </mapper>
|