META-INF.mybatis.ProcessInstanceRepositoryMapper.xml Maven / Gradle / Ivy
<?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>