<?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="jnpf.workflow.mapper.ApplyAttendanceRepairMapper" >

    <!-- 批量更新旧打卡结果 -->
    <update id="updateBatchOldResult">
        UPDATE ftb_apply_attendance_repair
        SET F_ClockInResultId = CASE F_Id
        <foreach collection="list" item="item" separator=" ">
            WHEN #{item.applyId} THEN #{item.resultId}
        </foreach>
        END
        WHERE F_Id IN
        <foreach collection="list" item="item" open="(" separator="," close=")">
            #{item.applyId}
        </foreach>
    </update>
</mapper>