RoomRenovationsServiceDaoImplMapper.xml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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="roomRenovationsServiceDaoImpl">
  6. <!-- 查询装修申请信息 -->
  7. <select id="getRoomRenovationInfo" parameterType="Map" resultType="Map">
  8. select t.status_cd,t.status_cd statusCd,t.remark,t.is_violation,t.is_violation isViolation,t.r_id,t.r_id
  9. rId,t.room_id,t.room_id roomId,t.room_name,t.room_name roomName,t.person_name,t.person_name
  10. personName,t.violation_desc,t.violation_desc violationDesc,t.start_time,t.start_time
  11. startTime,t.end_time,t.end_time endTime,t.state,td.name stateName,t.community_id,t.community_id
  12. communityId,t.person_tel,t.person_tel personTel,t.create_time createTime
  13. from room_renovation t
  14. left join t_dict td on td.table_name='room_renovation' and td.table_columns='state'
  15. and t.state=td.status_cd
  16. where 1 =1
  17. <if test="statusCd !=null and statusCd != ''">
  18. and t.status_cd= #{statusCd}
  19. </if>
  20. <if test="remark !=null and remark != ''">
  21. and t.remark= #{remark}
  22. </if>
  23. <if test="isViolation !=null and isViolation != ''">
  24. and t.is_violation= #{isViolation}
  25. </if>
  26. <if test="rId !=null and rId != ''">
  27. and t.r_id= #{rId}
  28. </if>
  29. <if test="roomId !=null and roomId != ''">
  30. and t.room_id= #{roomId}
  31. </if>
  32. <if test="roomName !=null and roomName != ''">
  33. and t.room_name= #{roomName}
  34. </if>
  35. <if test="personName !=null and personName != ''">
  36. and t.person_name like '%${personName}%'
  37. </if>
  38. <if test="violationDesc !=null and violationDesc != ''">
  39. and t.violation_desc= #{violationDesc}
  40. </if>
  41. <if test="startTime !=null and startTime != ''">
  42. and t.start_time= #{startTime}
  43. </if>
  44. <if test="endTime !=null and endTime != ''">
  45. and t.end_time= #{endTime}
  46. </if>
  47. <if test="state !=null and state != ''">
  48. and t.state= #{state}
  49. </if>
  50. <if test="communityId !=null and communityId != ''">
  51. and t.community_id= #{communityId}
  52. </if>
  53. <if test="personTel !=null and personTel != ''">
  54. and t.person_tel= #{personTel}
  55. </if>
  56. order by t.create_time desc
  57. <if test="page != -1 and page != null ">
  58. limit #{page}, #{row}
  59. </if>
  60. </select>
  61. <!-- 查询装修申请数量 -->
  62. <select id="queryRoomRenovationsCount" parameterType="Map" resultType="Map">
  63. select count(1) count
  64. from room_renovation t
  65. where 1 =1
  66. <if test="statusCd !=null and statusCd != ''">
  67. and t.status_cd= #{statusCd}
  68. </if>
  69. <if test="remark !=null and remark != ''">
  70. and t.remark= #{remark}
  71. </if>
  72. <if test="isViolation !=null and isViolation != ''">
  73. and t.is_violation= #{isViolation}
  74. </if>
  75. <if test="rId !=null and rId != ''">
  76. and t.r_id= #{rId}
  77. </if>
  78. <if test="roomId !=null and roomId != ''">
  79. and t.room_id= #{roomId}
  80. </if>
  81. <if test="roomName !=null and roomName != ''">
  82. and t.room_name= #{roomName}
  83. </if>
  84. <if test="personName !=null and personName != ''">
  85. and t.person_name like '%${personName}%'
  86. </if>
  87. <if test="violationDesc !=null and violationDesc != ''">
  88. and t.violation_desc= #{violationDesc}
  89. </if>
  90. <if test="startTime !=null and startTime != ''">
  91. and t.start_time= #{startTime}
  92. </if>
  93. <if test="endTime !=null and endTime != ''">
  94. and t.end_time= #{endTime}
  95. </if>
  96. <if test="state !=null and state != ''">
  97. and t.state= #{state}
  98. </if>
  99. <if test="communityId !=null and communityId != ''">
  100. and t.community_id= #{communityId}
  101. </if>
  102. <if test="personTel !=null and personTel != ''">
  103. and t.person_tel= #{personTel}
  104. </if>
  105. </select>
  106. </mapper>