InvoiceOrderMqMapper.xml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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="cn.com.wingxi.biandan.mq.server.order.mapper.InvoiceOrderMqMapper">
  6. <resultMap type="InvoiceOrder" id="InvoiceOrderResult">
  7. <result property="id" column="id" />
  8. <result property="orderId" column="orderId" />
  9. <result property="orderNo" column="orderNo" />
  10. <result property="orderDetailId" column="orderDetailId" />
  11. <result property="buyerId" column="buyerId" />
  12. <result property="buyerRole" column="buyerRole" />
  13. <result property="tradeType" column="tradeType" />
  14. <result property="sellerId" column="sellerId" />
  15. <result property="sellerRole" column="sellerRole" />
  16. <result property="payeeId" column="payeeId" />
  17. <result property="payeeRole" column="payeeRole" />
  18. <result property="suiteId" column="suiteId" />
  19. <result property="prodId" column="prodId" />
  20. <result property="prodName" column="prodName" />
  21. <result property="pprId" column="pprId" />
  22. <result property="pprName" column="pprName" />
  23. <result property="mateId" column="mateId" />
  24. <result property="mateName" column="mateName" />
  25. <result property="prodType" column="prodType" />
  26. <result property="orgProdId" column="orgProdId" />
  27. <result property="surfaceQty" column="surfaceQty" />
  28. <result property="unitQty" column="unitQty" />
  29. <result property="orderQty" column="orderQty" />
  30. <result property="price" column="price" />
  31. <result property="returnQty" column="returnQty" />
  32. <result property="finishTime" column="finishTime" />
  33. <result property="orderStatus" column="orderStatus" />
  34. <result property="invoiceTime" column="invoiceTime" />
  35. <result property="invoiceStatus" column="invoiceStatus" />
  36. <result property="invoiceBatchNo" column="invoiceBatchNo" />
  37. <result property="invoiceBillNo" column="invoiceBillNo" />
  38. <result property="delFlag" column="delFlag" />
  39. <result property="createUser" column="createUser" />
  40. <result property="createTime" column="createTime" />
  41. <result property="updateUser" column="updateUser" />
  42. <result property="updateTime" column="updateTime" />
  43. </resultMap>
  44. <sql id="selectInvoiceOrderVo">
  45. select
  46. id,
  47. orderId,
  48. orderNo,
  49. orderDetailId,
  50. buyerId,
  51. buyerRole,
  52. tradeType,
  53. sellerId,
  54. sellerRole,
  55. payeeId,
  56. payeeRole,
  57. suiteId,
  58. prodId,
  59. prodName,
  60. pprId,
  61. pprName,
  62. mateId,
  63. mateName,
  64. prodType,
  65. orgProdId,
  66. surfaceQty,
  67. unitQty,
  68. orderQty,
  69. price,
  70. returnQty,
  71. finishTime,
  72. orderStatus,
  73. invoiceTime,
  74. invoiceStatus,
  75. invoiceBatchNo,
  76. invoiceBillNo,
  77. delFlag,
  78. createUser,
  79. createTime,
  80. updateUser,
  81. updateTime
  82. from t_invoice_order
  83. </sql>
  84. <update id="updateInvoiceOrderReturnQty" parameterType="InvoiceOrder">
  85. update t_invoice_order
  86. <trim prefix="SET" suffixOverrides=",">
  87. <if test="returnQty != null">returnQty = returnQty - #{returnQty},</if>
  88. <if test="updateUser != null and updateUser != ''">updateUser = #{updateUser},</if>
  89. <if test="updateTime != null">updateTime = #{updateTime},</if>
  90. </trim>
  91. where delFlag = '0'
  92. <if test="id != null "> and id = #{id}</if>
  93. <if test="orderId != null "> and orderId = #{orderId}</if>
  94. <if test="orderNo != null and orderNo != ''"> and orderNo = #{orderNo}</if>
  95. <if test="orderDetailId != null "> and orderDetailId = #{orderDetailId}</if>
  96. <if test="buyerId != null "> and buyerId = #{buyerId}</if>
  97. <if test="buyerRole != null and buyerRole != ''"> and buyerRole = #{buyerRole}</if>
  98. <if test="tradeType != null and tradeType != ''"> and tradeType = #{tradeType}</if>
  99. <if test="sellerId != null "> and sellerId = #{sellerId}</if>
  100. <if test="sellerRole != null and sellerRole != ''"> and sellerRole = #{sellerRole}</if>
  101. <if test="payeeId != null "> and payeeId = #{payeeId}</if>
  102. <if test="payeeRole != null and payeeRole != ''"> and payeeRole = #{payeeRole}</if>
  103. <if test="suiteId != null and suiteId != ''"> and suiteId = #{suiteId}</if>
  104. <if test="prodId != null "> and prodId = #{prodId}</if>
  105. <if test="pprId != null "> and pprId = #{pprId}</if>
  106. <if test="mateId != null "> and mateId = #{mateId}</if>
  107. <if test="prodType != null and prodType != ''"> and prodType = #{prodType}</if>
  108. <if test="orgProdId != null "> and orgProdId = #{orgProdId}</if>
  109. <if test="orderStatus != null and orderStatus != ''"> and orderStatus = #{orderStatus}</if>
  110. <if test="invoiceStatus != null and invoiceStatus != ''"> and invoiceStatus = #{invoiceStatus}</if>
  111. <if test="invoiceBatchNo != null and invoiceBatchNo != ''"> and invoiceBatchNo = #{invoiceBatchNo}</if>
  112. <if test="invoiceBillNo != null and invoiceBillNo != ''"> and invoiceBillNo = #{invoiceBillNo}</if>
  113. </update>
  114. </mapper>