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

117 строки
3.3 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.WxCUserBasicInfoMapper">
  4. <resultMap id="BaseResultMap" type="com.simple.domain.po.WxCUserBasicInfo">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="phone" jdbcType="VARCHAR" property="phone" />
  7. <result column="birthdate" jdbcType="TIMESTAMP" property="birthdate" />
  8. <result column="education" jdbcType="VARCHAR" property="education" />
  9. <result column="sex" jdbcType="INTEGER" property="sex" />
  10. <result column="email" jdbcType="VARCHAR" property="email" />
  11. <result column="address" jdbcType="VARCHAR" property="address" />
  12. <result column="poins" jdbcType="INTEGER" property="poins" />
  13. <result column="tag_id" jdbcType="BIGINT" property="tagId" />
  14. <result column="c_user_id" jdbcType="BIGINT" property="cUserId" />
  15. <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
  16. <result column="update_date" jdbcType="TIMESTAMP" property="updateDate" />
  17. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
  18. <result column="merchant_id" jdbcType="BIGINT" property="merchantId" />
  19. </resultMap>
  20. <sql id="allColumns">
  21. `id`,`phone`,`birthdate`,`education`,`sex`,`email`,`address`,`poins`,`tag_id`,`c_user_id`,`create_date`,`update_date`,`tenant_id`,`merchant_id`
  22. </sql>
  23. <sql id="dynamicWhereConditions">
  24. where 1 = 1
  25. <if test=" null != id ">
  26. and `id` = #{id}
  27. </if>
  28. <if test=" null != phone ">
  29. and `phone` like concat('%', #{phone},'%')
  30. </if>
  31. <if test=" null != birthdate ">
  32. and `birthdate` = #{birthdate}
  33. </if>
  34. <if test=" null != education ">
  35. and `education` like concat('%', #{education},'%')
  36. </if>
  37. <if test=" null != sex ">
  38. and `sex` = #{sex}
  39. </if>
  40. <if test=" null != email ">
  41. and `email` like concat('%', #{email},'%')
  42. </if>
  43. <if test=" null != address ">
  44. and `address` like concat('%', #{address},'%')
  45. </if>
  46. <if test=" null != poins ">
  47. and `poins` = #{poins}
  48. </if>
  49. <if test=" null != tagId ">
  50. and `tag_id` = #{tagId}
  51. </if>
  52. <if test=" null != cUserId ">
  53. and `c_user_id` = #{cUserId}
  54. </if>
  55. <if test=" null != createDate ">
  56. and `create_date` = #{createDate}
  57. </if>
  58. <if test=" null != updateDate ">
  59. and `update_date` = #{updateDate}
  60. </if>
  61. <if test=" null != tenantId ">
  62. and `tenant_id` like concat('%', #{tenantId},'%')
  63. </if>
  64. <if test=" null != merchantId ">
  65. and `merchant_id` = #{merchantId}
  66. </if>
  67. <if test=" null != ids ">
  68. and id in
  69. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  70. #{idItem}
  71. </foreach>
  72. </if>
  73. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  74. </sql>
  75. <select id="findList" parameterType="com.simple.domain.po.WxCUserBasicInfo" resultMap="BaseResultMap">
  76. select <include refid="allColumns" /> from wx_c_user_basic_info
  77. <include refid="dynamicWhereConditions" />
  78. </select>
  79. </mapper>