AttendanceMachineMapper.xml 4.61 KB
Newer Older
ilal committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
<?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="cn.timer.api.dao.kqgl.AttendanceMachineMapper" >
  <resultMap id="BaseResultMap" type="cn.timer.api.bean.kqgl.AttendanceMachine" >
    <id column="id" property="id" jdbcType="INTEGER" />
    <result column="name" property="name" jdbcType="VARCHAR" />
    <result column="code" property="code" jdbcType="VARCHAR" />
    <result column="qyid" property="qyid" jdbcType="INTEGER" />
    <result column="lusj_time" property="lusjTime" jdbcType="BIGINT" />
    <result column="luryid" property="luryid" jdbcType="INTEGER" />
    <result column="type" property="type" jdbcType="INTEGER" />
  </resultMap>
  <sql id="Base_Column_List" >
    id, name, code, qyid, lusj_time, luryid, type
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
    select 
    <include refid="Base_Column_List" />
    from kqgl_asso_kqj
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
    delete from kqgl_asso_kqj
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="cn.timer.api.bean.kqgl.AttendanceMachine" useGeneratedKeys="true" keyProperty="id">
    insert into kqgl_asso_kqj (name, code, 
      qyid, lusj_time, luryid, 
      type)
    values (#{name,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, 
      #{qyid,jdbcType=INTEGER}, #{lusjTime,jdbcType=BIGINT}, #{luryid,jdbcType=INTEGER}, 
      #{type,jdbcType=INTEGER})
  </insert>
  <insert id="insertSelective" parameterType="cn.timer.api.bean.kqgl.AttendanceMachine" useGeneratedKeys="true" keyProperty="id">
    insert into kqgl_asso_kqj
    <trim prefix="(" suffix=")" suffixOverrides="," >
      
      <if test="name != null" >
        name,
      </if>
      <if test="code != null" >
        code,
      </if>
      <if test="qyid != null" >
        qyid,
      </if>
      <if test="lusjTime != null" >
        lusj_time,
      </if>
      <if test="luryid != null" >
        luryid,
      </if>
      <if test="type != null" >
        type,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      
      <if test="name != null" >
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="code != null" >
        #{code,jdbcType=VARCHAR},
      </if>
      <if test="qyid != null" >
        #{qyid,jdbcType=INTEGER},
      </if>
      <if test="lusjTime != null" >
        #{lusjTime,jdbcType=BIGINT},
      </if>
      <if test="luryid != null" >
        #{luryid,jdbcType=INTEGER},
      </if>
      <if test="type != null" >
        #{type,jdbcType=INTEGER},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="cn.timer.api.bean.kqgl.AttendanceMachine" >
    update kqgl_asso_kqj
    <set >
      <if test="name != null" >
        name = #{name,jdbcType=VARCHAR},
      </if>
      <if test="code != null" >
        code = #{code,jdbcType=VARCHAR},
      </if>
      <if test="qyid != null" >
        qyid = #{qyid,jdbcType=INTEGER},
      </if>
      <if test="lusjTime != null" >
        lusj_time = #{lusjTime,jdbcType=BIGINT},
      </if>
      <if test="luryid != null" >
        luryid = #{luryid,jdbcType=INTEGER},
      </if>
      <if test="type != null" >
        type = #{type,jdbcType=INTEGER},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="cn.timer.api.bean.kqgl.AttendanceMachine" >
    update kqgl_asso_kqj
    set name = #{name,jdbcType=VARCHAR},
      code = #{code,jdbcType=VARCHAR},
      qyid = #{qyid,jdbcType=INTEGER},
      lusj_time = #{lusjTime,jdbcType=BIGINT},
      luryid = #{luryid,jdbcType=INTEGER},
      type = #{type,jdbcType=INTEGER}
    where id = #{id,jdbcType=INTEGER}
  </update>
  
   <select id="selectByPrimaryByQyid" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
    select 
    <include refid="Base_Column_List" />
    from kqgl_asso_kqj
    where qyid = #{qyid,jdbcType=INTEGER}
  </select>
  
  <update id="updateByPrimaryByid" parameterType="cn.timer.api.bean.kqgl.AttendanceMachine" >
    update kqgl_asso_kqj
    set name = #{name,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
  
  <select id="selectByQyidDev" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from kqgl_asso_kqj
    where code = #{code,jdbcType=VARCHAR}
  </select>
yuquan.zhu committed
133
</mapper>