|
|
@@ -0,0 +1,214 @@
|
|
|
+<?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.kede.common.dao.ActivityMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.kede.common.model.Activity">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Mon Feb 01 17:23:07 CST 2021.
|
|
|
+ -->
|
|
|
+ <id column="id" jdbcType="INTEGER" property="id" />
|
|
|
+ <result column="title" jdbcType="VARCHAR" property="title" />
|
|
|
+ <result column="publisher" jdbcType="VARCHAR" property="publisher" />
|
|
|
+ <result column="picture_url" jdbcType="VARCHAR" property="pictureUrl" />
|
|
|
+ <result column="sort" jdbcType="INTEGER" property="sort" />
|
|
|
+ <result column="release_status" jdbcType="INTEGER" property="releaseStatus" />
|
|
|
+ <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
+ <result column="release_time" jdbcType="TIMESTAMP" property="releaseTime" />
|
|
|
+ </resultMap>
|
|
|
+ <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.kede.common.model.Activity">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Mon Feb 01 17:23:07 CST 2021.
|
|
|
+ -->
|
|
|
+ <result column="content" jdbcType="LONGVARCHAR" property="content" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Mon Feb 01 17:23:07 CST 2021.
|
|
|
+ -->
|
|
|
+ id, title, publisher, picture_url, sort, release_status, create_time, release_time
|
|
|
+ </sql>
|
|
|
+ <sql id="Blob_Column_List">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Mon Feb 01 17:23:07 CST 2021.
|
|
|
+ -->
|
|
|
+ content
|
|
|
+ </sql>
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Mon Feb 01 17:23:07 CST 2021.
|
|
|
+ -->
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ ,
|
|
|
+ <include refid="Blob_Column_List" />
|
|
|
+ from activity
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </select>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Mon Feb 01 17:23:07 CST 2021.
|
|
|
+ -->
|
|
|
+ delete from activity
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.kede.common.model.Activity">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Mon Feb 01 17:23:07 CST 2021.
|
|
|
+ -->
|
|
|
+ insert into activity (id, title, publisher,
|
|
|
+ picture_url, sort, release_status,
|
|
|
+ create_time, release_time, content
|
|
|
+ )
|
|
|
+ values (#{id,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, #{publisher,jdbcType=VARCHAR},
|
|
|
+ #{pictureUrl,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, #{releaseStatus,jdbcType=INTEGER},
|
|
|
+ #{createTime,jdbcType=TIMESTAMP}, #{releaseTime,jdbcType=TIMESTAMP}, #{content,jdbcType=LONGVARCHAR}
|
|
|
+ )
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.kede.common.model.Activity">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Mon Feb 01 17:23:07 CST 2021.
|
|
|
+ -->
|
|
|
+ insert into activity
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">
|
|
|
+ id,
|
|
|
+ </if>
|
|
|
+ <if test="title != null">
|
|
|
+ title,
|
|
|
+ </if>
|
|
|
+ <if test="publisher != null">
|
|
|
+ publisher,
|
|
|
+ </if>
|
|
|
+ <if test="pictureUrl != null">
|
|
|
+ picture_url,
|
|
|
+ </if>
|
|
|
+ <if test="sort != null">
|
|
|
+ sort,
|
|
|
+ </if>
|
|
|
+ <if test="releaseStatus != null">
|
|
|
+ release_status,
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time,
|
|
|
+ </if>
|
|
|
+ <if test="releaseTime != null">
|
|
|
+ release_time,
|
|
|
+ </if>
|
|
|
+ <if test="content != null">
|
|
|
+ content,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">
|
|
|
+ #{id,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="title != null">
|
|
|
+ #{title,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="publisher != null">
|
|
|
+ #{publisher,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="pictureUrl != null">
|
|
|
+ #{pictureUrl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sort != null">
|
|
|
+ #{sort,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="releaseStatus != null">
|
|
|
+ #{releaseStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="releaseTime != null">
|
|
|
+ #{releaseTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="content != null">
|
|
|
+ #{content,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.kede.common.model.Activity">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Mon Feb 01 17:23:07 CST 2021.
|
|
|
+ -->
|
|
|
+ update activity
|
|
|
+ <set>
|
|
|
+ <if test="title != null">
|
|
|
+ title = #{title,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="publisher != null">
|
|
|
+ publisher = #{publisher,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="pictureUrl != null">
|
|
|
+ picture_url = #{pictureUrl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sort != null">
|
|
|
+ sort = #{sort,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="releaseStatus != null">
|
|
|
+ release_status = #{releaseStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="releaseTime != null">
|
|
|
+ release_time = #{releaseTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="content != null">
|
|
|
+ content = #{content,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.kede.common.model.Activity">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Mon Feb 01 17:23:07 CST 2021.
|
|
|
+ -->
|
|
|
+ update activity
|
|
|
+ set title = #{title,jdbcType=VARCHAR},
|
|
|
+ publisher = #{publisher,jdbcType=VARCHAR},
|
|
|
+ picture_url = #{pictureUrl,jdbcType=VARCHAR},
|
|
|
+ sort = #{sort,jdbcType=INTEGER},
|
|
|
+ release_status = #{releaseStatus,jdbcType=INTEGER},
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ release_time = #{releaseTime,jdbcType=TIMESTAMP},
|
|
|
+ content = #{content,jdbcType=LONGVARCHAR}
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.kede.common.model.Activity">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Mon Feb 01 17:23:07 CST 2021.
|
|
|
+ -->
|
|
|
+ update activity
|
|
|
+ set title = #{title,jdbcType=VARCHAR},
|
|
|
+ publisher = #{publisher,jdbcType=VARCHAR},
|
|
|
+ picture_url = #{pictureUrl,jdbcType=VARCHAR},
|
|
|
+ sort = #{sort,jdbcType=INTEGER},
|
|
|
+ release_status = #{releaseStatus,jdbcType=INTEGER},
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ release_time = #{releaseTime,jdbcType=TIMESTAMP}
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+</mapper>
|