FlowApplycheckMapper.xml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.fjhx.flow.mapper.FlowApplycheckMapper">
  4. <!-- 通用查询映射结果 -->
  5. <resultMap id="flowApplycheckResultMap" type="com.fjhx.flow.entity.FlowApplycheck">
  6. <id column="ID" property="id"/>
  7. <result column="is_delete" property="isDelete"/>
  8. <result column="CreatedTime" property="createdTime"/>
  9. <result column="UpdatedTime" property="updatedTime"/>
  10. <result column="flow_id" property="flowId"/>
  11. <result column="node_id" property="nodeId"/>
  12. <result column="pre_node_id" property="preNodeId"/>
  13. <result column="next_node_id" property="nextNodeId"/>
  14. <result column="check_user_id" property="checkUserId"/>
  15. <result column="check_state" property="checkState"/>
  16. <result column="check_time" property="checkTime"/>
  17. <result column="suggestions" property="suggestions"/>
  18. <result column="link_id" property="linkId"/>
  19. <result column="approval_item" property="approvalItem"/>
  20. </resultMap>
  21. <select id="getTaskList" resultMap="flowApplycheckResultMap">
  22. SELECT
  23. t1.*,
  24. t2.flow_name AS flowName,
  25. t3.node_name AS nodeName,
  26. t4.`name` AS userName
  27. FROM
  28. act_flow_applycheck t1
  29. LEFT JOIN act_flow t2 ON t1.flow_id = t2.ID
  30. LEFT JOIN act_flow_node t3 ON t1.node_id = t3.id
  31. LEFT JOIN blade_user t4 ON t1.check_user_id = t4.id
  32. <include refid="list_condition"/>
  33. ORDER BY t1.CreatedTime DESC
  34. <include refid="sql_limit"/>
  35. </select>
  36. <select id="getTaskListCount" resultType="java.lang.Integer">
  37. SELECT
  38. count (1)
  39. FROM
  40. act_flow_applycheck t1
  41. LEFT JOIN act_flow t2 ON t1.flow_id = t2.ID
  42. LEFT JOIN act_flow_node t3 ON t1.node_id = t3.id
  43. LEFT JOIN blade_user t4 ON t1.check_user_id = t4.id
  44. <include refid="list_condition"/>
  45. </select>
  46. <!-- AND t3.role_key = #{}-->
  47. <sql id="list_condition">
  48. <where>
  49. t1.check_state = 1
  50. </where>
  51. </sql>
  52. <sql id="sql_limit">
  53. <if test="start != null and end != null">
  54. LIMIT #{start},#{end}
  55. </if>
  56. </sql>
  57. </mapper>