StaffApartmentOndutyMapper.xml 10.1 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.tianbo.warehouse.dao.StaffApartmentOndutyMapper" >
  <resultMap id="BaseResultMap" type="com.tianbo.warehouse.model.StaffApartmentOnduty" >
    <id column="id" property="id" jdbcType="VARCHAR" />
    <result column="warchkeeper" property="warchkeeper" jdbcType="VARCHAR" />
    <result column="handOverShiftTime" property="handovershifttime" jdbcType="TIMESTAMP" />
    <result column="publicLighting" property="publiclighting" jdbcType="VARCHAR" />
    <result column="carPark" property="carpark" jdbcType="VARCHAR" />
    <result column="campusAfforestation" property="campusafforestation" jdbcType="VARCHAR" />
    <result column="fireFightingEquipment" property="firefightingequipment" jdbcType="VARCHAR" />
    <result column="equipmentFacilities" property="equipmentfacilities" jdbcType="VARCHAR" />
    <result column="publicSanitation" property="publicsanitation" jdbcType="VARCHAR" />
    <result column="property" property="property" jdbcType="VARCHAR" />
    <result column="securityDanger" property="securitydanger" jdbcType="VARCHAR" />
    <result column="rests" property="rests" jdbcType="VARCHAR" />
    <result column="handoverMatters" property="handovermatters" jdbcType="VARCHAR" />
    <result column="creaTime" property="creatime" jdbcType="TIMESTAMP" />
    <result column="userId" property="userid" jdbcType="INTEGER" />
    <result column="remberk1" property="remberk1" jdbcType="VARCHAR" />
    <result column="remberk2" property="remberk2" jdbcType="VARCHAR" />
    <result column="remberk3" property="remberk3" jdbcType="VARCHAR" />
  </resultMap>
  <sql id="Base_Column_List" >
    id, warchkeeper, handOverShiftTime, publicLighting, carPark, campusAfforestation, 
    fireFightingEquipment, equipmentFacilities, publicSanitation, property, securityDanger, 
    rests, handoverMatters, creaTime, userId, remberk1, remberk2, remberk3
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
    select 
    <include refid="Base_Column_List" />
    from staff_apartment_on_duty
    where id = #{id,jdbcType=VARCHAR}
  </select>

  <select id="findAll" resultMap="BaseResultMap" parameterType="java.lang.String" >
    select
    <include refid="Base_Column_List" />
    from staff_apartment_on_duty
    <if test="warchkeeper != null and warchkeeper!=''" >
      where warchkeeper = #{warchkeeper, jdbcType=VARCHAR}
    </if>
  </select>

  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
    delete from staff_apartment_on_duty
    where id = #{id,jdbcType=VARCHAR}
  </delete>
  <insert id="insert" parameterType="com.tianbo.warehouse.model.StaffApartmentOnduty" >
    insert into staff_apartment_on_duty (id, warchkeeper, handOverShiftTime, 
      publicLighting, carPark, campusAfforestation, 
      fireFightingEquipment, equipmentFacilities, 
      publicSanitation, property, securityDanger, 
      rests, handoverMatters, creaTime, 
      userId, remberk1, remberk2, 
      remberk3)
    values (#{id,jdbcType=VARCHAR}, #{warchkeeper,jdbcType=VARCHAR}, #{handovershifttime,jdbcType=TIMESTAMP}, 
      #{publiclighting,jdbcType=VARCHAR}, #{carpark,jdbcType=VARCHAR}, #{campusafforestation,jdbcType=VARCHAR}, 
      #{firefightingequipment,jdbcType=VARCHAR}, #{equipmentfacilities,jdbcType=VARCHAR}, 
      #{publicsanitation,jdbcType=VARCHAR}, #{property,jdbcType=VARCHAR}, #{securitydanger,jdbcType=VARCHAR}, 
      #{rests,jdbcType=VARCHAR}, #{handovermatters,jdbcType=VARCHAR}, #{creatime,jdbcType=TIMESTAMP}, 
      #{userid,jdbcType=INTEGER}, #{remberk1,jdbcType=VARCHAR}, #{remberk2,jdbcType=VARCHAR}, 
      #{remberk3,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.tianbo.warehouse.model.StaffApartmentOnduty" >
    insert into staff_apartment_on_duty
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        id,
      </if>
      <if test="warchkeeper != null" >
        warchkeeper,
      </if>
      <if test="handovershifttime != null" >
        handOverShiftTime,
      </if>
      <if test="publiclighting != null" >
        publicLighting,
      </if>
      <if test="carpark != null" >
        carPark,
      </if>
      <if test="campusafforestation != null" >
        campusAfforestation,
      </if>
      <if test="firefightingequipment != null" >
        fireFightingEquipment,
      </if>
      <if test="equipmentfacilities != null" >
        equipmentFacilities,
      </if>
      <if test="publicsanitation != null" >
        publicSanitation,
      </if>
      <if test="property != null" >
        property,
      </if>
      <if test="securitydanger != null" >
        securityDanger,
      </if>
      <if test="rests != null" >
        rests,
      </if>
      <if test="handovermatters != null" >
        handoverMatters,
      </if>
      <if test="creatime != null" >
        creaTime,
      </if>
      <if test="userid != null" >
        userId,
      </if>
      <if test="remberk1 != null" >
        remberk1,
      </if>
      <if test="remberk2 != null" >
        remberk2,
      </if>
      <if test="remberk3 != null" >
        remberk3,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        #{id,jdbcType=VARCHAR},
      </if>
      <if test="warchkeeper != null" >
        #{warchkeeper,jdbcType=VARCHAR},
      </if>
      <if test="handovershifttime != null" >
        #{handovershifttime,jdbcType=TIMESTAMP},
      </if>
      <if test="publiclighting != null" >
        #{publiclighting,jdbcType=VARCHAR},
      </if>
      <if test="carpark != null" >
        #{carpark,jdbcType=VARCHAR},
      </if>
      <if test="campusafforestation != null" >
        #{campusafforestation,jdbcType=VARCHAR},
      </if>
      <if test="firefightingequipment != null" >
        #{firefightingequipment,jdbcType=VARCHAR},
      </if>
      <if test="equipmentfacilities != null" >
        #{equipmentfacilities,jdbcType=VARCHAR},
      </if>
      <if test="publicsanitation != null" >
        #{publicsanitation,jdbcType=VARCHAR},
      </if>
      <if test="property != null" >
        #{property,jdbcType=VARCHAR},
      </if>
      <if test="securitydanger != null" >
        #{securitydanger,jdbcType=VARCHAR},
      </if>
      <if test="rests != null" >
        #{rests,jdbcType=VARCHAR},
      </if>
      <if test="handovermatters != null" >
        #{handovermatters,jdbcType=VARCHAR},
      </if>
      <if test="creatime != null" >
        #{creatime,jdbcType=TIMESTAMP},
      </if>
      <if test="userid != null" >
        #{userid,jdbcType=INTEGER},
      </if>
      <if test="remberk1 != null" >
        #{remberk1,jdbcType=VARCHAR},
      </if>
      <if test="remberk2 != null" >
        #{remberk2,jdbcType=VARCHAR},
      </if>
      <if test="remberk3 != null" >
        #{remberk3,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.tianbo.warehouse.model.StaffApartmentOnduty" >
    update staff_apartment_on_duty
    <set >
      <if test="warchkeeper != null" >
        warchkeeper = #{warchkeeper,jdbcType=VARCHAR},
      </if>
      <if test="handovershifttime != null" >
        handOverShiftTime = #{handovershifttime,jdbcType=TIMESTAMP},
      </if>
      <if test="publiclighting != null" >
        publicLighting = #{publiclighting,jdbcType=VARCHAR},
      </if>
      <if test="carpark != null" >
        carPark = #{carpark,jdbcType=VARCHAR},
      </if>
      <if test="campusafforestation != null" >
        campusAfforestation = #{campusafforestation,jdbcType=VARCHAR},
      </if>
      <if test="firefightingequipment != null" >
        fireFightingEquipment = #{firefightingequipment,jdbcType=VARCHAR},
      </if>
      <if test="equipmentfacilities != null" >
        equipmentFacilities = #{equipmentfacilities,jdbcType=VARCHAR},
      </if>
      <if test="publicsanitation != null" >
        publicSanitation = #{publicsanitation,jdbcType=VARCHAR},
      </if>
      <if test="property != null" >
        property = #{property,jdbcType=VARCHAR},
      </if>
      <if test="securitydanger != null" >
        securityDanger = #{securitydanger,jdbcType=VARCHAR},
      </if>
      <if test="rests != null" >
        rests = #{rests,jdbcType=VARCHAR},
      </if>
      <if test="handovermatters != null" >
        handoverMatters = #{handovermatters,jdbcType=VARCHAR},
      </if>
      <if test="creatime != null" >
        creaTime = #{creatime,jdbcType=TIMESTAMP},
      </if>
      <if test="userid != null" >
        userId = #{userid,jdbcType=INTEGER},
      </if>
      <if test="remberk1 != null" >
        remberk1 = #{remberk1,jdbcType=VARCHAR},
      </if>
      <if test="remberk2 != null" >
        remberk2 = #{remberk2,jdbcType=VARCHAR},
      </if>
      <if test="remberk3 != null" >
        remberk3 = #{remberk3,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.tianbo.warehouse.model.StaffApartmentOnduty" >
    update staff_apartment_on_duty
    set warchkeeper = #{warchkeeper,jdbcType=VARCHAR},
      handOverShiftTime = #{handovershifttime,jdbcType=TIMESTAMP},
      publicLighting = #{publiclighting,jdbcType=VARCHAR},
      carPark = #{carpark,jdbcType=VARCHAR},
      campusAfforestation = #{campusafforestation,jdbcType=VARCHAR},
      fireFightingEquipment = #{firefightingequipment,jdbcType=VARCHAR},
      equipmentFacilities = #{equipmentfacilities,jdbcType=VARCHAR},
      publicSanitation = #{publicsanitation,jdbcType=VARCHAR},
      property = #{property,jdbcType=VARCHAR},
      securityDanger = #{securitydanger,jdbcType=VARCHAR},
      rests = #{rests,jdbcType=VARCHAR},
      handoverMatters = #{handovermatters,jdbcType=VARCHAR},
      creaTime = #{creatime,jdbcType=TIMESTAMP},
      userId = #{userid,jdbcType=INTEGER},
      remberk1 = #{remberk1,jdbcType=VARCHAR},
      remberk2 = #{remberk2,jdbcType=VARCHAR},
      remberk3 = #{remberk3,jdbcType=VARCHAR}
    where id = #{id,jdbcType=VARCHAR}
  </update>
</mapper>