MdAppFlowMapper.xml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.interfaces.mapper.MdAppFlowMapper">
  6. <resultMap type="com.ruoyi.interfaces.domain.MdAppFlow" id="MdAppFlowResult">
  7. <result property="flowId" column="FLOW_ID" />
  8. <result property="appId" column="APP_ID" />
  9. <result property="flowName" column="FLOW_NAME" />
  10. <result property="flowGraph" column="FLOW_GRAPH" />
  11. <result property="flowType" column="FLOW_TYPE" />
  12. <result property="flowNote" column="FLOW_NOTE" />
  13. <result property="flowStatus" column="FLOW_STATUS" />
  14. <result property="flowSort" column="FLOW_SORT" />
  15. <result property="createBy" column="CREATE_BY" />
  16. <result property="createTime" column="CREATE_TIME" />
  17. <result property="updateBy" column="UPDATE_BY" />
  18. <result property="updateTime" column="UPDATE_TIME" />
  19. </resultMap>
  20. <sql id="selectMdAppFlowVo">
  21. select FLOW_ID, APP_ID, FLOW_NAME, FLOW_GRAPH, FLOW_TYPE, FLOW_NOTE, FLOW_STATUS, FLOW_SORT, CREATE_BY, CREATE_TIME, UPDATE_BY, UPDATE_TIME from md_app_flow
  22. </sql>
  23. <select id="selectMdAppFlowList" parameterType="com.ruoyi.interfaces.domain.MdAppFlow" resultMap="MdAppFlowResult">
  24. <include refid="selectMdAppFlowVo"/>
  25. <where>
  26. <if test="appId != null and appId != ''"> and APP_ID = #{appId}</if>
  27. <if test="flowName != null and flowName != ''"> and FLOW_NAME like concat('%', #{flowName}, '%')</if>
  28. <if test="flowGraph != null and flowGraph != ''"> and FLOW_GRAPH = #{flowGraph}</if>
  29. <if test="flowType != null and flowType != ''"> and FLOW_TYPE = #{flowType}</if>
  30. <if test="flowNote != null and flowNote != ''"> and FLOW_NOTE = #{flowNote}</if>
  31. <if test="flowStatus != null "> and FLOW_STATUS = #{flowStatus}</if>
  32. <if test="flowSort != null "> and FLOW_SORT = #{flowSort}</if>
  33. <if test="createBy != null and createBy != ''"> and CREATE_BY = #{createBy}</if>
  34. <if test="createTime != null "> and CREATE_TIME = #{createTime}</if>
  35. <if test="updateBy != null and updateBy != ''"> and UPDATE_BY = #{updateBy}</if>
  36. <if test="updateTime != null "> and UPDATE_TIME = #{updateTime}</if>
  37. </where>
  38. </select>
  39. <select id="selectMdAppFlowByFlowId" parameterType="Long" resultMap="MdAppFlowResult">
  40. <include refid="selectMdAppFlowVo"/>
  41. where FLOW_ID = #{flowId}
  42. </select>
  43. <insert id="insertMdAppFlow" parameterType="com.ruoyi.interfaces.domain.MdAppFlow" useGeneratedKeys="true" keyProperty="flowId">
  44. insert into md_app_flow
  45. <trim prefix="(" suffix=")" suffixOverrides=",">
  46. <if test="appId != null and appId != ''">APP_ID,</if>
  47. <if test="flowName != null and flowName != ''">FLOW_NAME,</if>
  48. <if test="flowGraph != null">FLOW_GRAPH,</if>
  49. <if test="flowType != null">FLOW_TYPE,</if>
  50. <if test="flowNote != null">FLOW_NOTE,</if>
  51. <if test="flowStatus != null">FLOW_STATUS,</if>
  52. <if test="flowSort != null">FLOW_SORT,</if>
  53. <if test="createBy != null">CREATE_BY,</if>
  54. <if test="createTime != null">CREATE_TIME,</if>
  55. <if test="updateBy != null">UPDATE_BY,</if>
  56. <if test="updateTime != null">UPDATE_TIME,</if>
  57. </trim>
  58. <trim prefix="values (" suffix=")" suffixOverrides=",">
  59. <if test="appId != null and appId != ''">#{appId},</if>
  60. <if test="flowName != null and flowName != ''">#{flowName},</if>
  61. <if test="flowGraph != null">#{flowGraph},</if>
  62. <if test="flowType != null">#{flowType},</if>
  63. <if test="flowNote != null">#{flowNote},</if>
  64. <if test="flowStatus != null">#{flowStatus},</if>
  65. <if test="flowSort != null">#{flowSort},</if>
  66. <if test="createBy != null">#{createBy},</if>
  67. <if test="createTime != null">#{createTime},</if>
  68. <if test="updateBy != null">#{updateBy},</if>
  69. <if test="updateTime != null">#{updateTime},</if>
  70. </trim>
  71. </insert>
  72. <update id="updateMdAppFlow" parameterType="com.ruoyi.interfaces.domain.MdAppFlow">
  73. update md_app_flow
  74. <trim prefix="SET" suffixOverrides=",">
  75. <if test="appId != null and appId != ''">APP_ID = #{appId},</if>
  76. <if test="flowName != null and flowName != ''">FLOW_NAME = #{flowName},</if>
  77. <if test="flowGraph != null">FLOW_GRAPH = #{flowGraph},</if>
  78. <if test="flowType != null">FLOW_TYPE = #{flowType},</if>
  79. <if test="flowNote != null">FLOW_NOTE = #{flowNote},</if>
  80. <if test="flowStatus != null">FLOW_STATUS = #{flowStatus},</if>
  81. <if test="flowSort != null">FLOW_SORT = #{flowSort},</if>
  82. <if test="createBy != null">CREATE_BY = #{createBy},</if>
  83. <if test="createTime != null">CREATE_TIME = #{createTime},</if>
  84. <if test="updateBy != null">UPDATE_BY = #{updateBy},</if>
  85. <if test="updateTime != null">UPDATE_TIME = #{updateTime},</if>
  86. </trim>
  87. where FLOW_ID = #{flowId}
  88. </update>
  89. <delete id="deleteMdAppFlowByFlowId" parameterType="Long">
  90. delete from md_app_flow where FLOW_ID = #{flowId}
  91. </delete>
  92. <delete id="deleteMdAppFlowByFlowIds" parameterType="String">
  93. delete from md_app_flow where FLOW_ID in
  94. <foreach item="flowId" collection="array" open="(" separator="," close=")">
  95. #{flowId}
  96. </foreach>
  97. </delete>
  98. </mapper>