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

WxMallFloorMapper.xml 3.4 KiB

преди 2 години
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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.WxMallFloorMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxMallFloor">
  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="mall_id" jdbcType="BIGINT" property="mallId"/>
  9. <result column="building_id" jdbcType="BIGINT" property="buildingId"/>
  10. <result column="floor_name" jdbcType="VARCHAR" property="floorName"/>
  11. <result column="background_img" jdbcType="VARCHAR" property="backgroundImg"/>
  12. <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
  13. <result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
  14. <result column="total_area" jdbcType="DECIMAL" property="totalArea"/>
  15. <result column="operating_area" jdbcType="DECIMAL" property="operatingArea"/>
  16. <result column="floor_map" jdbcType="VARCHAR" property="floorMap"/>
  17. </resultMap>
  18. <sql id="allColumns">
  19. `id`,`tenant_id`,`parent_tenant_id`,`mall_id`,`building_id`,`floor_name`,`background_img`,`create_date`,`update_date`,`total_area`,`operating_area`,`floor_map`
  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 and '' != tenantId">
  27. and `tenant_id` = #{tenantId}
  28. </if>
  29. <if test=" null != parentTenantId and '' != parentTenantId">
  30. and `parent_tenant_id` = #{parentTenantId}
  31. </if>
  32. <if test=" null != mallId ">
  33. and `mall_id` = #{mallId}
  34. </if>
  35. <if test=" null != buildingId ">
  36. and `building_id` = #{buildingId}
  37. </if>
  38. <if test=" null != floorName ">
  39. and `floor_name` like concat('%', #{floorName},'%')
  40. </if>
  41. <if test=" null != backgroundImg ">
  42. and `background_img` like concat('%', #{backgroundImg},'%')
  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 != ids ">
  51. and id in
  52. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  53. #{idItem}
  54. </foreach>
  55. </if>
  56. <if test=" null != sortColumns">order by ${sortColumns}</if>
  57. </sql>
  58. <select id="findList" parameterType="com.iformall.domain.po.WxMallFloor" resultMap="BaseResultMap">
  59. select
  60. <include refid="allColumns"/>
  61. from wx_mall_floor
  62. <include refid="dynamicWhereConditions"/>
  63. </select>
  64. <delete id="deleteByBuildingId">
  65. delete from wx_mall_floor where building_id = #{buildingId}
  66. </delete>
  67. <delete id="deleteByTenantId">
  68. delete from wx_mall_floor where `tenant_id` = #{tenantId}
  69. </delete>
  70. <select id="findIdAndName" resultMap="BaseResultMap">
  71. select
  72. `id`,`floor_name`
  73. from wx_mall_floor
  74. where `tenant_id` = #{tenantId}
  75. </select>
  76. </mapper>