Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 

48 строки
1.8 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="tenantId" property="tenantId" />
  7. <result column="parent_id" property="parentId" />
  8. <result column="name" property="name" />
  9. <result column="type" property="type" />
  10. <result column="sort" property="sort" />
  11. <result column="model_id" property="modelId" />
  12. <result column="create_date" property="createDate" />
  13. <result column="update_date" property="updateDate" />
  14. <collection fetchType="eager" property="childs" ofType="WxFlowConfig" column="id" select="findChildList"/>
  15. </resultMap>
  16. <sql id="dynamicWhereConditions">
  17. where 1=1
  18. <if test=" null != parentId ">and `parent_id` = #{parentId}</if>
  19. <if test=" null != tenantId ">and `tenant_id` = #{tenantId}</if>
  20. <if test=" null != id "> and `id` = #{id} </if>
  21. <if test=" null != modelId"> and `model_id` = #{modelId} </if>
  22. <if test="null != name and '' != name "> and `name` like concat('%', #{name},'%') </if>
  23. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  24. <if test=" null == sortColumns"> order by sort asc </if>
  25. </sql>
  26. <select id="findList" parameterType="com.iformall.domain.po.WxFlowConfig" resultMap="BaseResultMap">
  27. select * from wx_flow_config
  28. <include refid="dynamicWhereConditions" />
  29. </select>
  30. <select id="findChildList" resultType="WxFlowConfig">
  31. SELECT * FROM wx_flow_config WHERE parent_id = #{id} ORDER BY sort ASC
  32. </select>
  33. <update id="updateTime" parameterType="com.iformall.domain.po.WxFlowConfig">
  34. update wx_flow_config set update_date = now() where model_id = #{modelId}
  35. </update>
  36. </mapper>