id, intakeId, rtuAddr, protocol, protocol_version, findDt, orgTag, addWays, `operator`, operateDt, deleted
  
  
    
    id, rtuAddr, intakeId
  
  
  
    
    delete from pr_controller
    where id = #{id,jdbcType=BIGINT}
  
  
    
    insert into pr_controller (id, intakeId, rtuAddr,
      protocol, protocol_version, findDt, orgTag, addWays,
      `operator`, operateDt, deleted
      )
    values (#{id,jdbcType=BIGINT}, #{intakeId,jdbcType=BIGINT}, #{rtuAddr,jdbcType=VARCHAR},
      #{protocol,jdbcType=VARCHAR}, #{protocolVersion,jdbcType=INTEGER}, #{findDt,jdbcType=TIMESTAMP}, #{orgTag,jdbcType=VARCHAR},
      #{addWays,jdbcType=TINYINT}, #{operator,jdbcType=BIGINT}, #{operateDt,jdbcType=TIMESTAMP},
      #{deleted,jdbcType=TINYINT}
      )
  
  
    
    insert into pr_controller
    
      
        id,
      
      
        intakeId,
      
      
        rtuAddr,
      
      
        protocol,
      
     
       protocol_version,
      
      
        findDt,
      
      
        orgTag,
      
      
        addWays,
      
      
        `operator`,
      
      
        operateDt,
      
      
        deleted,
      
    
    
      
        #{id,jdbcType=BIGINT},
      
      
        #{intakeId,jdbcType=BIGINT},
      
      
        #{rtuAddr,jdbcType=VARCHAR},
      
      
        #{protocol,jdbcType=VARCHAR},
      
      
        #{protocolVersion,jdbcType=INTEGER},
      
      
        #{findDt,jdbcType=TIMESTAMP},
      
      
        #{orgTag,jdbcType=VARCHAR},
      
      
        #{addWays,jdbcType=TINYINT},
      
      
        #{operator,jdbcType=BIGINT},
      
      
        #{operateDt,jdbcType=TIMESTAMP},
      
      
        #{deleted,jdbcType=TINYINT},
      
    
  
  
    
    update pr_controller
    
      
        intakeId = #{intakeId,jdbcType=BIGINT},
      
      
        rtuAddr = #{rtuAddr,jdbcType=VARCHAR},
      
      
        protocol = #{protocol,jdbcType=VARCHAR},
      
     
        protocol_version = #{protocolVersion,jdbcType=INTEGER},
      
      
        findDt = #{findDt,jdbcType=TIMESTAMP},
      
     
       orgTag = #{orgTag,jdbcType=VARCHAR},
      
      
        addWays = #{addWays,jdbcType=TINYINT},
      
      
        `operator` = #{operator,jdbcType=BIGINT},
      
      
        operateDt = #{operateDt,jdbcType=TIMESTAMP},
      
      
        deleted = #{deleted,jdbcType=TINYINT},
      
    
    where id = #{id,jdbcType=BIGINT}
  
  
    
    update pr_controller
    set intakeId = #{intakeId,jdbcType=BIGINT},
      rtuAddr = #{rtuAddr,jdbcType=VARCHAR},
      protocol = #{protocol,jdbcType=VARCHAR},
      protocol_version = #{protocolVersion,jdbcType=INTEGER},
      findDt = #{findDt,jdbcType=TIMESTAMP},
      orgTag = #{orgTag,jdbcType=VARCHAR},
      addWays = #{addWays,jdbcType=TINYINT},
      `operator` = #{operator,jdbcType=BIGINT},
      operateDt = #{operateDt,jdbcType=TIMESTAMP},
      deleted = #{deleted,jdbcType=TINYINT}
    where id = #{id,jdbcType=BIGINT}
  
  
  
    UPDATE pr_controller SET intakeId = null WHERE id = #{controllerId}
  
  
  
  
  
  
  
  
  
  
  
    UPDATE pr_controller SET deleted = 1 WHERE id = #{controllerId}