|  |  | 
 |  |  |       operate_time = #{operateTime,jdbcType=TIMESTAMP} | 
 |  |  |     where id = #{id,jdbcType=BIGINT} | 
 |  |  |   </update> | 
 |  |  |  | 
 |  |  |   <!--根据农户编号获取灌溉单元数量--> | 
 |  |  |   <select id="getUnitCountByClientId" resultType="java.lang.Long"> | 
 |  |  |     SELECT | 
 |  |  |         count(*) | 
 |  |  |     FROM ir_irrigate_unit uni | 
 |  |  |         INNER JOIN pr_intake inta ON inta.id = uni.intake_id | 
 |  |  |         INNER JOIN ir_unit_client uc ON uc.unit_id = uni.id | 
 |  |  |     WHERE uni.deleted = 0 AND uc.client_id = #{clientId} | 
 |  |  |   </select> | 
 |  |  |  | 
 |  |  |   <!--根据农户编号获取灌溉单元列表--> | 
 |  |  |   <select id="getUnitsByClientId" resultType="com.dy.pipIrrGlobal.voIr.VoUnitSimple"> | 
 |  |  |     SELECT | 
 |  |  |       uni.id AS unitId, | 
 |  |  |       inta.`name` AS intakeNo, | 
 |  |  |       uni.remarks | 
 |  |  |     FROM ir_irrigate_unit uni | 
 |  |  |            INNER JOIN pr_intake inta ON inta.id = uni.intake_id | 
 |  |  |            INNER JOIN ir_unit_client uc ON uc.unit_id = uni.id | 
 |  |  |     WHERE uni.deleted = 0 AND uc.client_id = #{clientId} | 
 |  |  |     ORDER BY uni.id | 
 |  |  |     <trim prefix="limit "> | 
 |  |  |       <if test="start != null and count != null"> | 
 |  |  |         #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER} | 
 |  |  |       </if> | 
 |  |  |     </trim> | 
 |  |  |   </select> | 
 |  |  | </mapper> |