All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
META-INF.mybatis.WorkTaskRepositoryMapper.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.WorkTaskRepository">
<sql id="workTaskSaveColumns">
id, flow_id, node_id, resource_id, flow_title, node_title, url_type, task_user_id, task_user_name, result, remark, receive_time
</sql>
<insert id="save" parameterType="lodsve.workflow.domain.WorkTask">
INSERT INTO t_work_task (
<include refid="workTaskSaveColumns"/>
)
VALUES
(
#{id},
#{flowId},
#{nodeId},
#{resourceId},
#{flowTitle},
#{nodeTitle},
#{urlType},
#{taskUserId},
#{taskUserName},
#{result},
#{remark},
#{receiveTime}
)
</insert>
<select id="findUndoTask" resultType="lodsve.workflow.domain.WorkTask">
SELECT
t.*
FROM
t_work_task t
JOIN t_workflow t1 ON t.flow_id = t1.id
WHERE
t.flow_id = #{flowId}
AND t.resource_id = #{resourceId}
AND t.result = '100'
AND t.handle_time IS NULL
AND t1.domain = #{domain}
</select>
<insert id="batchSave" parameterType="List">
INSERT INTO t_work_task (
<include refid="workTaskSaveColumns"/>
)
VALUES
<foreach collection="list" item="task" separator=",">
(#{task.id},
#{task.flowId},
#{task.nodeId},
#{task.resourceId},
#{task.flowTitle},
#{task.nodeTitle},
#{task.urlType},
#{task.taskUserId},
#{task.taskUserName},
#{task.result},
#{task.remark},
#{task.receiveTime})
</foreach>
</insert>
<select id="listUndoTask" resultType="lodsve.workflow.domain.WorkTask">
SELECT * FROM t_work_task WHERE task_user_id = #{userId} AND result = '100' AND handle_time IS NULL
<if test="flowId != null">
AND flow_id = #{flowId}
</if>
<if test="processTitle != null">
AND process_title LIKE CONCAT('%',#{processTitle},'%')
</if>
</select>
<update id="update">
UPDATE t_work_task
SET result = #{result}, remark = #{remark}, handle_time = NOW()
WHERE id = #{id}
</update>
</mapper>