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

81 строка
2.9 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.MallCooUserInfoMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.MallCooUserInfo">
  5. <id column="id" jdbcType="BIGINT" property="id"/>
  6. <result column="open_user_id" jdbcType="VARCHAR" property="openUserId"/>
  7. <result column="phone" jdbcType="VARCHAR" property="phone"/>
  8. <result column="birthdate" jdbcType="TIMESTAMP" property="birthdate"/>
  9. <result column="gender" jdbcType="INTEGER" property="gender"/>
  10. <result column="address" jdbcType="VARCHAR" property="address"/>
  11. <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
  12. <result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
  13. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
  14. <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId"/>
  15. <result column="user_name" jdbcType="VARCHAR" property="userName"/>
  16. </resultMap>
  17. <sql id="allColumns">
  18. `id`,`open_user_id`,`phone`,`birthdate`,`gender`,
  19. `address`,`create_date`,`update_date`,
  20. `tenant_id`,`parent_tenant_id`,`user_name`
  21. </sql>
  22. <sql id="dynamicWhereConditions">
  23. where `tenant_id` = #{tenantId}
  24. <if test=" null != id ">
  25. and `id` = #{id}
  26. </if>
  27. <if test=" null != phone ">
  28. and `phone` like concat('%', #{phone},'%')
  29. </if>
  30. <if test=" null != birthdate ">
  31. and `birthdate` = #{birthdate}
  32. </if>
  33. <if test=" null != gender ">
  34. and `gender` = #{gender}
  35. </if>
  36. <if test=" null != address ">
  37. and `address` like concat('%', #{address},'%')
  38. </if>
  39. <if test=" null != userName ">
  40. and `user_name` like concat('%', #{userName},'%')
  41. </if>
  42. <if test=" null != startTime and null != endTime">
  43. and `create_date` between #{startTime} and #{endTime}
  44. </if>
  45. <if test=" null != ids ">
  46. and id in
  47. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  48. #{idItem}
  49. </foreach>
  50. </if>
  51. <if test=" null != sortColumns">order by ${sortColumns}</if>
  52. </sql>
  53. <select id="selectById" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  54. select <include refid="allColumns"/>
  55. from mall_coo_user_info
  56. where id =#{id}
  57. and tenant_id = #{tenantId}
  58. </select>
  59. <select id="findList" parameterType="com.iformall.domain.po.MallCooUserInfo" resultMap="BaseResultMap">
  60. select
  61. <include refid="allColumns"/>
  62. from mall_coo_user_info
  63. <include refid="dynamicWhereConditions"/>
  64. </select>
  65. </mapper>