123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- <?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.e3.zl.wc.dao.SevenStarColorMapper">
- <resultMap id="BaseResultMap" type="com.e3.zl.wc.model.SevenStarColor">
- <id column="per_num" jdbcType="INTEGER" property="perNum" />
- <result column="first_code" jdbcType="TINYINT" property="firstCode" />
- <result column="second_code" jdbcType="TINYINT" property="secondCode" />
- <result column="third_code" jdbcType="TINYINT" property="thirdCode" />
- <result column="fourth_code" jdbcType="TINYINT" property="fourthCode" />
- <result column="fifth_code" jdbcType="TINYINT" property="fifthCode" />
- <result column="sixth_code" jdbcType="TINYINT" property="sixthCode" />
- <result column="seventh_code" jdbcType="TINYINT" property="seventhCode" />
- </resultMap>
- <sql id="Example_Where_Clause">
- <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="Base_Column_List">
- per_num, first_code, second_code, third_code, fourth_code, fifth_code, sixth_code,
- seventh_code
- </sql>
- <select id="selectByExample" parameterType="com.e3.zl.wc.model.SevenStarColorExample" resultMap="BaseResultMap">
- select
- <if test="distinct">
- distinct
- </if>
- 'false' as QUERYID,
- <include refid="Base_Column_List" />
- from seven_star_color
- <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.Integer" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from seven_star_color
- where per_num = #{perNum,jdbcType=INTEGER}
- </select>
- <insert id="insert" parameterType="com.e3.zl.wc.model.SevenStarColor">
- insert into seven_star_color (per_num, first_code, second_code,
- third_code, fourth_code, fifth_code,
- sixth_code, seventh_code)
- values (#{perNum,jdbcType=INTEGER}, #{firstCode,jdbcType=TINYINT}, #{secondCode,jdbcType=TINYINT},
- #{thirdCode,jdbcType=TINYINT}, #{fourthCode,jdbcType=TINYINT}, #{fifthCode,jdbcType=TINYINT},
- #{sixthCode,jdbcType=TINYINT}, #{seventhCode,jdbcType=TINYINT})
- </insert>
- <insert id="insertSelective" parameterType="com.e3.zl.wc.model.SevenStarColor">
- insert into seven_star_color
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="perNum != null">
- per_num,
- </if>
- <if test="firstCode != null">
- first_code,
- </if>
- <if test="secondCode != null">
- second_code,
- </if>
- <if test="thirdCode != null">
- third_code,
- </if>
- <if test="fourthCode != null">
- fourth_code,
- </if>
- <if test="fifthCode != null">
- fifth_code,
- </if>
- <if test="sixthCode != null">
- sixth_code,
- </if>
- <if test="seventhCode != null">
- seventh_code,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="perNum != null">
- #{perNum,jdbcType=INTEGER},
- </if>
- <if test="firstCode != null">
- #{firstCode,jdbcType=TINYINT},
- </if>
- <if test="secondCode != null">
- #{secondCode,jdbcType=TINYINT},
- </if>
- <if test="thirdCode != null">
- #{thirdCode,jdbcType=TINYINT},
- </if>
- <if test="fourthCode != null">
- #{fourthCode,jdbcType=TINYINT},
- </if>
- <if test="fifthCode != null">
- #{fifthCode,jdbcType=TINYINT},
- </if>
- <if test="sixthCode != null">
- #{sixthCode,jdbcType=TINYINT},
- </if>
- <if test="seventhCode != null">
- #{seventhCode,jdbcType=TINYINT},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.e3.zl.wc.model.SevenStarColor">
- update seven_star_color
- <set>
- <if test="firstCode != null">
- first_code = #{firstCode,jdbcType=TINYINT},
- </if>
- <if test="secondCode != null">
- second_code = #{secondCode,jdbcType=TINYINT},
- </if>
- <if test="thirdCode != null">
- third_code = #{thirdCode,jdbcType=TINYINT},
- </if>
- <if test="fourthCode != null">
- fourth_code = #{fourthCode,jdbcType=TINYINT},
- </if>
- <if test="fifthCode != null">
- fifth_code = #{fifthCode,jdbcType=TINYINT},
- </if>
- <if test="sixthCode != null">
- sixth_code = #{sixthCode,jdbcType=TINYINT},
- </if>
- <if test="seventhCode != null">
- seventh_code = #{seventhCode,jdbcType=TINYINT},
- </if>
- </set>
- where per_num = #{perNum,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.e3.zl.wc.model.SevenStarColor">
- update seven_star_color
- set first_code = #{firstCode,jdbcType=TINYINT},
- second_code = #{secondCode,jdbcType=TINYINT},
- third_code = #{thirdCode,jdbcType=TINYINT},
- fourth_code = #{fourthCode,jdbcType=TINYINT},
- fifth_code = #{fifthCode,jdbcType=TINYINT},
- sixth_code = #{sixthCode,jdbcType=TINYINT},
- seventh_code = #{seventhCode,jdbcType=TINYINT}
- where per_num = #{perNum,jdbcType=INTEGER}
- </update>
- </mapper>
|