TdBParkCardCouponsMapper.xml 7.64 KB
<?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.zteits.pay.mapper.TdBParkCardCouponsMapper" >
  <resultMap id="BaseResultMap" type="com.zteits.pay.domain.TdBParkCardCoupons" >
    <id column="id" property="id" jdbcType="BIGINT" />
    <result column="park_id" property="parkId" jdbcType="VARCHAR" />
    <result column="goods_big_type" property="goodsBigType" jdbcType="INTEGER" />
    <result column="goods_type" property="goodsType" jdbcType="INTEGER" />
    <result column="goods_type_remark" property="goodsTypeRemark" jdbcType="VARCHAR" />
    <result column="goods_amount" property="goodsAmount" jdbcType="DECIMAL" />
    <result column="eff_date" property="effDate" jdbcType="TIMESTAMP" />
    <result column="exp_date" property="expDate" jdbcType="TIMESTAMP" />
    <result column="goods_state" property="goodsState" jdbcType="BIGINT" />
    <result column="data_state" property="dataState" jdbcType="INTEGER" />
    <result column="create_empid" property="createEmpid" jdbcType="VARCHAR" />
    <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
    <result column="modfiy_empid" property="modfiyEmpid" jdbcType="VARCHAR" />
    <result column="modfiy_date" property="modfiyDate" jdbcType="TIMESTAMP" />
  </resultMap>
  <sql id="Base_Column_List" >
    id, park_id, goods_big_type, goods_type, goods_type_remark, goods_amount, eff_date, 
    exp_date, goods_state, data_state, create_empid, create_date, modfiy_empid, modfiy_date
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
    select 
    <include refid="Base_Column_List" />
    from td_b_park_card_coupons
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
    delete from td_b_park_card_coupons
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.zteits.pay.domain.TdBParkCardCoupons" >
    <selectKey resultType="java.lang.Long" keyProperty="id" order="AFTER" >
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into td_b_park_card_coupons (park_id, goods_big_type, goods_type, 
      goods_type_remark, goods_amount, eff_date, 
      exp_date, goods_state, data_state, 
      create_empid, create_date, modfiy_empid, 
      modfiy_date)
    values (#{parkId,jdbcType=VARCHAR}, #{goodsBigType,jdbcType=INTEGER}, #{goodsType,jdbcType=INTEGER}, 
      #{goodsTypeRemark,jdbcType=VARCHAR}, #{goodsAmount,jdbcType=DECIMAL}, #{effDate,jdbcType=TIMESTAMP}, 
      #{expDate,jdbcType=TIMESTAMP}, #{goodsState,jdbcType=BIGINT}, #{dataState,jdbcType=INTEGER}, 
      #{createEmpid,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, #{modfiyEmpid,jdbcType=VARCHAR}, 
      #{modfiyDate,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.pay.domain.TdBParkCardCoupons" >
    <selectKey resultType="java.lang.Long" keyProperty="id" order="AFTER" >
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into td_b_park_card_coupons
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="parkId != null" >
        park_id,
      </if>
      <if test="goodsBigType != null" >
        goods_big_type,
      </if>
      <if test="goodsType != null" >
        goods_type,
      </if>
      <if test="goodsTypeRemark != null" >
        goods_type_remark,
      </if>
      <if test="goodsAmount != null" >
        goods_amount,
      </if>
      <if test="effDate != null" >
        eff_date,
      </if>
      <if test="expDate != null" >
        exp_date,
      </if>
      <if test="goodsState != null" >
        goods_state,
      </if>
      <if test="dataState != null" >
        data_state,
      </if>
      <if test="createEmpid != null" >
        create_empid,
      </if>
      <if test="createDate != null" >
        create_date,
      </if>
      <if test="modfiyEmpid != null" >
        modfiy_empid,
      </if>
      <if test="modfiyDate != null" >
        modfiy_date,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="parkId != null" >
        #{parkId,jdbcType=VARCHAR},
      </if>
      <if test="goodsBigType != null" >
        #{goodsBigType,jdbcType=INTEGER},
      </if>
      <if test="goodsType != null" >
        #{goodsType,jdbcType=INTEGER},
      </if>
      <if test="goodsTypeRemark != null" >
        #{goodsTypeRemark,jdbcType=VARCHAR},
      </if>
      <if test="goodsAmount != null" >
        #{goodsAmount,jdbcType=DECIMAL},
      </if>
      <if test="effDate != null" >
        #{effDate,jdbcType=TIMESTAMP},
      </if>
      <if test="expDate != null" >
        #{expDate,jdbcType=TIMESTAMP},
      </if>
      <if test="goodsState != null" >
        #{goodsState,jdbcType=BIGINT},
      </if>
      <if test="dataState != null" >
        #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createEmpid != null" >
        #{createEmpid,jdbcType=VARCHAR},
      </if>
      <if test="createDate != null" >
        #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="modfiyEmpid != null" >
        #{modfiyEmpid,jdbcType=VARCHAR},
      </if>
      <if test="modfiyDate != null" >
        #{modfiyDate,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.zteits.pay.domain.TdBParkCardCoupons" >
    update td_b_park_card_coupons
    <set >
      <if test="parkId != null" >
        park_id = #{parkId,jdbcType=VARCHAR},
      </if>
      <if test="goodsBigType != null" >
        goods_big_type = #{goodsBigType,jdbcType=INTEGER},
      </if>
      <if test="goodsType != null" >
        goods_type = #{goodsType,jdbcType=INTEGER},
      </if>
      <if test="goodsTypeRemark != null" >
        goods_type_remark = #{goodsTypeRemark,jdbcType=VARCHAR},
      </if>
      <if test="goodsAmount != null" >
        goods_amount = #{goodsAmount,jdbcType=DECIMAL},
      </if>
      <if test="effDate != null" >
        eff_date = #{effDate,jdbcType=TIMESTAMP},
      </if>
      <if test="expDate != null" >
        exp_date = #{expDate,jdbcType=TIMESTAMP},
      </if>
      <if test="goodsState != null" >
        goods_state = #{goodsState,jdbcType=BIGINT},
      </if>
      <if test="dataState != null" >
        data_state = #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createEmpid != null" >
        create_empid = #{createEmpid,jdbcType=VARCHAR},
      </if>
      <if test="createDate != null" >
        create_date = #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="modfiyEmpid != null" >
        modfiy_empid = #{modfiyEmpid,jdbcType=VARCHAR},
      </if>
      <if test="modfiyDate != null" >
        modfiy_date = #{modfiyDate,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.zteits.pay.domain.TdBParkCardCoupons" >
    update td_b_park_card_coupons
    set park_id = #{parkId,jdbcType=VARCHAR},
      goods_big_type = #{goodsBigType,jdbcType=INTEGER},
      goods_type = #{goodsType,jdbcType=INTEGER},
      goods_type_remark = #{goodsTypeRemark,jdbcType=VARCHAR},
      goods_amount = #{goodsAmount,jdbcType=DECIMAL},
      eff_date = #{effDate,jdbcType=TIMESTAMP},
      exp_date = #{expDate,jdbcType=TIMESTAMP},
      goods_state = #{goodsState,jdbcType=BIGINT},
      data_state = #{dataState,jdbcType=INTEGER},
      create_empid = #{createEmpid,jdbcType=VARCHAR},
      create_date = #{createDate,jdbcType=TIMESTAMP},
      modfiy_empid = #{modfiyEmpid,jdbcType=VARCHAR},
      modfiy_date = #{modfiyDate,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>