|  |  |  | 
|---|
|  |  |  | <select id="getBindsByIntakeId" resultType="java.util.Map"> | 
|---|
|  |  |  | SELECT | 
|---|
|  |  |  | user.name AS userName, | 
|---|
|  |  |  | con.code AS controllerCode, | 
|---|
|  |  |  | <!--con.code AS controllerCode,--> | 
|---|
|  |  |  | con.rtuAddr, | 
|---|
|  |  |  | (CASE | 
|---|
|  |  |  | WHEN ic.operateType = 1 THEN "绑定" | 
|---|
|  |  |  | WHEN ic.operateType = 2 THEN "解绑" | 
|---|
|  |  |  | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | ORDER BY ic.operateDt DESC | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  | <!--根据取水口编号修改绑定记录列表--> | 
|---|
|  |  |  | <update id="updateByIntakeSelective"> | 
|---|
|  |  |  | update pr_intake_controller | 
|---|
|  |  |  | <set> | 
|---|
|  |  |  | <if test="controllerid != null"> | 
|---|
|  |  |  | controllerId = #{controllerid,jdbcType=BIGINT}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="operatetype != null"> | 
|---|
|  |  |  | operateType = #{operatetype,jdbcType=TINYINT}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="remarks != null"> | 
|---|
|  |  |  | remarks = #{remarks,jdbcType=VARCHAR}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="operator != null"> | 
|---|
|  |  |  | `operator` = #{operator,jdbcType=BIGINT}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="operatedt != null"> | 
|---|
|  |  |  | operateDt = #{operatedt,jdbcType=TIMESTAMP}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </set> | 
|---|
|  |  |  | where intakeId = #{intakeid,jdbcType=BIGINT} | 
|---|
|  |  |  | </update> | 
|---|
|  |  |  | </mapper> | 
|---|