No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 

105 líneas
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.WxShopMapper">
  4. <resultMap id="BaseResultMap" type="com.simple.domain.po.WxShop">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
  7. <result column="title" jdbcType="VARCHAR" property="title" />
  8. <result column="build_area" jdbcType="VARCHAR" property="buildArea" />
  9. <result column="operation_area" jdbcType="VARCHAR" property="operationArea" />
  10. <result column="building" jdbcType="VARCHAR" property="building" />
  11. <result column="floor" jdbcType="INTEGER" property="floor" />
  12. <result column="x" jdbcType="DECIMAL" property="x" />
  13. <result column="y" jdbcType="DECIMAL" property="y" />
  14. <result column="baidu_poi" jdbcType="VARCHAR" property="baiduPoi" />
  15. <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
  16. <result column="update_date" jdbcType="TIMESTAMP" property="updateDate" />
  17. </resultMap>
  18. <sql id="allColumns">
  19. `id`,`tenant_id`,`title`,`build_area`,`operation_area`,`building`,`floor`,`x`,`y`,`baidu_poi`,`create_date`,`update_date`
  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 != title ">
  30. and `title` like concat('%', #{title},'%')
  31. </if>
  32. <if test=" null != buildArea ">
  33. and `build_area` like concat('%', #{buildArea},'%')
  34. </if>
  35. <if test=" null != operationArea ">
  36. and `operation_area` like concat('%', #{operationArea},'%')
  37. </if>
  38. <if test=" null != building ">
  39. and `building` like concat('%', #{building},'%')
  40. </if>
  41. <if test=" null != floor ">
  42. and `floor` = #{floor}
  43. </if>
  44. <if test=" null != x ">
  45. and `x` = #{x}
  46. </if>
  47. <if test=" null != y ">
  48. and `y` = #{y}
  49. </if>
  50. <if test=" null != baiduPoi ">
  51. and `baidu_poi` like concat('%', #{baiduPoi},'%')
  52. </if>
  53. <if test=" null != createDate ">
  54. and `create_date` = #{createDate}
  55. </if>
  56. <if test=" null != updateDate ">
  57. and `update_date` = #{updateDate}
  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.WxShop" resultMap="BaseResultMap">
  68. select <include refid="allColumns" /> from wx_shop
  69. <include refid="dynamicWhereConditions" />
  70. </select>
  71. </mapper>