From 1f3e9dc85399290910cde7149806323305544e0d Mon Sep 17 00:00:00 2001
From: mitao <2763622819@qq.com>
Date: 星期六, 20 七月 2024 19:17:23 +0800
Subject: [PATCH] 修改bug

---
 ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/controller/forepart/ForepartAuctionSalesroomController.java |   25 +++++++++++++++++++++++--
 1 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/controller/forepart/ForepartAuctionSalesroomController.java b/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/controller/forepart/ForepartAuctionSalesroomController.java
index c9da187..4b2eae0 100644
--- a/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/controller/forepart/ForepartAuctionSalesroomController.java
+++ b/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/controller/forepart/ForepartAuctionSalesroomController.java
@@ -1,6 +1,10 @@
 package com.ruoyi.auction.controller.forepart;
 
 
+import com.ruoyi.auction.mapper.AuctionGoodsMapper;
+import com.ruoyi.auction.service.IAuctionGoodsService;
+import com.ruoyi.common.core.exception.ServiceException;
+import com.ruoyi.system.api.domain.AuctionGoods;
 import com.ruoyi.system.api.domain.dto.AuctionSalesroomDTO;
 import com.ruoyi.system.api.domain.dto.ForepartAuctionBidRecordDTO;
 import com.ruoyi.auction.service.IAuctionSalesroomGoodsService;
@@ -23,6 +27,7 @@
 
 import org.springframework.web.bind.annotation.*;
 
+import java.time.LocalDateTime;
 import java.util.List;
 
 /**
@@ -44,6 +49,9 @@
 
     @Resource
     private IAuctionSalesroomGoodsService iAuctionSalesroomGoodsService;
+
+    @Resource
+    private AuctionGoodsMapper AuctionGoodsMapper;
 
     /**
      * 拍卖大屏获取拍卖信息
@@ -73,12 +81,17 @@
         return R.ok(iAuctionSalesroomService.getAuctionBidRecordOne(arepartAuctionBidRecordDTO));
     }
 
-   @PostMapping("/actionMiniLogin")
+    @PostMapping("/actionMiniLogin")
     @ApiOperation(value = "拍卖师端-第三方登陸")
     public R<AppMiniLoginVO> actionMiniLogin(@RequestBody AppMiniLoginDTO appMiniLoginDto) {
         return R.ok(iAuctionSalesroomService.actionMiniLogin(appMiniLoginDto));
     }
 
+    @PostMapping("/isMiniLogin")
+    @ApiOperation(value = "拍卖师端-判断是否是拍卖师")
+    public R<AppMiniLoginVO> isMiniLogin(@RequestBody AppMiniLoginDTO appMiniLoginDto) {
+        return R.ok(iAuctionSalesroomService.isMiniLogin(appMiniLoginDto));
+    }
 
    @PostMapping("/getMemberAuctionSalesroomList")
     @ApiOperation(value = "用户端-拍卖场信息列表")
@@ -101,7 +114,15 @@
    @PostMapping("/SaveSignUpNow")
     @ApiOperation(value = "用户端-拍卖立即报名")
     public R<PayInfoVO> SaveSignUpNow(@RequestBody MemberAuctionSalesroomBondDTO memberAuctionSalesroomBondDTO) {
-        return R.ok( iAuctionSalesroomService.SaveSignUpNow(memberAuctionSalesroomBondDTO));
+      if (memberAuctionSalesroomBondDTO.getBondType()==1){
+          AuctionGoods auctionGoods = AuctionGoodsMapper.selectById(memberAuctionSalesroomBondDTO.getAuctionGoodsId());
+          if (auctionGoods.getListingStatus().getCode()==1){
+              throw new ServiceException("商品拍卖下线");
+          }
+      }
+       PayInfoVO payInfoVO = iAuctionSalesroomService.SaveSignUpNow(memberAuctionSalesroomBondDTO);
+
+       return R.ok(payInfoVO);
     }
 
 

--
Gitblit v1.7.1