25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

103 lines
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.simple.mapper.WxParkMapper">
  4. <resultMap id="BaseResultMap" type="com.simple.domain.po.WxPark">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
  7. <result column="img_url" jdbcType="VARCHAR" property="imgUrl" />
  8. <result column="addr" jdbcType="VARCHAR" property="addr" />
  9. <result column="number" jdbcType="INTEGER" property="number" />
  10. <result column="entry_exit" jdbcType="INTEGER" property="entryExit" />
  11. <result column="stop_fee" jdbcType="VARCHAR" property="stopFee" />
  12. <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
  13. <result column="update_date" jdbcType="TIMESTAMP" property="updateDate" />
  14. <result column="park_id" jdbcType="VARCHAR" property="parkId" />
  15. <result column="vendor_type" jdbcType="INTEGER" property="vendorType" />
  16. <result column="vendor_params" jdbcType="VARCHAR" property="vendorParams" />
  17. </resultMap>
  18. <sql id="allColumns">
  19. `id`,`tenant_id`,`img_url`,`addr`,`number`,`entry_exit`,`stop_fee`,`create_date`,`update_date`,`park_id`,`vendor_type`,`vendor_params`
  20. </sql>
  21. <sql id="dynamicWhereConditions">
  22. where 1 = 1
  23. <if test=" null != id ">
  24. and `id` = #{id}
  25. </if>
  26. <if test=" null != tenantId ">
  27. and `tenant_id` like concat('%', #{tenantId},'%')
  28. </if>
  29. <if test=" null != imgUrl ">
  30. and `imgUrl` like concat('%', #{imgUrl},'%')
  31. </if>
  32. <if test=" null != addr ">
  33. and `addr` like concat('%', #{addr},'%')
  34. </if>
  35. <if test=" null != number ">
  36. and `number` = #{number}
  37. </if>
  38. <if test=" null != entryExit ">
  39. and `entry_exit` = #{entryExit}
  40. </if>
  41. <if test=" null != stopFee ">
  42. and `stop_fee` = #{stopFee}
  43. </if>
  44. <if test=" null != createDate ">
  45. and `create_date` = #{createDate}
  46. </if>
  47. <if test=" null != updateDate ">
  48. and `update_date` = #{updateDate}
  49. </if>
  50. <if test=" null != parkId ">
  51. and `park_id` like concat('%', #{parkId},'%')
  52. </if>
  53. <if test=" null != vendorType ">
  54. and `vendor_type` = #{vendorType}
  55. </if>
  56. <if test=" null != vendorParams ">
  57. and `vendor_params` like concat('%', #{vendorParams},'%')
  58. </if>
  59. <if test=" null != ids ">
  60. and id in
  61. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  62. #{idItem}
  63. </foreach>
  64. </if>
  65. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  66. </sql>
  67. <select id="findList" parameterType="com.simple.domain.po.WxPark" resultMap="BaseResultMap">
  68. select <include refid="allColumns" /> from wx_park
  69. <include refid="dynamicWhereConditions" />
  70. </select>
  71. </mapper>