后台服务
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

58 righe
2.2 KiB

  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.iformall.mapper.WxFlowConfigMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxFlowConfig">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="tenant_id" property="tenantId" />
  7. <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" />
  8. <result column="parent_id" property="parentId" />
  9. <result column="name" property="name" />
  10. <result column="type" property="type" />
  11. <result column="sort" property="sort" />
  12. <result column="model_id" property="modelId" />
  13. <result column="create_date" property="createDate" />
  14. <result column="update_date" property="updateDate" />
  15. <collection fetchType="eager" property="childs" ofType="com.iformall.domain.po.WxFlowConfig" column="id" select="findChildList"/>
  16. </resultMap>
  17. <sql id="dynamicWhereConditions">
  18. where 1=1
  19. <if test=" null != tenantId and '' != tenantId">
  20. and `tenant_id` = #{tenantId}
  21. </if>
  22. <if test=" null != parentTenantId and '' != parentTenantId">
  23. and `parent_tenant_id` = #{parentTenantId}
  24. </if>
  25. <if test=" null != parentId">
  26. and `parent_id` = #{parentId}
  27. </if>
  28. <if test=" null != id "> and `id` = #{id} </if>
  29. <if test=" null != modelId"> and `model_id` = #{modelId} </if>
  30. <if test=" null != name and '' != name "> and `name` like concat('%', #{name},'%') </if>
  31. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  32. <if test=" null == sortColumns"> order by sort asc </if>
  33. </sql>
  34. <select id="findList" parameterType="com.iformall.domain.po.WxFlowConfig" resultMap="BaseResultMap">
  35. select * from wx_flow_config
  36. <include refid="dynamicWhereConditions" />
  37. </select>
  38. <select id="findChildList" resultType="com.iformall.domain.po.WxFlowConfig">
  39. SELECT * FROM wx_flow_config WHERE parent_id = #{id} ORDER BY sort ASC
  40. </select>
  41. <update id="updateTime" parameterType="com.iformall.domain.po.WxFlowConfig">
  42. update wx_flow_config set update_date = now() where model_id = #{modelId}
  43. </update>
  44. <select id="wxFlowConfigInit" parameterType="String">
  45. ${initSql}
  46. </select>
  47. </mapper>