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.
 
 
 
 
 

62 lines
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.WxMsgSignatureMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxMsgSignature">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
  7. <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId"/>
  8. <result column="name" jdbcType="VARCHAR" property="name" />
  9. <result column="createtime" jdbcType="TIMESTAMP" property="createtime" />
  10. </resultMap>
  11. <sql id="allColumns">
  12. `id`,`tenant_id`,`parent_tenant_id`,`name`,`createtime`
  13. </sql>
  14. <sql id="dynamicWhereConditions">
  15. where 1 = 1
  16. <if test=" null != id ">
  17. and `id` = #{id}
  18. </if>
  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 != name ">
  26. and `name` like concat('%', #{name},'%')
  27. </if>
  28. <if test=" null != createtime ">
  29. and `createtime` = #{createtime}
  30. </if>
  31. <if test=" null != ids ">
  32. and id in
  33. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  34. #{idItem}
  35. </foreach>
  36. </if>
  37. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  38. </sql>
  39. <select id="findList" parameterType="com.iformall.domain.po.WxMsgSignature" resultMap="BaseResultMap">
  40. select
  41. <include refid="allColumns"/>
  42. from wx_msg_signature
  43. <include refid="dynamicWhereConditions" />
  44. </select>
  45. </mapper>