SopInstNodeMapper.xml
3 KB
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
<?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.com.glsx.process.modules.mapper.SopInstNodeMapper">
<resultMap id="BaseResultMap" type="cn.com.glsx.process.modules.entity.SopInstNode">
<!-- WARNING - @mbg.generated -->
<id column="inst_node_id" jdbcType="INTEGER" property="instNodeId" />
<result column="inst_id" jdbcType="VARCHAR" property="instId" />
<result column="node_id" jdbcType="INTEGER" property="nodeId" />
<result column="node_proto_id" jdbcType="INTEGER" property="nodeProtoId" />
<result column="node_name" jdbcType="VARCHAR" property="nodeName" />
<result column="node_type" jdbcType="VARCHAR" property="nodeType" />
<result column="node_label" jdbcType="VARCHAR" property="nodeLabel" />
<result column="node_key" jdbcType="VARCHAR" property="nodeKey" />
<result column="node_show" jdbcType="VARCHAR" property="nodeShow" />
<result column="node_param" jdbcType="VARCHAR" property="nodeParam" />
<result column="node_content" jdbcType="VARCHAR" property="nodeContent" />
<result column="node_visible" jdbcType="TINYINT" property="nodeVisible" />
<result column="node_skip" jdbcType="TINYINT" property="nodeSkip" />
<result column="node_cron" jdbcType="VARCHAR" property="nodeCron" />
<result column="node_expire_cron" jdbcType="VARCHAR" property="nodeExpireCron" />
<result column="node_status" jdbcType="INTEGER" property="nodeStatus" />
<result column="daily_limit" jdbcType="INTEGER" property="dailyLimit" />
<result column="daily_count" jdbcType="INTEGER" property="dailyCount" />
<result column="daily_expire" jdbcType="TIMESTAMP" property="dailyExpire" />
</resultMap>
<sql id="Base_Column_List">
<!-- WARNING - @mbg.generated -->
inst_node_id, inst_id, node_id, node_proto_id, node_name, node_type, node_label, node_key, node_show,
node_param, node_content, node_visible, node_skip, node_cron, node_expire_cron, node_status, daily_limit, daily_count, daily_expire
</sql>
<select id="findByInstId" resultMap="BaseResultMap" parameterType="java.lang.String">
SELECT
node_id, node_proto_id, node_name,node_type
FROM sop_inst_node WHERE inst_id=#{instId}
</select>
<select id="findPageListByInstId"
resultType="cn.com.glsx.process.modules.model.task.SopTaskDTO">
select inst_id as instId, node_id as nodeId, node_proto_id as nodeProtoId, node_param as nodeParam from sop_inst_node where inst_id=#{instId} and node_param!='' and node_param->'$.taskType' is not null
</select>
<update id="resetInstNodeDailyCount">
update sop_inst_node set daily_count=0 where inst_id=#{instId}
</update>
<update id="updateNodeParamById">
update sop_inst_node set node_param = CAST(#{nodeParam, typeHandler=cn.com.glsx.process.modules.handler.JsonTypeHandler} AS JSON) where inst_node_id = #{instNodeId}
</update>
<update id="updateNodeContentById">
update sop_inst_node set node_content = CAST(#{nodeContent} AS JSON) where inst_node_id = #{instNodeId}
</update>
</mapper>