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.
 
 
 
 
 

57 lines
1.5 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.simple.mapper.WxCUserCloudMapper">
  4. <resultMap id="BaseResultMap" type="com.simple.domain.po.WxCUserCloud">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
  7. <result column="c_user_id" jdbcType="BIGINT" property="cUserId" />
  8. <result column="cloud_data" jdbcType="VARCHAR" property="cloudData" />
  9. </resultMap>
  10. <sql id="allColumns">
  11. `id`,`tenant_id`,`c_user_id`,`cloud_data`
  12. </sql>
  13. <sql id="dynamicWhereConditions">
  14. where 1 = 1
  15. <if test=" null != id ">
  16. and `id` = #{id}
  17. </if>
  18. <if test=" null != tenantId ">
  19. and `tenant_id` like concat('%', #{tenantId},'%')
  20. </if>
  21. <if test=" null != cUserId ">
  22. and `c_user_id` = #{cUserId}
  23. </if>
  24. <if test=" null != cloudData ">
  25. and `cloud_data` like concat('%', #{cloudData},'%')
  26. </if>
  27. <if test=" null != ids ">
  28. and id in
  29. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  30. #{idItem}
  31. </foreach>
  32. </if>
  33. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  34. </sql>
  35. <select id="findList" parameterType="com.simple.domain.po.WxCUserCloud" resultMap="BaseResultMap">
  36. select <include refid="allColumns" /> from wx_c_user_cloud
  37. <include refid="dynamicWhereConditions" />
  38. </select>
  39. </mapper>