<?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="cn.autoform.web.mapper.process.ProcessStateMapper">
|
|
<resultMap type="cn.autoform.bean.ProcessState" id="stateResult">
|
<result property="processState" column="processState"/>
|
<result property="processLog" column="processLog"/>
|
<result property="processTask" column="processTask"/>
|
<result property="processUser" column="processUser"/>
|
<!-- <result property="orderStatus" column="orderStatus"/>
|
<result property="orderCode" column="orderCode"/> -->
|
</resultMap>
|
|
<sql id="myCat">
|
/*!mycat:sql= select tenantid from FORMDATAMANAGER WHERE TENANTID = '${tenantId}' AND FORMID = '${formId}' */
|
</sql>
|
|
<update id ="updateState" parameterType="cn.autoform.bean.ProcessState">
|
<include refid="myCat"/>
|
update formdata_${tenantId}_${formId}
|
<trim prefix="set" suffixOverrides="," >
|
<if test="processState !=null">
|
processState = #{processState},
|
</if>
|
<if test="processLog !=null">
|
processLog = #{processLog},
|
</if>
|
<if test="processTask !=null">
|
processTask = #{processTask},
|
</if>
|
<if test="processUser !=null">
|
processUser = #{processUser}
|
</if>
|
</trim>
|
where dataRowNum = #{dataRowNum}
|
|
</update>
|
|
<select id="selectState" resultMap="stateResult" parameterType="cn.autoform.bean.ProcessState">
|
<include refid="myCat"/>
|
SELECT
|
processState,
|
processLog,
|
processTask,
|
processUser
|
FROM
|
formdata_${tenantId}_${formId}
|
WHERE
|
dataRowNum = #{dataRowNum}
|
</select>
|
|
</mapper>
|