后台服务
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 rivejä
2.0 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.WxFlowModelMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxFlowModel">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="tenantId" property="tenantId" />
  7. <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" />
  8. <result column="name" property="name" />
  9. <result column="flow" property="flow" />
  10. <result column="create_user" property="createUser" />
  11. <result column="create_date" property="createDate" />
  12. <result column="update_date" property="updateDate" />
  13. <result column="flow_id" property="flowId" />
  14. </resultMap>
  15. <sql id="dynamicWhereConditions">
  16. where 1 = 1
  17. <if test=" null != tenantId and '' != tenantId">
  18. and `tenant_id` = #{tenantId}
  19. </if>
  20. <if test=" null != parentTenantId and '' != parentTenantId">
  21. and `parent_tenant_id` = #{parentTenantId}
  22. </if>
  23. <if test=" null != id "> and `id` = #{id} </if>
  24. <if test="null != name and '' != name "> and `name` like concat('%', #{name},'%') </if>
  25. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  26. <if test=" null == sortColumns"> order by id desc </if>
  27. </sql>
  28. <select id="findList" parameterType="com.iformall.domain.po.WxFlowModel" resultMap="BaseResultMap">
  29. select * from wx_flow_model
  30. <include refid="dynamicWhereConditions" />
  31. </select>
  32. <select id="getModelBybusiness" parameterType="com.iformall.domain.po.WxFlowModel" resultMap="BaseResultMap">
  33. select m.* from wx_flow_config w,wx_flow_model m
  34. where w.model_id = m.id and w.type = #{flowType}
  35. <if test=" null != tenantId and '' != tenantId">
  36. and w.tenant_id = #{tenantId}
  37. and m.tenant_id = #{tenantId}
  38. </if>
  39. <if test=" null != parentTenantId and '' != parentTenantId">
  40. and w.`parent_tenant_id` = #{parentTenantId}
  41. and m.`parent_tenant_id` = #{parentTenantId}
  42. </if>
  43. </select>
  44. </mapper>