|
@@ -0,0 +1,221 @@
|
|
|
+<?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.com.ty.lift.manager.library.dao.mapper.LiftExtensionMapper" >
|
|
|
+ <resultMap id="BaseResultMap" type="cn.com.ty.lift.manager.library.dao.entity.LiftExtension" >
|
|
|
+ <id column="id" property="id" jdbcType="BIGINT" />
|
|
|
+ <result column="mt_company_id" property="mtCompanyId" jdbcType="BIGINT" />
|
|
|
+ <result column="project_id" property="projectId" jdbcType="BIGINT" />
|
|
|
+ <result column="worker_id" property="workerId" jdbcType="BIGINT" />
|
|
|
+ <result column="first_time" property="firstTime" jdbcType="DATE" />
|
|
|
+ <result column="out_service_date" property="outServiceDate" jdbcType="DATE" />
|
|
|
+ <result column="annual_inspection_date" property="annualInspectionDate" jdbcType="DATE" />
|
|
|
+ <result column="area_code" property="areaCode" jdbcType="CHAR" />
|
|
|
+ <result column="lift_status" property="liftStatus" jdbcType="TINYINT" />
|
|
|
+ <result column="is_certificated" property="isCertificated" jdbcType="TINYINT" />
|
|
|
+ <result column="is_locked" property="isLocked" jdbcType="TINYINT" />
|
|
|
+ <result column="stop_date" property="stopDate" jdbcType="TIMESTAMP" />
|
|
|
+ <result column="plan_interval" property="planInterval" jdbcType="TINYINT" />
|
|
|
+ <result column="device_id" property="deviceId" jdbcType="VARCHAR" />
|
|
|
+ <result column="device_type" property="deviceType" jdbcType="TINYINT" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="Base_Column_List" >
|
|
|
+ id, mt_company_id, project_id, worker_id, first_time, out_service_date, annual_inspection_date,
|
|
|
+ area_code, lift_status, is_certificated, is_locked, stop_date, plan_interval, device_id,
|
|
|
+ device_type
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from lift_extension
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
|
|
|
+ delete from lift_extension
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <insert id="insert" parameterType="cn.com.ty.lift.manager.library.dao.entity.LiftExtension" >
|
|
|
+ insert into lift_extension (id, mt_company_id, project_id,
|
|
|
+ worker_id, first_time, out_service_date,
|
|
|
+ annual_inspection_date, area_code, lift_status,
|
|
|
+ is_certificated, is_locked, stop_date,
|
|
|
+ plan_interval, device_id, device_type
|
|
|
+ )
|
|
|
+ values (#{id,jdbcType=BIGINT}, #{mtCompanyId,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT},
|
|
|
+ #{workerId,jdbcType=BIGINT}, #{firstTime,jdbcType=DATE}, #{outServiceDate,jdbcType=DATE},
|
|
|
+ #{annualInspectionDate,jdbcType=DATE}, #{areaCode,jdbcType=CHAR}, #{liftStatus,jdbcType=TINYINT},
|
|
|
+ #{isCertificated,jdbcType=TINYINT}, #{isLocked,jdbcType=TINYINT}, #{stopDate,jdbcType=TIMESTAMP},
|
|
|
+ #{planInterval,jdbcType=TINYINT}, #{deviceId,jdbcType=VARCHAR}, #{deviceType,jdbcType=TINYINT}
|
|
|
+ )
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <insert id="insertSelective" parameterType="cn.com.ty.lift.manager.library.dao.entity.LiftExtension" >
|
|
|
+ insert into lift_extension
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
+ <if test="id != null" >
|
|
|
+ id,
|
|
|
+ </if>
|
|
|
+ <if test="mtCompanyId != null" >
|
|
|
+ mt_company_id,
|
|
|
+ </if>
|
|
|
+ <if test="projectId != null" >
|
|
|
+ project_id,
|
|
|
+ </if>
|
|
|
+ <if test="workerId != null" >
|
|
|
+ worker_id,
|
|
|
+ </if>
|
|
|
+ <if test="firstTime != null" >
|
|
|
+ first_time,
|
|
|
+ </if>
|
|
|
+ <if test="outServiceDate != null" >
|
|
|
+ out_service_date,
|
|
|
+ </if>
|
|
|
+ <if test="annualInspectionDate != null" >
|
|
|
+ annual_inspection_date,
|
|
|
+ </if>
|
|
|
+ <if test="areaCode != null" >
|
|
|
+ area_code,
|
|
|
+ </if>
|
|
|
+ <if test="liftStatus != null" >
|
|
|
+ lift_status,
|
|
|
+ </if>
|
|
|
+ <if test="isCertificated != null" >
|
|
|
+ is_certificated,
|
|
|
+ </if>
|
|
|
+ <if test="isLocked != null" >
|
|
|
+ is_locked,
|
|
|
+ </if>
|
|
|
+ <if test="stopDate != null" >
|
|
|
+ stop_date,
|
|
|
+ </if>
|
|
|
+ <if test="planInterval != null" >
|
|
|
+ plan_interval,
|
|
|
+ </if>
|
|
|
+ <if test="deviceId != null" >
|
|
|
+ device_id,
|
|
|
+ </if>
|
|
|
+ <if test="deviceType != null" >
|
|
|
+ device_type,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
+ <if test="id != null" >
|
|
|
+ #{id,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="mtCompanyId != null" >
|
|
|
+ #{mtCompanyId,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="projectId != null" >
|
|
|
+ #{projectId,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="workerId != null" >
|
|
|
+ #{workerId,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="firstTime != null" >
|
|
|
+ #{firstTime,jdbcType=DATE},
|
|
|
+ </if>
|
|
|
+ <if test="outServiceDate != null" >
|
|
|
+ #{outServiceDate,jdbcType=DATE},
|
|
|
+ </if>
|
|
|
+ <if test="annualInspectionDate != null" >
|
|
|
+ #{annualInspectionDate,jdbcType=DATE},
|
|
|
+ </if>
|
|
|
+ <if test="areaCode != null" >
|
|
|
+ #{areaCode,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
+ <if test="liftStatus != null" >
|
|
|
+ #{liftStatus,jdbcType=TINYINT},
|
|
|
+ </if>
|
|
|
+ <if test="isCertificated != null" >
|
|
|
+ #{isCertificated,jdbcType=TINYINT},
|
|
|
+ </if>
|
|
|
+ <if test="isLocked != null" >
|
|
|
+ #{isLocked,jdbcType=TINYINT},
|
|
|
+ </if>
|
|
|
+ <if test="stopDate != null" >
|
|
|
+ #{stopDate,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="planInterval != null" >
|
|
|
+ #{planInterval,jdbcType=TINYINT},
|
|
|
+ </if>
|
|
|
+ <if test="deviceId != null" >
|
|
|
+ #{deviceId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="deviceType != null" >
|
|
|
+ #{deviceType,jdbcType=TINYINT},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="cn.com.ty.lift.manager.library.dao.entity.LiftExtension" >
|
|
|
+ update lift_extension
|
|
|
+ <set >
|
|
|
+ <if test="mtCompanyId != null" >
|
|
|
+ mt_company_id = #{mtCompanyId,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="projectId != null" >
|
|
|
+ project_id = #{projectId,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="workerId != null" >
|
|
|
+ worker_id = #{workerId,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="firstTime != null" >
|
|
|
+ first_time = #{firstTime,jdbcType=DATE},
|
|
|
+ </if>
|
|
|
+ <if test="outServiceDate != null" >
|
|
|
+ out_service_date = #{outServiceDate,jdbcType=DATE},
|
|
|
+ </if>
|
|
|
+ <if test="annualInspectionDate != null" >
|
|
|
+ annual_inspection_date = #{annualInspectionDate,jdbcType=DATE},
|
|
|
+ </if>
|
|
|
+ <if test="areaCode != null" >
|
|
|
+ area_code = #{areaCode,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
+ <if test="liftStatus != null" >
|
|
|
+ lift_status = #{liftStatus,jdbcType=TINYINT},
|
|
|
+ </if>
|
|
|
+ <if test="isCertificated != null" >
|
|
|
+ is_certificated = #{isCertificated,jdbcType=TINYINT},
|
|
|
+ </if>
|
|
|
+ <if test="isLocked != null" >
|
|
|
+ is_locked = #{isLocked,jdbcType=TINYINT},
|
|
|
+ </if>
|
|
|
+ <if test="stopDate != null" >
|
|
|
+ stop_date = #{stopDate,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="planInterval != null" >
|
|
|
+ plan_interval = #{planInterval,jdbcType=TINYINT},
|
|
|
+ </if>
|
|
|
+ <if test="deviceId != null" >
|
|
|
+ device_id = #{deviceId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="deviceType != null" >
|
|
|
+ device_type = #{deviceType,jdbcType=TINYINT},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <update id="updateByPrimaryKey" parameterType="cn.com.ty.lift.manager.library.dao.entity.LiftExtension" >
|
|
|
+ update lift_extension
|
|
|
+ set mt_company_id = #{mtCompanyId,jdbcType=BIGINT},
|
|
|
+ project_id = #{projectId,jdbcType=BIGINT},
|
|
|
+ worker_id = #{workerId,jdbcType=BIGINT},
|
|
|
+ first_time = #{firstTime,jdbcType=DATE},
|
|
|
+ out_service_date = #{outServiceDate,jdbcType=DATE},
|
|
|
+ annual_inspection_date = #{annualInspectionDate,jdbcType=DATE},
|
|
|
+ area_code = #{areaCode,jdbcType=CHAR},
|
|
|
+ lift_status = #{liftStatus,jdbcType=TINYINT},
|
|
|
+ is_certificated = #{isCertificated,jdbcType=TINYINT},
|
|
|
+ is_locked = #{isLocked,jdbcType=TINYINT},
|
|
|
+ stop_date = #{stopDate,jdbcType=TIMESTAMP},
|
|
|
+ plan_interval = #{planInterval,jdbcType=TINYINT},
|
|
|
+ device_id = #{deviceId,jdbcType=VARCHAR},
|
|
|
+ device_type = #{deviceType,jdbcType=TINYINT}
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
+ </update>
|
|
|
+
|
|
|
+</mapper>
|