ParkFloorDiscExtendMapper.xml 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  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.idea.buildManage.mapper.ParkFloorDiscExtendMapper">
  4. <select id="listByModel" resultType="com.idea.buildManage.response.ParkFloorDiscRespson">
  5. SELECT
  6. i.group_name,
  7. i.nature,
  8. i.pre_sales_license_number,
  9. d.*
  10. FROM
  11. park_floor_disc d
  12. LEFT JOIN park_info i ON d.group_id = i.id
  13. <where>
  14. <if test="name != null and name != ''">
  15. and d.name = #{name}
  16. </if>
  17. <if test="level == 1">
  18. and i.id = #{nodeId}
  19. </if>
  20. <if test="level == 2">
  21. and d.id = #{nodeId}
  22. </if>
  23. </where>
  24. </select>
  25. <select id="selectByGroupId" resultType="com.idea.buildManage.model.ParkFloorDisc">
  26. select
  27. *
  28. from park_floor_disc
  29. where group_id = #{id,jdbcType=VARCHAR}
  30. </select>
  31. </mapper>