| <?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.dy.pmsGlobal.daoSta.StaRepairInfoMapper"> | 
|   | 
|     <resultMap id="BaseResultMap" type="com.dy.pmsGlobal.pojoSta.StaRepairInfo"> | 
|             <id property="id" column="id" jdbcType="BIGINT"/> | 
|             <result property="deviceNo" column="device_no" jdbcType="VARCHAR"/> | 
|             <result property="workId" column="work_id" jdbcType="BIGINT"/> | 
|             <result property="fromNode" column="from_node" jdbcType="BIGINT"/> | 
|             <result property="repairReason" column="repair_reason" jdbcType="VARCHAR"/> | 
|             <result property="repairBy" column="repair_by" jdbcType="BIGINT"/> | 
|             <result property="repairTime" column="repair_time" jdbcType="TIMESTAMP"/> | 
|     </resultMap> | 
|   | 
|     <sql id="Base_Column_List"> | 
|         id,device_no,work_id, | 
|         from_node,repair_reason,repair_by, | 
|         repair_time | 
|     </sql> | 
|   | 
|     <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> | 
|         select | 
|         <include refid="Base_Column_List" /> | 
|         from sta_repair_info | 
|         where  id = #{id,jdbcType=BIGINT}  | 
|     </select> | 
|     <select id="selectByDeviceNo" resultMap="BaseResultMap"> | 
|         select | 
|         <include refid="Base_Column_List" /> | 
|         from sta_repair_info | 
|         where  device_no = #{deviceNo,jdbcType=VARCHAR} | 
|     </select> | 
|     <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> | 
|         delete from sta_repair_info | 
|         where  id = #{id,jdbcType=BIGINT}  | 
|     </delete> | 
|     <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoSta.StaRepairInfo" useGeneratedKeys="true"> | 
|         insert into sta_repair_info | 
|         ( id,device_no,work_id | 
|         ,from_node,repair_reason,repair_by | 
|         ,repair_time) | 
|         values (#{id,jdbcType=BIGINT},#{deviceNo,jdbcType=VARCHAR},#{workId,jdbcType=BIGINT} | 
|         ,#{fromNode,jdbcType=BIGINT},#{repairReason,jdbcType=VARCHAR},#{repairBy,jdbcType=BIGINT} | 
|         ,#{repairTime,jdbcType=TIMESTAMP}) | 
|     </insert> | 
|     <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoSta.StaRepairInfo" useGeneratedKeys="true"> | 
|         insert into sta_repair_info | 
|         <trim prefix="(" suffix=")" suffixOverrides=","> | 
|                 <if test="id != null">id,</if> | 
|                 <if test="deviceNo != null and deviceNo !=''">device_no,</if> | 
|                 <if test="workId != null">work_id,</if> | 
|                 <if test="fromNode != null">from_node,</if> | 
|                 <if test="repairReason != null and repairReason !=''">repair_reason,</if> | 
|                 <if test="repairBy != null">repair_by,</if> | 
|                 <if test="repairTime != null">repair_time,</if> | 
|         </trim> | 
|         <trim prefix="values (" suffix=")" suffixOverrides=","> | 
|                 <if test="id != null">#{id,jdbcType=BIGINT},</if> | 
|                 <if test="deviceNo != null and deviceNo !=''">#{deviceNo,jdbcType=VARCHAR},</if> | 
|                 <if test="workId != null">#{workId,jdbcType=BIGINT},</if> | 
|                 <if test="fromNode != null">#{fromNode,jdbcType=BIGINT},</if> | 
|                 <if test="repairReason != null and repairReason !=''">#{repairReason,jdbcType=VARCHAR},</if> | 
|                 <if test="repairBy != null">#{repairBy,jdbcType=BIGINT},</if> | 
|                 <if test="repairTime != null">#{repairTime,jdbcType=TIMESTAMP},</if> | 
|         </trim> | 
|     </insert> | 
|     <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoSta.StaRepairInfo"> | 
|         update sta_repair_info | 
|         <set> | 
|                 <if test="deviceNo != null and deviceNo !=''"> | 
|                     device_no = #{deviceNo,jdbcType=VARCHAR}, | 
|                 </if> | 
|                 <if test="workId != null"> | 
|                     work_id = #{workId,jdbcType=BIGINT}, | 
|                 </if> | 
|                 <if test="fromNode != null"> | 
|                     from_node = #{fromNode,jdbcType=BIGINT}, | 
|                 </if> | 
|                 <if test="repairReason != null and repairReason !=''"> | 
|                     repair_reason = #{repairReason,jdbcType=VARCHAR}, | 
|                 </if> | 
|                 <if test="repairBy != null"> | 
|                     repair_by = #{repairBy,jdbcType=BIGINT}, | 
|                 </if> | 
|                 <if test="repairTime != null and repairTime !=''"> | 
|                     repair_time = #{repairTime,jdbcType=TIMESTAMP}, | 
|                 </if> | 
|         </set> | 
|         where   id = #{id,jdbcType=BIGINT}  | 
|     </update> | 
|     <update id="updateByPrimaryKey" parameterType="com.dy.pmsGlobal.pojoSta.StaRepairInfo"> | 
|         update sta_repair_info | 
|         set  | 
|             device_no =  #{deviceNo,jdbcType=VARCHAR}, | 
|             work_id =  #{workId,jdbcType=BIGINT}, | 
|             from_node =  #{fromNode,jdbcType=BIGINT}, | 
|             repair_reason =  #{repairReason,jdbcType=VARCHAR}, | 
|             repair_by =  #{repairBy,jdbcType=BIGINT}, | 
|             repair_time =  #{repairTime,jdbcType=TIMESTAMP} | 
|         where   id = #{id,jdbcType=BIGINT}  | 
|     </update> | 
| </mapper> |