TempCarFeeConfigAttrServiceDaoImplMapper.xml 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  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="tempCarFeeConfigAttrServiceDaoImpl">
  6. <!-- 保存临时车收费标准属性信息 add by wuxw 2018-07-03 -->
  7. <insert id="saveBusinessTempCarFeeConfigAttrInfo" parameterType="Map">
  8. insert into business_temp_car_fee_config_attr(
  9. attr_id,operate,create_time,config_id,spec_cd,b_id,value,community_id
  10. ) values (
  11. #{attrId},#{operate},#{createTime},#{configId},#{specCd},#{bId},#{value},#{communityId}
  12. )
  13. </insert>
  14. <!-- 查询临时车收费标准属性信息(Business) add by wuxw 2018-07-03 -->
  15. <select id="getBusinessTempCarFeeConfigAttrInfo" parameterType="Map" resultType="Map">
  16. select t.attr_id,t.attr_id attrId,t.operate,t.create_time,t.create_time createTime,t.config_id,t.config_id
  17. configId,t.spec_cd,t.spec_cd specCd,t.b_id,t.b_id bId,t.value,t.community_id
  18. from business_temp_car_fee_config_attr t
  19. where 1 =1
  20. <if test="attrId !=null and attrId != ''">
  21. and t.attr_id= #{attrId}
  22. </if>
  23. <if test="operate !=null and operate != ''">
  24. and t.operate= #{operate}
  25. </if>
  26. <if test="createTime !=null and createTime != ''">
  27. and t.create_time= #{createTime}
  28. </if>
  29. <if test="configId !=null and configId != ''">
  30. and t.config_id= #{configId}
  31. </if>
  32. <if test="specCd !=null and specCd != ''">
  33. and t.spec_cd= #{specCd}
  34. </if>
  35. <if test="bId !=null and bId != ''">
  36. and t.b_id= #{bId}
  37. </if>
  38. <if test="value !=null and value != ''">
  39. and t.value= #{value}
  40. </if>
  41. </select>
  42. <!-- 保存临时车收费标准属性信息至 instance表中 add by wuxw 2018-07-03 -->
  43. <insert id="saveTempCarFeeConfigAttrInfoInstance" parameterType="Map">
  44. insert into temp_car_fee_config_attr(
  45. attr_id,create_time,config_id,spec_cd,status_cd,b_id,value,community_id
  46. ) select t.attr_id,t.create_time,t.config_id,t.spec_cd,'0',t.b_id,t.value,t.community_id
  47. from business_temp_car_fee_config_attr
  48. t where 1=1
  49. <if test="attrId !=null and attrId != ''">
  50. and t.attr_id= #{attrId}
  51. </if>
  52. and t.operate= 'ADD'
  53. <if test="createTime !=null and createTime != ''">
  54. and t.create_time= #{createTime}
  55. </if>
  56. <if test="configId !=null and configId != ''">
  57. and t.config_id= #{configId}
  58. </if>
  59. <if test="specCd !=null and specCd != ''">
  60. and t.spec_cd= #{specCd}
  61. </if>
  62. <if test="bId !=null and bId != ''">
  63. and t.b_id= #{bId}
  64. </if>
  65. <if test="value !=null and value != ''">
  66. and t.value= #{value}
  67. </if>
  68. </insert>
  69. <!-- 查询临时车收费标准属性信息 add by wuxw 2018-07-03 -->
  70. <select id="getTempCarFeeConfigAttrInfo" parameterType="Map" resultType="Map">
  71. select t.attr_id,t.attr_id attrId,t.create_time,t.create_time createTime,t.config_id,t.config_id
  72. configId,t.spec_cd,t.spec_cd specCd,t.status_cd,t.status_cd statusCd,t.b_id,t.b_id bId,t.value,
  73. t.community_id,t.community_id communityId
  74. from temp_car_fee_config_attr t
  75. where 1 =1
  76. <if test="attrId !=null and attrId != ''">
  77. and t.attr_id= #{attrId}
  78. </if>
  79. <if test="createTime !=null and createTime != ''">
  80. and t.create_time= #{createTime}
  81. </if>
  82. <if test="configId !=null and configId != ''">
  83. and t.config_id= #{configId}
  84. </if>
  85. <if test="specCd !=null and specCd != ''">
  86. and t.spec_cd= #{specCd}
  87. </if>
  88. <if test="statusCd !=null and statusCd != ''">
  89. and t.status_cd= #{statusCd}
  90. </if>
  91. <if test="bId !=null and bId != ''">
  92. and t.b_id= #{bId}
  93. </if>
  94. <if test="value !=null and value != ''">
  95. and t.value= #{value}
  96. </if>
  97. <if test="communityId !=null and communityId != ''">
  98. and t.community_id= #{communityId}
  99. </if>
  100. order by t.create_time desc
  101. <if test="page != -1 and page != null ">
  102. limit #{page}, #{row}
  103. </if>
  104. </select>
  105. <!-- 修改临时车收费标准属性信息 add by wuxw 2018-07-03 -->
  106. <update id="updateTempCarFeeConfigAttrInfoInstance" parameterType="Map">
  107. update temp_car_fee_config_attr t set t.status_cd = #{statusCd}
  108. <if test="newBId != null and newBId != ''">
  109. ,t.b_id = #{newBId}
  110. </if>
  111. <if test="createTime !=null and createTime != ''">
  112. , t.create_time= #{createTime}
  113. </if>
  114. <if test="configId !=null and configId != ''">
  115. , t.config_id= #{configId}
  116. </if>
  117. <if test="specCd !=null and specCd != ''">
  118. , t.spec_cd= #{specCd}
  119. </if>
  120. <if test="value !=null and value != ''">
  121. , t.value= #{value}
  122. </if>
  123. where 1=1
  124. <if test="attrId !=null and attrId != ''">
  125. and t.attr_id= #{attrId}
  126. </if>
  127. <if test="bId !=null and bId != ''">
  128. and t.b_id= #{bId}
  129. </if>
  130. <if test="communityId !=null and communityId != ''">
  131. and t.community_id= #{communityId}
  132. </if>
  133. </update>
  134. <!-- 查询临时车收费标准属性数量 add by wuxw 2018-07-03 -->
  135. <select id="queryTempCarFeeConfigAttrsCount" parameterType="Map" resultType="Map">
  136. select count(1) count
  137. from temp_car_fee_config_attr t
  138. where 1 =1
  139. <if test="attrId !=null and attrId != ''">
  140. and t.attr_id= #{attrId}
  141. </if>
  142. <if test="createTime !=null and createTime != ''">
  143. and t.create_time= #{createTime}
  144. </if>
  145. <if test="configId !=null and configId != ''">
  146. and t.config_id= #{configId}
  147. </if>
  148. <if test="specCd !=null and specCd != ''">
  149. and t.spec_cd= #{specCd}
  150. </if>
  151. <if test="statusCd !=null and statusCd != ''">
  152. and t.status_cd= #{statusCd}
  153. </if>
  154. <if test="bId !=null and bId != ''">
  155. and t.b_id= #{bId}
  156. </if>
  157. <if test="value !=null and value != ''">
  158. and t.value= #{value}
  159. </if>
  160. <if test="communityId !=null and communityId != ''">
  161. and t.community_id= #{communityId}
  162. </if>
  163. </select>
  164. </mapper>