From fc8b51f40e71aa09bb49f407c1e9f68ac94ceb58 Mon Sep 17 00:00:00 2001
From: mitao <2763622819@qq.com>
Date: 星期一, 29 七月 2024 18:51:32 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/inner/InnerOrderAuctionBondController.java |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/inner/InnerOrderAuctionBondController.java b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/inner/InnerOrderAuctionBondController.java
index b3a83af..780be8c 100644
--- a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/inner/InnerOrderAuctionBondController.java
+++ b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/inner/InnerOrderAuctionBondController.java
@@ -12,6 +12,7 @@
 import com.ruoyi.system.api.domain.OrderAuctionBond;
 import com.ruoyi.system.api.domain.dto.AuctionGoodsListDTO;
 import com.ruoyi.system.api.domain.dto.BondDTO;
+import com.ruoyi.system.api.domain.dto.BondReturnDTO;
 import com.ruoyi.system.api.domain.dto.MemberAuctionSalesroomBondDTO;
 import com.ruoyi.system.api.domain.dto.MemberAuctionSalesroomDTO;
 import com.ruoyi.system.api.domain.dto.OrderAuctionBondDTO;
@@ -20,7 +21,6 @@
 import javax.annotation.Resource;
 import org.apache.poi.ss.formula.functions.T;
 import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.PutMapping;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -108,12 +108,15 @@
     @ResponseBody
     public R<List<OrderAuctionBond>> getOrderAuctionBondList1(@RequestBody MemberAuctionSalesroomDTO memberAuctionSalesroomDTO) {
         LambdaQueryWrapper<OrderAuctionBond> wrapper= Wrappers.lambdaQuery();
-        wrapper.eq(OrderAuctionBond::getMemberId,memberAuctionSalesroomDTO.getMemberId());
+        if (memberAuctionSalesroomDTO.getMemberId()!=null){
+            wrapper.eq(OrderAuctionBond::getMemberId,memberAuctionSalesroomDTO.getMemberId());
+        }
         if (memberAuctionSalesroomDTO.getAuctionSalesroomId()!=null){
             wrapper.eq(OrderAuctionBond::getAuctionSalesroomId,memberAuctionSalesroomDTO.getAuctionSalesroomId());
         }
         wrapper.eq(OrderAuctionBond::getBoundStatus,2);
         wrapper.eq(OrderAuctionBond::getDelFlag,0);
+        wrapper.orderByDesc(OrderAuctionBond::getCreateTime);
         List<OrderAuctionBond> list = iOrderAuctionBondService.list(wrapper);
         return R.ok(list);
 
@@ -128,7 +131,7 @@
         if (auctionGoodsListDTO.getGoodsSkuId()!=null){
         wrapper.eq(OrderAuctionBond::getAuctionGoodsId,auctionGoodsListDTO.getGoodsSkuId());
         }
-        wrapper.eq(OrderAuctionBond::getBoundStatus,1);
+        wrapper.eq(OrderAuctionBond::getBoundStatus,2);
         wrapper.eq(OrderAuctionBond::getDelFlag,0);
         List<OrderAuctionBond> list = iOrderAuctionBondService.list(wrapper);
         return R.ok(list);
@@ -141,7 +144,8 @@
         LambdaQueryWrapper<OrderAuctionBond> wrapper= Wrappers.lambdaQuery();
         wrapper.eq(OrderAuctionBond::getMemberId,memberAuctionSalesroomBondDTO.getMemberId());
         wrapper.eq(OrderAuctionBond::getAuctionGoodsId,memberAuctionSalesroomBondDTO.getAuctionGoodsId());
-        wrapper.eq(OrderAuctionBond::getBoundStatus,1);
+        wrapper.eq(OrderAuctionBond::getBondType,1);
+        wrapper.eq(OrderAuctionBond::getBoundStatus,2);
         wrapper.eq(OrderAuctionBond::getDelFlag,0);
         OrderAuctionBond one = iOrderAuctionBondService.getOne(wrapper);
         return R.ok(one);
@@ -156,6 +160,7 @@
         LambdaQueryWrapper<OrderAuctionBond> wrapper= Wrappers.lambdaQuery();
         wrapper.eq(OrderAuctionBond::getMemberId,memberAuctionSalesroomBondDTO.getMemberId());
         wrapper.eq(OrderAuctionBond::getAuctionSalesroomId,memberAuctionSalesroomBondDTO.getAuctionSalesroomId());
+        wrapper.eq(OrderAuctionBond::getBondType,2);
         wrapper.eq(OrderAuctionBond::getBoundStatus,2);
         wrapper.eq(OrderAuctionBond::getDelFlag,0);
         OrderAuctionBond one = iOrderAuctionBondService.getOne(wrapper);
@@ -184,9 +189,9 @@
 
     }
 
-    @GetMapping("/refund-bond/{id}")
-    public R<?> returnBondByAuctionGoodsId(@PathVariable("id") Long id) {
-        iOrderAuctionBondService.returnBondByAuctionGoodsId(id);
+    @GetMapping("/refund-bond")
+    public R<?> returnBondByAuctionGoodsId(@RequestBody BondReturnDTO bondReturnDTO) {
+        iOrderAuctionBondService.returnBondByAuctionGoodsId(bondReturnDTO);
         return R.ok();
     }
     

--
Gitblit v1.7.1