后台服务
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.

72 lines
2.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.UserBasicPropertyLogMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.UserBasicPropertyLog">
  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="project_type" jdbcType="INTEGER" property="projectType" />
  10. <result column="type" jdbcType="INTEGER" property="type" />
  11. <result column="befour_gold" jdbcType="INTEGER" property="befourGold" />
  12. <result column="gold_num" jdbcType="INTEGER" property="goldNum" />
  13. <result column="after_gold" jdbcType="INTEGER" property="afterGold" />
  14. <result column="extra_id" jdbcType="BIGINT" property="extraId" />
  15. <result column="remark" jdbcType="VARCHAR" property="remark" />
  16. <result column="detail" jdbcType="VARCHAR" property="detail" />
  17. <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
  18. </resultMap>
  19. <sql id="allColumns">
  20. `id`,`tenant_id`,`parent_tenant_id`,`user_id`,
  21. `project_type`,`type`,`befour_gold`,`gold_num`,`after_gold`,
  22. `extra_id`,`remark`,`detail`,`create_date`
  23. </sql>
  24. <sql id="dynamicWhereConditions">
  25. where 1 = 1
  26. <if test=" null != id "> and `id` = #{id} </if>
  27. <if test=" null != tenantId and '' != tenantId">
  28. and `tenant_id` = #{tenantId}
  29. </if>
  30. <if test=" null != parentTenantId and '' != parentTenantId">
  31. and `parent_tenant_id` = #{parentTenantId}
  32. </if>
  33. <if test=" null != userId "> and `user_id` = #{userId} </if>
  34. <if test=" null != projectType "> and `project_type` = #{projectType} </if>
  35. <if test=" null != type "> and `type` = #{type} </if>
  36. <if test=" null != extraId "> and `extra_id` = #{extraId} </if>
  37. <if test=" null != startDate ">
  38. and `create_date` &gt;= #{startDate}
  39. </if>
  40. <if test=" null != endDate">
  41. and `create_date` &lt;= #{endDate}
  42. </if>
  43. <if test=" null != ids ">
  44. and id in
  45. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  46. #{idItem}
  47. </foreach>
  48. </if>
  49. <if test=" null != extraIds ">
  50. and extra_id in
  51. <foreach collection="extraIds" index="index" item="extIdItem" open="(" separator="," close=")">
  52. #{extIdItem}
  53. </foreach>
  54. </if>
  55. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  56. </sql>
  57. <select id="findList" parameterType="com.iformall.domain.po.UserBasicPropertyLog" resultMap="BaseResultMap">
  58. select <include refid="allColumns" />
  59. from user_basic_property_log
  60. <include refid="dynamicWhereConditions" />
  61. </select>
  62. </mapper>