|  |  | 
 |  |  |     <result column="rtuAddr" jdbcType="VARCHAR" property="rtuAddr" /> | 
 |  |  |     <result column="protocol" jdbcType="VARCHAR" property="protocol" /> | 
 |  |  |     <result column="findDt" jdbcType="TIMESTAMP" property="findDt" /> | 
 |  |  |     <result column="orgTag" jdbcType="VARCHAR" property="orgTag" /> | 
 |  |  |     <result column="addWays" jdbcType="TINYINT" property="addWays" /> | 
 |  |  |     <result column="operator" jdbcType="BIGINT" property="operator" /> | 
 |  |  |     <result column="operateDt" jdbcType="TIMESTAMP" property="operateDt" /> | 
 |  |  | 
 |  |  |  | 
 |  |  |   <sql id="Base_Column_List"> | 
 |  |  |     <!--@mbg.generated--> | 
 |  |  |     id, intakeId, rtuAddr, protocol, findDt, addWays, `operator`, operateDt, deleted | 
 |  |  |     id, intakeId, rtuAddr, protocol, findDt, orgTag, addWays, `operator`, operateDt, deleted | 
 |  |  |   </sql> | 
 |  |  |   <sql id="Part_Column_List"> | 
 |  |  |     <!--@mbg.generated--> | 
 |  |  | 
 |  |  |   <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoPr.PrController"> | 
 |  |  |     <!--@mbg.generated--> | 
 |  |  |     insert into pr_controller (id, intakeId, rtuAddr, | 
 |  |  |       protocol, findDt, addWays, | 
 |  |  |       protocol, findDt, orgTag, addWays, | 
 |  |  |       `operator`, operateDt, deleted | 
 |  |  |       ) | 
 |  |  |     values (#{id,jdbcType=BIGINT}, #{intakeId,jdbcType=BIGINT}, #{rtuAddr,jdbcType=VARCHAR}, | 
 |  |  |       #{protocol,jdbcType=VARCHAR}, #{findDt,jdbcType=TIMESTAMP}, #{addWays,jdbcType=TINYINT}, | 
 |  |  |       #{operator,jdbcType=BIGINT}, #{operateDt,jdbcType=TIMESTAMP}, #{deleted,jdbcType=TINYINT} | 
 |  |  |       #{protocol,jdbcType=VARCHAR}, #{findDt,jdbcType=TIMESTAMP}, #{orgTag,jdbcType=VARCHAR}, | 
 |  |  |       #{addWays,jdbcType=TINYINT}, #{operator,jdbcType=BIGINT}, #{operateDt,jdbcType=TIMESTAMP}, | 
 |  |  |       #{deleted,jdbcType=TINYINT} | 
 |  |  |       ) | 
 |  |  |   </insert> | 
 |  |  |   <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoPr.PrController"> | 
 |  |  | 
 |  |  |       </if> | 
 |  |  |       <if test="findDt != null"> | 
 |  |  |         findDt, | 
 |  |  |       </if> | 
 |  |  |       <if test="orgTag != null"> | 
 |  |  |         orgTag, | 
 |  |  |       </if> | 
 |  |  |       <if test="addWays != null"> | 
 |  |  |         addWays, | 
 |  |  | 
 |  |  |       </if> | 
 |  |  |       <if test="findDt != null"> | 
 |  |  |         #{findDt,jdbcType=TIMESTAMP}, | 
 |  |  |       </if> | 
 |  |  |       <if test="orgTag != null"> | 
 |  |  |         #{orgTag,jdbcType=VARCHAR}, | 
 |  |  |       </if> | 
 |  |  |       <if test="addWays != null"> | 
 |  |  |         #{addWays,jdbcType=TINYINT}, | 
 |  |  | 
 |  |  |       <if test="findDt != null"> | 
 |  |  |         findDt = #{findDt,jdbcType=TIMESTAMP}, | 
 |  |  |       </if> | 
 |  |  |      <if test="orgTag != null"> | 
 |  |  |        orgTag = #{orgTag,jdbcType=VARCHAR}, | 
 |  |  |       </if> | 
 |  |  |       <if test="addWays != null"> | 
 |  |  |         addWays = #{addWays,jdbcType=TINYINT}, | 
 |  |  |       </if> | 
 |  |  | 
 |  |  |       rtuAddr = #{rtuAddr,jdbcType=VARCHAR}, | 
 |  |  |       protocol = #{protocol,jdbcType=VARCHAR}, | 
 |  |  |       findDt = #{findDt,jdbcType=TIMESTAMP}, | 
 |  |  |       orgTag = #{orgTag,jdbcType=VARCHAR}, | 
 |  |  |       addWays = #{addWays,jdbcType=TINYINT}, | 
 |  |  |       `operator` = #{operator,jdbcType=BIGINT}, | 
 |  |  |       operateDt = #{operateDt,jdbcType=TIMESTAMP}, | 
 |  |  | 
 |  |  |   </select> | 
 |  |  |  | 
 |  |  |   <!--根据控制器地址获取控制器列表--> | 
 |  |  |   <select id="getControllersByRtuAddrAndIntakeNotNull" parameterType="java.lang.String" resultMap="PartResultMap"> | 
 |  |  |     SELECT | 
 |  |  |     <include refid="Part_Column_List"> | 
 |  |  |     </include> | 
 |  |  |     FROM pr_controller WHERE deleted = 0 AND intakeId is not null AND rtuAddr=#{rtuAddr,jdbcType=VARCHAR} | 
 |  |  |   <select id="getControllersByRtuAddrAndIntakeNotNull" parameterType="java.lang.String" resultType="com.dy.pipIrrGlobal.pojoPr.PrController"> | 
 |  |  |     SELECT tb.id id, | 
 |  |  |     tb.rtuAddr rtuAddr, | 
 |  |  |     tb.intakeId intakeId, | 
 |  |  |     itb.name intakeName | 
 |  |  |     FROM pr_controller tb | 
 |  |  |     INNER JOIN pr_intake itb on tb.intakeId = itb.id | 
 |  |  |     WHERE tb.deleted = 0 AND tb.intakeId is not null AND tb.rtuAddr=#{rtuAddr,jdbcType=VARCHAR} | 
 |  |  |   </select> | 
 |  |  |  | 
 |  |  |   <!--根据控制器编号逻辑删除控制--> |