| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333 |
- <?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.MarketingManagementMapper">
- <resultMap id="BaseResultMap" type="com.goafanti.common.model.MarketingManagement">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Tue Sep 26 14:34:04 CST 2017.
- -->
- <id column="id" jdbcType="VARCHAR" property="id" />
- <result column="product_id" jdbcType="VARCHAR" property="productId" />
- <result column="show_page" jdbcType="VARCHAR" property="showPage" />
- <result column="cover_img" jdbcType="VARCHAR" property="coverImg" />
- <result column="start_date" jdbcType="TIMESTAMP" property="startDate" />
- <result column="end_date" jdbcType="TIMESTAMP" property="endDate" />
- <result column="category" jdbcType="INTEGER" property="category" />
- <result column="effective" jdbcType="INTEGER" property="effective" />
- </resultMap>
- <sql id="Example_Where_Clause">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Tue Sep 26 14:34:04 CST 2017.
- -->
- <where>
- <foreach collection="oredCriteria" item="criteria" separator="or">
- <if test="criteria.valid">
- <trim prefix="(" prefixOverrides="and" suffix=")">
- <foreach collection="criteria.criteria" item="criterion">
- <choose>
- <when test="criterion.noValue">
- and ${criterion.condition}
- </when>
- <when test="criterion.singleValue">
- and ${criterion.condition} #{criterion.value}
- </when>
- <when test="criterion.betweenValue">
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
- </when>
- <when test="criterion.listValue">
- and ${criterion.condition}
- <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
- #{listItem}
- </foreach>
- </when>
- </choose>
- </foreach>
- </trim>
- </if>
- </foreach>
- </where>
- </sql>
- <sql id="Update_By_Example_Where_Clause">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Tue Sep 26 14:34:04 CST 2017.
- -->
- <where>
- <foreach collection="example.oredCriteria" item="criteria" separator="or">
- <if test="criteria.valid">
- <trim prefix="(" prefixOverrides="and" suffix=")">
- <foreach collection="criteria.criteria" item="criterion">
- <choose>
- <when test="criterion.noValue">
- and ${criterion.condition}
- </when>
- <when test="criterion.singleValue">
- and ${criterion.condition} #{criterion.value}
- </when>
- <when test="criterion.betweenValue">
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
- </when>
- <when test="criterion.listValue">
- and ${criterion.condition}
- <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
- #{listItem}
- </foreach>
- </when>
- </choose>
- </foreach>
- </trim>
- </if>
- </foreach>
- </where>
- </sql>
- <sql id="Base_Column_List">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Tue Sep 26 14:34:04 CST 2017.
- -->
- id, product_id, show_page, cover_img, start_date, end_date, category, effective
- </sql>
- <select id="selectByExample" parameterType="com.goafanti.common.model.MarketingManagementExample" resultMap="BaseResultMap">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Tue Sep 26 14:34:04 CST 2017.
- -->
- select
- <if test="distinct">
- distinct
- </if>
- <include refid="Base_Column_List" />
- from marketing_management
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- <if test="orderByClause != null">
- order by ${orderByClause}
- </if>
- </select>
- <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Tue Sep 26 14:34:04 CST 2017.
- -->
- select
- <include refid="Base_Column_List" />
- from marketing_management
- where id = #{id,jdbcType=VARCHAR}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Tue Sep 26 14:34:04 CST 2017.
- -->
- delete from marketing_management
- where id = #{id,jdbcType=VARCHAR}
- </delete>
- <delete id="deleteByExample" parameterType="com.goafanti.common.model.MarketingManagementExample">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Tue Sep 26 14:34:04 CST 2017.
- -->
- delete from marketing_management
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </delete>
- <insert id="insert" parameterType="com.goafanti.common.model.MarketingManagement">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Tue Sep 26 14:34:04 CST 2017.
- -->
- insert into marketing_management (id, product_id, show_page,
- cover_img, start_date, end_date,
- category, effective)
- values (#{id,jdbcType=VARCHAR}, #{productId,jdbcType=VARCHAR}, #{showPage,jdbcType=VARCHAR},
- #{coverImg,jdbcType=VARCHAR}, #{startDate,jdbcType=TIMESTAMP}, #{endDate,jdbcType=TIMESTAMP},
- #{category,jdbcType=INTEGER}, #{effective,jdbcType=INTEGER})
- </insert>
- <insert id="insertSelective" parameterType="com.goafanti.common.model.MarketingManagement">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Tue Sep 26 14:34:04 CST 2017.
- -->
- insert into marketing_management
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">
- id,
- </if>
- <if test="productId != null">
- product_id,
- </if>
- <if test="showPage != null">
- show_page,
- </if>
- <if test="coverImg != null">
- cover_img,
- </if>
- <if test="startDate != null">
- start_date,
- </if>
- <if test="endDate != null">
- end_date,
- </if>
- <if test="category != null">
- category,
- </if>
- <if test="effective != null">
- effective,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">
- #{id,jdbcType=VARCHAR},
- </if>
- <if test="productId != null">
- #{productId,jdbcType=VARCHAR},
- </if>
- <if test="showPage != null">
- #{showPage,jdbcType=VARCHAR},
- </if>
- <if test="coverImg != null">
- #{coverImg,jdbcType=VARCHAR},
- </if>
- <if test="startDate != null">
- #{startDate,jdbcType=TIMESTAMP},
- </if>
- <if test="endDate != null">
- #{endDate,jdbcType=TIMESTAMP},
- </if>
- <if test="category != null">
- #{category,jdbcType=INTEGER},
- </if>
- <if test="effective != null">
- #{effective,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <select id="countByExample" parameterType="com.goafanti.common.model.MarketingManagementExample" resultType="java.lang.Long">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Tue Sep 26 14:34:04 CST 2017.
- -->
- select count(*) from marketing_management
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </select>
- <update id="updateByExampleSelective" parameterType="map">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Tue Sep 26 14:34:04 CST 2017.
- -->
- update marketing_management
- <set>
- <if test="record.id != null">
- id = #{record.id,jdbcType=VARCHAR},
- </if>
- <if test="record.productId != null">
- product_id = #{record.productId,jdbcType=VARCHAR},
- </if>
- <if test="record.showPage != null">
- show_page = #{record.showPage,jdbcType=VARCHAR},
- </if>
- <if test="record.coverImg != null">
- cover_img = #{record.coverImg,jdbcType=VARCHAR},
- </if>
- <if test="record.startDate != null">
- start_date = #{record.startDate,jdbcType=TIMESTAMP},
- </if>
- <if test="record.endDate != null">
- end_date = #{record.endDate,jdbcType=TIMESTAMP},
- </if>
- <if test="record.category != null">
- category = #{record.category,jdbcType=INTEGER},
- </if>
- <if test="record.effective != null">
- effective = #{record.effective,jdbcType=INTEGER},
- </if>
- </set>
- <if test="_parameter != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByExample" parameterType="map">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Tue Sep 26 14:34:04 CST 2017.
- -->
- update marketing_management
- set id = #{record.id,jdbcType=VARCHAR},
- product_id = #{record.productId,jdbcType=VARCHAR},
- show_page = #{record.showPage,jdbcType=VARCHAR},
- cover_img = #{record.coverImg,jdbcType=VARCHAR},
- start_date = #{record.startDate,jdbcType=TIMESTAMP},
- end_date = #{record.endDate,jdbcType=TIMESTAMP},
- category = #{record.category,jdbcType=INTEGER},
- effective = #{record.effective,jdbcType=INTEGER}
- <if test="_parameter != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.MarketingManagement">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Tue Sep 26 14:34:04 CST 2017.
- -->
- update marketing_management
- <set>
- <if test="productId != null">
- product_id = #{productId,jdbcType=VARCHAR},
- </if>
- <if test="showPage != null">
- show_page = #{showPage,jdbcType=VARCHAR},
- </if>
- <if test="coverImg != null">
- cover_img = #{coverImg,jdbcType=VARCHAR},
- </if>
- <if test="startDate != null">
- start_date = #{startDate,jdbcType=TIMESTAMP},
- </if>
- <if test="endDate != null">
- end_date = #{endDate,jdbcType=TIMESTAMP},
- </if>
- <if test="category != null">
- category = #{category,jdbcType=INTEGER},
- </if>
- <if test="effective != null">
- effective = #{effective,jdbcType=INTEGER},
- </if>
- </set>
- where id = #{id,jdbcType=VARCHAR}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.MarketingManagement">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Tue Sep 26 14:34:04 CST 2017.
- -->
- update marketing_management
- set product_id = #{productId,jdbcType=VARCHAR},
- show_page = #{showPage,jdbcType=VARCHAR},
- cover_img = #{coverImg,jdbcType=VARCHAR},
- start_date = #{startDate,jdbcType=TIMESTAMP},
- end_date = #{endDate,jdbcType=TIMESTAMP},
- category = #{category,jdbcType=INTEGER},
- effective = #{effective,jdbcType=INTEGER}
- where id = #{id,jdbcType=VARCHAR}
- </update>
- </mapper>
|