From 2a97ecf8833f24dfbd5bf251e1fc1bdb632bbefb Mon Sep 17 00:00:00 2001
From: mitao <2763622819@qq.com>
Date: 星期一, 29 七月 2024 18:51:22 +0800
Subject: [PATCH] 修改bug
---
ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/inner/InnerOrderAuctionBondController.java | 46 ++++++++++++++++++++++++++++++++++++----------
1 files changed, 36 insertions(+), 10 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 3a81973..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
@@ -10,14 +10,25 @@
import com.ruoyi.common.security.annotation.InnerAuth;
import com.ruoyi.order.service.IOrderAuctionBondService;
import com.ruoyi.system.api.domain.OrderAuctionBond;
-import com.ruoyi.system.api.domain.dto.*;
-
+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;
+import com.ruoyi.system.api.domain.vo.PayInfoVO;
import java.util.List;
import javax.annotation.Resource;
-
-import com.ruoyi.system.api.domain.vo.PayInfoVO;
import org.apache.poi.ss.formula.functions.T;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestHeader;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.RestController;
/**
* <p>
@@ -85,7 +96,7 @@
* @param bondStatusEnum 保证金状态
*/
@InnerAuth
- @PutMapping
+ @PutMapping("/updateOrderAuctionBondStatus")
R<?> updateOrderAuctionBondStatus(@RequestParam("ids") List<Long> ids,
@RequestParam("bondStatusEnum") BondStatusEnum bondStatusEnum) {
iOrderAuctionBondService.updateOrderAuctionBondStatus(ids, bondStatusEnum);
@@ -97,10 +108,15 @@
@ResponseBody
public R<List<OrderAuctionBond>> getOrderAuctionBondList1(@RequestBody MemberAuctionSalesroomDTO memberAuctionSalesroomDTO) {
LambdaQueryWrapper<OrderAuctionBond> wrapper= Wrappers.lambdaQuery();
- wrapper.eq(OrderAuctionBond::getMemberId,memberAuctionSalesroomDTO.getMemberId());
- wrapper.eq(OrderAuctionBond::getAuctionSalesroomId,memberAuctionSalesroomDTO.getAuctionSalesroomId());
+ 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);
@@ -112,8 +128,10 @@
public R<List<OrderAuctionBond>> getAuctionGoodsOrderAuctionBondList(@RequestBody AuctionGoodsListDTO auctionGoodsListDTO) {
LambdaQueryWrapper<OrderAuctionBond> wrapper= Wrappers.lambdaQuery();
wrapper.eq(OrderAuctionBond::getMemberId,auctionGoodsListDTO.getMemberId());
+ 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);
@@ -126,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);
@@ -141,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);
@@ -168,5 +188,11 @@
return R.ok();
}
+
+ @GetMapping("/refund-bond")
+ public R<?> returnBondByAuctionGoodsId(@RequestBody BondReturnDTO bondReturnDTO) {
+ iOrderAuctionBondService.returnBondByAuctionGoodsId(bondReturnDTO);
+ return R.ok();
+ }
}
--
Gitblit v1.7.1