選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 
 

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