ReserveGoodsConfirmOrderV1ServiceDaoImplMapper.xml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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="reserveGoodsConfirmOrderV1ServiceDaoImpl">
  6. <!-- 保存预约订单时间信息 add by wuxw 2018-07-03 -->
  7. <insert id="saveReserveGoodsConfirmOrderInfo" parameterType="Map">
  8. insert into reserve_goods_confirm_order(
  9. time_id,order_id,goods_id,co_id,remark,type,community_id
  10. ) values (
  11. #{timeId},#{orderId},#{goodsId},#{coId},#{remark},#{type},#{communityId}
  12. )
  13. </insert>
  14. <!-- 查询预约订单时间信息 add by wuxw 2018-07-03 -->
  15. <select id="getReserveGoodsConfirmOrderInfo" parameterType="Map" resultType="Map">
  16. select t.time_id,t.time_id timeId,t.order_id,t.order_id orderId,t.goods_id,t.goods_id goodsId,t.co_id,t.co_id coId,t.remark,t.status_cd,t.status_cd statusCd,t.type,t.community_id,t.community_id communityId
  17. from reserve_goods_confirm_order t
  18. where 1 =1
  19. <if test="timeId !=null and timeId != ''">
  20. and t.time_id= #{timeId}
  21. </if>
  22. <if test="orderId !=null and orderId != ''">
  23. and t.order_id= #{orderId}
  24. </if>
  25. <if test="goodsId !=null and goodsId != ''">
  26. and t.goods_id= #{goodsId}
  27. </if>
  28. <if test="coId !=null and coId != ''">
  29. and t.co_id= #{coId}
  30. </if>
  31. <if test="remark !=null and remark != ''">
  32. and t.remark= #{remark}
  33. </if>
  34. <if test="statusCd !=null and statusCd != ''">
  35. and t.status_cd= #{statusCd}
  36. </if>
  37. <if test="type !=null and type != ''">
  38. and t.type= #{type}
  39. </if>
  40. <if test="communityId !=null and communityId != ''">
  41. and t.community_id= #{communityId}
  42. </if>
  43. order by t.create_time desc
  44. <if test="page != -1 and page != null ">
  45. limit #{page}, #{row}
  46. </if>
  47. </select>
  48. <!-- 修改预约订单时间信息 add by wuxw 2018-07-03 -->
  49. <update id="updateReserveGoodsConfirmOrderInfo" parameterType="Map">
  50. update reserve_goods_confirm_order t set t.status_cd = #{statusCd}
  51. <if test="newBId != null and newBId != ''">
  52. ,t.b_id = #{newBId}
  53. </if>
  54. <if test="timeId !=null and timeId != ''">
  55. , t.time_id= #{timeId}
  56. </if>
  57. <if test="orderId !=null and orderId != ''">
  58. , t.order_id= #{orderId}
  59. </if>
  60. <if test="goodsId !=null and goodsId != ''">
  61. , t.goods_id= #{goodsId}
  62. </if>
  63. <if test="remark !=null and remark != ''">
  64. , t.remark= #{remark}
  65. </if>
  66. <if test="type !=null and type != ''">
  67. , t.type= #{type}
  68. </if>
  69. <if test="communityId !=null and communityId != ''">
  70. , t.community_id= #{communityId}
  71. </if>
  72. where 1=1 <if test="coId !=null and coId != ''">
  73. and t.co_id= #{coId}
  74. </if>
  75. </update>
  76. <!-- 查询预约订单时间数量 add by wuxw 2018-07-03 -->
  77. <select id="queryReserveGoodsConfirmOrdersCount" parameterType="Map" resultType="Map">
  78. select count(1) count
  79. from reserve_goods_confirm_order t
  80. where 1 =1
  81. <if test="timeId !=null and timeId != ''">
  82. and t.time_id= #{timeId}
  83. </if>
  84. <if test="orderId !=null and orderId != ''">
  85. and t.order_id= #{orderId}
  86. </if>
  87. <if test="goodsId !=null and goodsId != ''">
  88. and t.goods_id= #{goodsId}
  89. </if>
  90. <if test="coId !=null and coId != ''">
  91. and t.co_id= #{coId}
  92. </if>
  93. <if test="remark !=null and remark != ''">
  94. and t.remark= #{remark}
  95. </if>
  96. <if test="statusCd !=null and statusCd != ''">
  97. and t.status_cd= #{statusCd}
  98. </if>
  99. <if test="type !=null and type != ''">
  100. and t.type= #{type}
  101. </if>
  102. <if test="communityId !=null and communityId != ''">
  103. and t.community_id= #{communityId}
  104. </if>
  105. </select>
  106. </mapper>