Nav apraksta

TMapAttractionsFlowersPropertiesMapper.xml 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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.yt.zhylplat.moduleMap.mapper.TMapAttractionsFlowersPropertiesMapper">
  4. <!-- 通用查询映射结果 -->
  5. <resultMap id="BaseResultMap" type="com.yt.zhylplat.moduleMap.entity.TMapAttractionsFlowersProperties">
  6. <id column="id" property="id" />
  7. <result column="maintenance_company_id" property="maintenanceCompanyId" />
  8. <result column="maintenance_company_name" property="maintenanceCompanyName" />
  9. <result column="section_id" property="sectionId" />
  10. <result column="section_name" property="sectionName" />
  11. <result column="road_id" property="roadId" />
  12. <result column="attractions_name" property="attractionsName" />
  13. <result column="attractions_place" property="attractionsPlace" />
  14. <result column="flower_bed" property="flowerBed" />
  15. <result column="flower_box" property="flowerBox" />
  16. <result column="flower_mirror" property="flowerMirror" />
  17. <result column="cross_road_type" property="crossRoadType" />
  18. <result column="cross_road_area" property="crossRoadArea" />
  19. <result column="grass_flower_amount" property="grassFlowerAmount" />
  20. <result column="green_stone_amount" property="greenStoneAmount" />
  21. <result column="money_case_sta" property="moneyCaseSta" />
  22. <result column="remark" property="remark" />
  23. <result column="create_user_id" property="createUserId" />
  24. <result column="create_date" property="createDate" />
  25. <result column="update_user_id" property="updateUserId" />
  26. <result column="update_date" property="updateDate" />
  27. <result column="del_flg" property="delFlg" />
  28. </resultMap>
  29. <!-- 通用查询结果列 -->
  30. <sql id="Base_Column_List">
  31. id, maintenance_company_id, maintenance_company_name, section_id, section_name, road_id, attractions_name, attractions_place, flower_bed, flower_box, flower_mirror, cross_road_type, cross_road_area, grass_flower_amount, green_stone_amount, money_case_sta, remark, create_user_id, create_date, update_user_id, update_date, del_flg
  32. </sql>
  33. <select id="selectTMapAttractionsFlowersProperties"
  34. resultType="com.yt.zhylplat.moduleMap.entity.TMapAttractionsFlowersProperties">
  35. select
  36. afp.id,
  37. afg.coordinates as coordinates,
  38. afg.type as geometryType,
  39. 'Feature' as type
  40. from
  41. T_Map_Attractions_Flowers_Properties afp
  42. left join
  43. T_Map_Attractions_Flowers_Geometry afg on afp.id = afg.attractions_flowers_id
  44. <where>
  45. and afp.del_flg = 0
  46. <if test="id != null">
  47. and afp.id = #{id}
  48. </if>
  49. <if test="sectionId != null">
  50. and afp .section_id = #{sectionId}
  51. </if>
  52. <if test="maintenanceCompanyId != null">
  53. and afp.maintenance_company_id = #{maintenanceCompanyId}
  54. </if>
  55. <if test="roadId != null">
  56. and afp.road_id = #{roadId}
  57. </if>
  58. </where>
  59. </select>
  60. </mapper>