ParkingBoxAreaV1ServiceDaoImplMapper.xml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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="parkingBoxAreaV1ServiceDaoImpl">
  6. <!-- 保存停车场岗亭信息 add by wuxw 2018-07-03 -->
  7. <insert id="saveParkingBoxAreaInfo" parameterType="Map">
  8. insert into parking_box_area(
  9. default_area,ba_id,pa_id,remark,community_id,box_id
  10. ) values (
  11. #{defaultArea},#{baId},#{paId},#{remark},#{communityId},#{boxId}
  12. )
  13. </insert>
  14. <!-- 查询停车场岗亭信息 add by wuxw 2018-07-03 -->
  15. <select id="getParkingBoxAreaInfo" parameterType="Map" resultType="Map">
  16. select t.default_area,t.default_area defaultArea,t.ba_id,t.ba_id baId,t.pa_id,t.pa_id paId,t.remark,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId,t.box_id,t.box_id boxId
  17. from parking_box_area t
  18. where 1 =1
  19. <if test="defaultArea !=null and defaultArea != ''">
  20. and t.default_area= #{defaultArea}
  21. </if>
  22. <if test="baId !=null and baId != ''">
  23. and t.ba_id= #{baId}
  24. </if>
  25. <if test="paId !=null and paId != ''">
  26. and t.pa_id= #{paId}
  27. </if>
  28. <if test="remark !=null and remark != ''">
  29. and t.remark= #{remark}
  30. </if>
  31. <if test="statusCd !=null and statusCd != ''">
  32. and t.status_cd= #{statusCd}
  33. </if>
  34. <if test="communityId !=null and communityId != ''">
  35. and t.community_id= #{communityId}
  36. </if>
  37. <if test="boxId !=null and boxId != ''">
  38. and t.box_id= #{boxId}
  39. </if>
  40. order by t.create_time desc
  41. <if test="page != -1 and page != null ">
  42. limit #{page}, #{row}
  43. </if>
  44. </select>
  45. <!-- 修改停车场岗亭信息 add by wuxw 2018-07-03 -->
  46. <update id="updateParkingBoxAreaInfo" parameterType="Map">
  47. update parking_box_area t set t.status_cd = #{statusCd}
  48. <if test="newBId != null and newBId != ''">
  49. ,t.b_id = #{newBId}
  50. </if>
  51. <if test="defaultArea !=null and defaultArea != ''">
  52. , t.default_area= #{defaultArea}
  53. </if>
  54. <if test="paId !=null and paId != ''">
  55. , t.pa_id= #{paId}
  56. </if>
  57. <if test="remark !=null and remark != ''">
  58. , t.remark= #{remark}
  59. </if>
  60. <if test="communityId !=null and communityId != ''">
  61. , t.community_id= #{communityId}
  62. </if>
  63. <if test="boxId !=null and boxId != ''">
  64. , t.box_id= #{boxId}
  65. </if>
  66. where 1=1 <if test="baId !=null and baId != ''">
  67. and t.ba_id= #{baId}
  68. </if>
  69. </update>
  70. <!-- 查询停车场岗亭数量 add by wuxw 2018-07-03 -->
  71. <select id="queryParkingBoxAreasCount" parameterType="Map" resultType="Map">
  72. select count(1) count
  73. from parking_box_area t
  74. where 1 =1
  75. <if test="defaultArea !=null and defaultArea != ''">
  76. and t.default_area= #{defaultArea}
  77. </if>
  78. <if test="baId !=null and baId != ''">
  79. and t.ba_id= #{baId}
  80. </if>
  81. <if test="paId !=null and paId != ''">
  82. and t.pa_id= #{paId}
  83. </if>
  84. <if test="remark !=null and remark != ''">
  85. and t.remark= #{remark}
  86. </if>
  87. <if test="statusCd !=null and statusCd != ''">
  88. and t.status_cd= #{statusCd}
  89. </if>
  90. <if test="communityId !=null and communityId != ''">
  91. and t.community_id= #{communityId}
  92. </if>
  93. <if test="boxId !=null and boxId != ''">
  94. and t.box_id= #{boxId}
  95. </if>
  96. </select>
  97. </mapper>