InvestmentFloorDao.xml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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="platform.modules.carrier.dao.InvestmentFloorDao">
  4. <!-- 批量插入-->
  5. <insert id="insertBatch" parameterType="java.util.List">
  6. INSERT INTO ic_investment_floor (
  7. id, investment_id, floor_id, floor_height,
  8. area, capacity, refer_price, rental_month,
  9. checkin_time, rental_method, status,
  10. remark, created_time, created_by,
  11. updated_by, updated_time, del_flag,
  12. created_name, updated_name
  13. )
  14. VALUES
  15. <foreach collection="list" item="item" open="" separator="," close="">
  16. (
  17. #{item.id}, #{item.investment_id}, #{item.floor_id},#{item.floor_height},
  18. #{item.area}, #{item.capacity}, #{item.refer_price}, #{item.rental_month},
  19. #{item.checkin_time},#{item.rental_method}, #{item.status},
  20. #{item.remark}, #{item.created_time}, #{item.created_by}
  21. #{item.updated_by}, #{item.updated_time}, #{item.del_flag},
  22. #{item.created_name}, #{item.updated_name}
  23. )
  24. </foreach>
  25. </insert>
  26. <delete id="deleteByInvestmentId">
  27. DELETE FROM ic_investment_floor WHERE investment_id = #{id}
  28. </delete>
  29. <select id="findByInvestmentId" resultType="platform.modules.carrier.entity.InvestmentFloor">
  30. SELECT iif.* ,yf.floor
  31. FROM ic_investment_floor iif
  32. LEFT JOIN y_floor yf on yf.id = iif.floor_id
  33. WHERE iif.investment_id = #{id}
  34. </select>
  35. </mapper>