多单位版国产化地质资料管理系统
zhai
2025-12-13 fc0cc9fff4b4cbdc7cbb52b4a96c947530fcbba0
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
<?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.ruili.wcp.dao.management.FlowDefinitionFavoriteMapper">
    <!-- 带流程分类、流程名称返回结果 -->
    <resultMap id="flowCategoryMap" type="com.ruili.wcp.data.vo.management.FlowCategoryVO">
        <result column="flow_category_id" property="flowCategoryId"/>
        <result column="flow_category_name" property="flowCategoryName"/>
    </resultMap>
 
    <resultMap id="flowDefinitionMap" type="com.ruili.wcp.data.vo.management.FlowDefinitionVO">
        <id column="flow_id" jdbcType="BIGINT" property="flowId"/>
        <result column="flow_category_id" property="flowCategoryId"/>
        <result column="flow_name" property="flowName"/>
        <result column="module_id" property="moduleId"/>
        <result column="form_id" property="formId"/>
        <result column="flow_state" property="flowState"/>
        <result column="flow_type" property="flowType"/>
        <result column="enable_permission" property="enablePermission"/>
        <result column="permission_name" property="permissionName"/>
        <result column="flow_icon" property="flowIcon"/>
        <result column="flow_css" property="flowCss"/>
    </resultMap>
 
 
    <select id="getFlowCategory" parameterType="Long" resultMap="flowCategoryMap">
        select c.flow_category_id,
               c.flow_category_name
        from sys_flow_definition_favorite a,
             cnf_flow_category_relation b,
             cnf_flow_category c
        WHERE a.flow_id = b.flow_id
          and b.flow_category_id = c.flow_category_id
          and a.user_id = #{userId}
        group by c.flow_category_id, c.flow_category_name
 
    </select>
 
    <select id="getFlowDefinition" parameterType="Long" resultMap="flowDefinitionMap">
        select c.flow_id,
               c.flow_name,
               c.flow_state,
               c.module_id,
               c.form_id,
               c.flow_type,
               c.enable_permission,
               c.permission_name,
               b.flow_category_id,
               c.flow_icon,
               c.flow_css
        from sys_flow_definition_favorite a,
             cnf_flow_category_relation b,
             cnf_flow_definition c
        WHERE a.flow_id = b.flow_id
          and a.flow_id = c.flow_id
          and a.user_id = #{userId}
          and c.flow_state = 1
 
 
    </select>
</mapper>