LotteryCountMapper.xml 1.8 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.LotteryCountMapper">
  <resultMap id="BaseResultMap" type="com.yoho.lottery.dal.model.LotteryCount">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="uid" jdbcType="INTEGER" property="uid" />
    <result column="key_string" jdbcType="VARCHAR" property="keyString" />
    <result column="project" jdbcType="VARCHAR" property="project" />
    <result column="create_time" jdbcType="INTEGER" property="createTime" />
  </resultMap>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from lottery_count
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.yoho.lottery.dal.model.LotteryCount">
    insert into lottery_count (id, uid, key_string, 
      project, create_time)
    values (#{id,jdbcType=INTEGER}, #{uid,jdbcType=INTEGER}, #{keyString,jdbcType=VARCHAR}, 
      #{project,jdbcType=VARCHAR}, #{createTime,jdbcType=INTEGER})
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.yoho.lottery.dal.model.LotteryCount">
    update lottery_count
    set uid = #{uid,jdbcType=INTEGER},
      key_string = #{keyString,jdbcType=VARCHAR},
      project = #{project,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=INTEGER}
    where id = #{id,jdbcType=INTEGER}
  </update>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select id, uid, key_string, project, create_time
    from lottery_count
    where id = #{id,jdbcType=INTEGER}
  </select>
  <select id="selectAll" resultMap="BaseResultMap">
    select id, uid, key_string, project, create_time
    from lottery_count
  </select>
</mapper>