1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?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.fjhx.flow.mapper.FlowApplycheckMapper">
- <!-- 通用查询映射结果 -->
- <resultMap id="flowApplycheckResultMap" type="com.fjhx.flow.entity.FlowApplycheck">
- <id column="ID" property="id"/>
- <result column="is_delete" property="isDelete"/>
- <result column="CreatedTime" property="createdTime"/>
- <result column="UpdatedTime" property="updatedTime"/>
- <result column="flow_id" property="flowId"/>
- <result column="node_id" property="nodeId"/>
- <result column="pre_node_id" property="preNodeId"/>
- <result column="next_node_id" property="nextNodeId"/>
- <result column="check_user_id" property="checkUserId"/>
- <result column="check_state" property="checkState"/>
- <result column="check_time" property="checkTime"/>
- <result column="suggestions" property="suggestions"/>
- <result column="link_id" property="linkId"/>
- <result column="approval_item" property="approvalItem"/>
- </resultMap>
- <select id="getTaskList" resultMap="flowApplycheckResultMap">
- SELECT
- t1.*,
- t2.flow_name AS flowName,
- t3.node_name AS nodeName,
- t4.`name` AS userName
- FROM
- act_flow_applycheck t1
- LEFT JOIN act_flow t2 ON t1.flow_id = t2.ID
- LEFT JOIN act_flow_node t3 ON t1.node_id = t3.id
- LEFT JOIN blade_user t4 ON t1.check_user_id = t4.id
- <include refid="list_condition"/>
- ORDER BY t1.CreatedTime DESC
- <include refid="sql_limit"/>
- </select>
- <select id="getTaskListCount" resultType="java.lang.Integer">
- SELECT
- count (1)
- FROM
- act_flow_applycheck t1
- LEFT JOIN act_flow t2 ON t1.flow_id = t2.ID
- LEFT JOIN act_flow_node t3 ON t1.node_id = t3.id
- LEFT JOIN blade_user t4 ON t1.check_user_id = t4.id
- <include refid="list_condition"/>
- </select>
- <!-- AND t3.role_key = #{}-->
- <sql id="list_condition">
- <where>
- t1.check_state = 1
- </where>
- </sql>
- <sql id="sql_limit">
- <if test="start != null and end != null">
- LIMIT #{start},#{end}
- </if>
- </sql>
- </mapper>
|