WeixinLotteryListMapper.xml 1.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.yoho.lottery.dal.WeixinLotteryListMapper">
  <resultMap id="BaseResultMap" type="com.yoho.lottery.dal.model.WeixinLotteryList">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="date" jdbcType="VARCHAR" property="date" />
    <result column="lottery_id" jdbcType="INTEGER" property="lotteryId" />
    <result column="type" jdbcType="VARCHAR" property="type" />
  </resultMap>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from weixin_lottery_list
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.yoho.lottery.dal.model.WeixinLotteryList">
    insert into weixin_lottery_list (id, date, lottery_id, 
      type)
    values (#{id,jdbcType=INTEGER}, #{date,jdbcType=VARCHAR}, #{lotteryId,jdbcType=INTEGER}, 
      #{type,jdbcType=VARCHAR})
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.yoho.lottery.dal.model.WeixinLotteryList">
    update weixin_lottery_list
    set date = #{date,jdbcType=VARCHAR},
      lottery_id = #{lotteryId,jdbcType=INTEGER},
      type = #{type,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select id, date, lottery_id, type
    from weixin_lottery_list
    where id = #{id,jdbcType=INTEGER}
  </select>
  <select id="selectAll" resultMap="BaseResultMap">
    select id, date, lottery_id, type
    from weixin_lottery_list
  </select>
</mapper>