后台服务
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

60 行
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.WxUserDataRuleMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxUserDataRule">
  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="user_id" jdbcType="BIGINT" property="userId"/>
  9. <result column="type" jdbcType="INTEGER" property="type"/>
  10. <result column="buildingFloor" jdbcType="VARCHAR" property="buildingFloor"/>
  11. <result column="business" jdbcType="VARCHAR" property="business"/>
  12. <result column="target" jdbcType="VARCHAR" property="target"/>
  13. <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
  14. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
  15. </resultMap>
  16. <sql id="allColumns">
  17. `id`,`tenant_id`,`parent_tenant_id`,`user_id`,`type`,`business`,`target`,`create_time`,`update_time`
  18. </sql>
  19. <sql id="dynamicWhereConditions">
  20. where 1 = 1
  21. <if test=" null != id ">
  22. and `id` = #{id}
  23. </if>
  24. <if test=" null != tenantId and '' != tenantId">
  25. and `tenant_id` = #{tenantId}
  26. </if>
  27. <if test=" null != parentTenantId and '' != parentTenantId">
  28. and `parent_tenant_id` = #{parentTenantId}
  29. </if>
  30. <if test=" null != userId ">
  31. and `user_id` = #{userId}
  32. </if>
  33. <if test=" null != type ">
  34. and `type` = #{type}
  35. </if>
  36. <if test=" null != ids ">
  37. and id in
  38. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  39. #{idItem}
  40. </foreach>
  41. </if>
  42. <if test=" null != sortColumns">order by ${sortColumns}</if>
  43. </sql>
  44. <select id="findList" parameterType="com.iformall.domain.po.WxUserDataRule" resultMap="BaseResultMap">
  45. select
  46. <include refid="allColumns"/>
  47. from wx_user_data_rule
  48. <include refid="dynamicWhereConditions"/>
  49. </select>
  50. </mapper>