<?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>
|