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

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