<?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="com.tourism.common.flow.dao.FlowMessageIdentityOperationMapper">
    <resultMap id="BaseResultMap" type="com.tourism.common.flow.model.FlowMessageIdentityOperation">
        <id column="id" jdbcType="BIGINT" property="id"/>
        <result column="message_id" jdbcType="BIGINT" property="messageId"/>
        <result column="login_name" jdbcType="VARCHAR" property="loginName"/>
        <result column="operation_type" jdbcType="INTEGER" property="operationType"/>
        <result column="operation_time" jdbcType="TIMESTAMP" property="operationTime"/>
    </resultMap>

    <delete id="deleteByProcessInstanceId">
        DELETE FROM zz_flow_msg_identity_operation a
        WHERE EXISTS (SELECT * FROM zz_flow_message b
            WHERE a.message_id = b.message_id AND b.process_instance_id = #{processInstanceId})
    </delete>
</mapper>
