8d73e917
陈威
初始化提交
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
<?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.hotent.bpm.persistence.dao.BpmTaskCandidateDao">
<resultMap id="BpmTaskCandidate" type="com.hotent.bpm.persistence.model.DefaultBpmTaskCandidate">
<id property="id" column="id_" jdbcType="VARCHAR"/>
<result property="taskId" column="task_id_" jdbcType="VARCHAR"/>
<result property="type" column="type_" jdbcType="VARCHAR"/>
<result property="executor" column="executor_" jdbcType="VARCHAR"/>
<result property="procInstId" column="proc_inst_id_" jdbcType="VARCHAR"/>
</resultMap>
<select id="queryByTaskId" parameterType="java.lang.String" resultMap="BpmTaskCandidate">
SELECT * FROM bpm_task_candidate
WHERE
task_id_=#{taskId}
</select>
<select id="getByTaskIdExeIdType" resultMap="BpmTaskCandidate">
select * from bpm_task_candidate t where t.task_id_=#{taskId} and executor_=#{executorId} and type_=#{type}
</select>
<delete id="removeByTaskId" parameterType="java.lang.String">
DELETE FROM bpm_task_candidate
WHERE
task_id_=#{taskId}
</delete>
<delete id="delByInstList" >
DELETE FROM bpm_task_candidate
WHERE task_id_ in (select id_ from bpm_task where proc_inst_id_ in
<foreach collection="list" index="index" item="instId" open="(" separator="," close=")">
#{instId}
</foreach>
)
</delete>
<select id="getByInstList" resultMap="BpmTaskCandidate">
select * FROM bpm_task_candidate
WHERE
task_id_ in (select id_ from bpm_task where proc_inst_id_ in
<foreach collection="list" index="index" item="instId" open="(" separator="," close=")">
#{instId}
</foreach>
)
</select>
<update id="updateExecutor" parameterType="java.util.Map">
update bpm_task_candidate set executor_ = #{executor}
where proc_inst_id_ in
<foreach collection="instIds" index="index" item="instId" open="(" separator="," close=")">
#{instId}
</foreach>
and executor_ = #{userId}
</update>
<select id="existByTaskId" resultType="integer" >
select count(1) from bpm_task_candidate where task_id_ = #{taskId}
</select>
</mapper>
|