RentingPoolAttrServiceDaoImplMapper.xml 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="rentingPoolAttrServiceDaoImpl">
  6. <!-- 保存出租房屋属性信息 add by wuxw 2018-07-03 -->
  7. <insert id="saveRentingPoolAttrInfo" parameterType="Map">
  8. insert into renting_pool_attr(
  9. attr_id,spec_cd,value,renting_id
  10. ) values (
  11. #{attrId},#{specCd},#{value},#{rentingId}
  12. )
  13. </insert>
  14. <!-- 查询出租房屋属性信息 add by wuxw 2018-07-03 -->
  15. <select id="getRentingPoolAttrInfo" parameterType="Map" resultType="Map">
  16. select t.attr_id,t.attr_id attrId,t.spec_cd,t.spec_cd specCd,t.status_cd,t.status_cd
  17. statusCd,t.value,t.renting_id,t.renting_id rentingId
  18. from renting_pool_attr t
  19. where 1 =1
  20. <if test="attrId !=null and attrId != ''">
  21. and t.attr_id= #{attrId}
  22. </if>
  23. <if test="specCd !=null and specCd != ''">
  24. and t.spec_cd= #{specCd}
  25. </if>
  26. <if test="statusCd !=null and statusCd != ''">
  27. and t.status_cd= #{statusCd}
  28. </if>
  29. <if test="value !=null and value != ''">
  30. and t.value= #{value}
  31. </if>
  32. <if test="rentingId !=null and rentingId != ''">
  33. and t.renting_id= #{rentingId}
  34. </if>
  35. order by t.create_time desc
  36. <if test="page != -1 and page != null ">
  37. limit #{page}, #{row}
  38. </if>
  39. </select>
  40. <!-- 修改出租房屋属性信息 add by wuxw 2018-07-03 -->
  41. <update id="updateRentingPoolAttrInfo" parameterType="Map">
  42. update renting_pool_attr t set t.status_cd = #{statusCd}
  43. <if test="newBId != null and newBId != ''">
  44. ,t.b_id = #{newBId}
  45. </if>
  46. <if test="specCd !=null and specCd != ''">
  47. , t.spec_cd= #{specCd}
  48. </if>
  49. <if test="value !=null and value != ''">
  50. , t.value= #{value}
  51. </if>
  52. <if test="rentingId !=null and rentingId != ''">
  53. , t.renting_id= #{rentingId}
  54. </if>
  55. where 1=1
  56. <if test="attrId !=null and attrId != ''">
  57. and t.attr_id= #{attrId}
  58. </if>
  59. </update>
  60. <!-- 查询出租房屋属性数量 add by wuxw 2018-07-03 -->
  61. <select id="queryRentingPoolAttrsCount" parameterType="Map" resultType="Map">
  62. select count(1) count
  63. from renting_pool_attr t
  64. where 1 =1
  65. <if test="attrId !=null and attrId != ''">
  66. and t.attr_id= #{attrId}
  67. </if>
  68. <if test="specCd !=null and specCd != ''">
  69. and t.spec_cd= #{specCd}
  70. </if>
  71. <if test="statusCd !=null and statusCd != ''">
  72. and t.status_cd= #{statusCd}
  73. </if>
  74. <if test="value !=null and value != ''">
  75. and t.value= #{value}
  76. </if>
  77. <if test="rentingId !=null and rentingId != ''">
  78. and t.renting_id= #{rentingId}
  79. </if>
  80. </select>
  81. </mapper>