All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.mybatis.ProcessInstanceRepositoryMapper.xml Maven / Gradle / Ivy

There is a newer version: 2.7.5-RELEASE
Show newest version
<?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="lodsve.workflow.repository.ProcessInstanceRepository">
    <sql id="processInstanceSaveColumns">
        id, flow_id, flow_title, resource_id, process_title, start_user_id, start_user_name, current_node_id, current_node_title, start_time
    </sql>

    <insert id="save" parameterType="lodsve.workflow.domain.ProcessInstance">
        INSERT INTO t_process_instance (
        <include refid="processInstanceSaveColumns"/>
        )
        VALUES
        (
        #{id},
        #{flowId},
        #{flowTitle},
        #{resourceId},
        #{processTitle},
        #{startUserId},
        #{startUserName},
        #{currentNodeId},
        #{currentNodeTitle},
        #{startTime}
        )
    </insert>

    <select id="findOne" resultMap="lodsve.workflow.domain.ProcessInstance">
        SELECT <include refid="processInstanceSaveColumns"/>
        FROM t_process_instance tpi
        WHERE tpi.id = #{id}
    </select>

    <update id="updateProcessInstance">
        UPDATE t_process_instance
        SET current_node_id = #{currentNodeId}, current_node_title = #{currentNodeTitle}
        WHERE id = #{id}
    </update>
</mapper>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy