RentingPoolFlowServiceDaoImplMapper.xml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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="rentingPoolFlowServiceDaoImpl">
  6. <!-- 保存出租流程信息 add by wuxw 2018-07-03 -->
  7. <insert id="saveRentingPoolFlowInfo" parameterType="Map">
  8. insert into renting_pool_flow(
  9. deal_time,user_name,context,user_tel,state,user_role,community_id,flow_id,renting_id
  10. ) values (
  11. #{dealTime},#{useName},#{context},#{userTel},#{state},#{userRole},#{communityId},#{flowId},#{rentingId}
  12. )
  13. </insert>
  14. <!-- 查询出租流程信息 add by wuxw 2018-07-03 -->
  15. <select id="getRentingPoolFlowInfo" parameterType="Map" resultType="Map">
  16. select t.deal_time,t.deal_time dealTime,t.user_name,t.user_name useName,t.context,t.user_tel,t.user_tel
  17. userTel,t.status_cd,t.status_cd statusCd,t.state,t.user_role,t.user_role userRole,t.community_id,t.community_id
  18. communityId,t.flow_id,t.flow_id flowId,t.renting_id,t.renting_id rentingId,td.name stateName
  19. from renting_pool_flow t
  20. left join t_dict td on td.status_cd = t.state and td.table_name = 'renting_pool_flow' and td.table_columns = 'state'
  21. where 1 =1
  22. <if test="dealTime !=null and dealTime != ''">
  23. and t.deal_time= #{dealTime}
  24. </if>
  25. <if test="useName !=null and useName != ''">
  26. and t.user_name= #{useName}
  27. </if>
  28. <if test="context !=null and context != ''">
  29. and t.context= #{context}
  30. </if>
  31. <if test="userTel !=null and userTel != ''">
  32. and t.user_tel= #{userTel}
  33. </if>
  34. <if test="statusCd !=null and statusCd != ''">
  35. and t.status_cd= #{statusCd}
  36. </if>
  37. <if test="state !=null and state != ''">
  38. and t.state= #{state}
  39. </if>
  40. <if test="userRole !=null and userRole != ''">
  41. and t.user_role= #{userRole}
  42. </if>
  43. <if test="communityId !=null and communityId != ''">
  44. and t.community_id= #{communityId}
  45. </if>
  46. <if test="flowId !=null and flowId != ''">
  47. and t.flow_id= #{flowId}
  48. </if>
  49. <if test="rentingId !=null and rentingId != ''">
  50. and t.renting_id= #{rentingId}
  51. </if>
  52. order by t.create_time desc
  53. <if test="page != -1 and page != null ">
  54. limit #{page}, #{row}
  55. </if>
  56. </select>
  57. <!-- 修改出租流程信息 add by wuxw 2018-07-03 -->
  58. <update id="updateRentingPoolFlowInfo" parameterType="Map">
  59. update renting_pool_flow t set t.status_cd = #{statusCd}
  60. <if test="newBId != null and newBId != ''">
  61. ,t.b_id = #{newBId}
  62. </if>
  63. <if test="dealTime !=null and dealTime != ''">
  64. , t.deal_time= #{dealTime}
  65. </if>
  66. <if test="useName !=null and useName != ''">
  67. , t.user_name= #{useName}
  68. </if>
  69. <if test="context !=null and context != ''">
  70. , t.context= #{context}
  71. </if>
  72. <if test="userTel !=null and userTel != ''">
  73. , t.user_tel= #{userTel}
  74. </if>
  75. <if test="state !=null and state != ''">
  76. , t.state= #{state}
  77. </if>
  78. <if test="userRole !=null and userRole != ''">
  79. , t.user_role= #{userRole}
  80. </if>
  81. <if test="communityId !=null and communityId != ''">
  82. , t.community_id= #{communityId}
  83. </if>
  84. <if test="rentingId !=null and rentingId != ''">
  85. , t.renting_id= #{rentingId}
  86. </if>
  87. where 1=1
  88. <if test="flowId !=null and flowId != ''">
  89. and t.flow_id= #{flowId}
  90. </if>
  91. </update>
  92. <!-- 查询出租流程数量 add by wuxw 2018-07-03 -->
  93. <select id="queryRentingPoolFlowsCount" parameterType="Map" resultType="Map">
  94. select count(1) count
  95. from renting_pool_flow t
  96. where 1 =1
  97. <if test="dealTime !=null and dealTime != ''">
  98. and t.deal_time= #{dealTime}
  99. </if>
  100. <if test="useName !=null and useName != ''">
  101. and t.user_name= #{useName}
  102. </if>
  103. <if test="context !=null and context != ''">
  104. and t.context= #{context}
  105. </if>
  106. <if test="userTel !=null and userTel != ''">
  107. and t.user_tel= #{userTel}
  108. </if>
  109. <if test="statusCd !=null and statusCd != ''">
  110. and t.status_cd= #{statusCd}
  111. </if>
  112. <if test="state !=null and state != ''">
  113. and t.state= #{state}
  114. </if>
  115. <if test="userRole !=null and userRole != ''">
  116. and t.user_role= #{userRole}
  117. </if>
  118. <if test="communityId !=null and communityId != ''">
  119. and t.community_id= #{communityId}
  120. </if>
  121. <if test="flowId !=null and flowId != ''">
  122. and t.flow_id= #{flowId}
  123. </if>
  124. <if test="rentingId !=null and rentingId != ''">
  125. and t.renting_id= #{rentingId}
  126. </if>
  127. </select>
  128. </mapper>