From 9c79ad34c11eb1a51e41ab62eb1e1d801f479398 Mon Sep 17 00:00:00 2001
From: mitao <2763622819@qq.com>
Date: 星期四, 30 五月 2024 19:44:20 +0800
Subject: [PATCH] 1.提交【管理后台】 拍卖场管理查看详情接口

---
 ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionGoodsServiceImpl.java |   43 ++++++++++++++++++++++---------------------
 1 files changed, 22 insertions(+), 21 deletions(-)

diff --git a/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionGoodsServiceImpl.java b/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionGoodsServiceImpl.java
index 2352ce6..9d07b61 100644
--- a/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionGoodsServiceImpl.java
+++ b/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionGoodsServiceImpl.java
@@ -4,16 +4,13 @@
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.auction.controller.forepart.vo.MemberAuctionSalesroomVO;
 import com.google.common.collect.Lists;
-import com.ruoyi.auction.controller.management.dto.AuctionGoodsDTO;
-import com.ruoyi.auction.controller.management.dto.AuctionGoodsQuery;
-import com.ruoyi.auction.controller.management.vo.AuctionBidRecordVO;
-import com.ruoyi.auction.controller.management.vo.AuctionGoodsVO;
+import com.ruoyi.auction.controller.management.dto.MgtAuctionGoodsDTO;
+import com.ruoyi.auction.controller.management.dto.MgtAuctionGoodsQuery;
+import com.ruoyi.auction.controller.management.vo.MgtAuctionBidRecordVO;
+import com.ruoyi.auction.controller.management.vo.MgtAuctionGoodsVO;
 import com.ruoyi.auction.domain.AuctionBidRecord;
 import com.ruoyi.auction.domain.MemberAuctionCollection;
-import com.ruoyi.common.core.domain.R;
-import com.ruoyi.system.api.domain.*;
 import com.ruoyi.auction.mapper.AuctionGoodsMapper;
 import com.ruoyi.auction.service.IAuctionBidRecordService;
 import com.ruoyi.auction.service.IAuctionGoodsService;
@@ -28,14 +25,18 @@
 import com.ruoyi.common.core.utils.page.BeanUtils;
 import com.ruoyi.common.core.utils.page.PageDTO;
 import com.ruoyi.system.api.domain.AuctionGoods;
-import com.ruoyi.system.api.domain.dto.*;
-import com.ruoyi.system.api.domain.dto.AuctionGoodsListDTO;
-import com.ruoyi.system.api.domain.dto.AuctionGoodsListPageDTO;
+import com.ruoyi.system.api.domain.GoodsBrand;
+import com.ruoyi.system.api.domain.GoodsCategory;
+import com.ruoyi.system.api.domain.GoodsFlavorType;
+import com.ruoyi.system.api.domain.GoodsSeries;
 import com.ruoyi.system.api.domain.GoodsSku;
 import com.ruoyi.system.api.domain.Member;
 import com.ruoyi.system.api.domain.MemberAddress;
 import com.ruoyi.system.api.domain.OrderAuctionBond;
+import com.ruoyi.system.api.domain.dto.AuctionGoodsListDTO;
+import com.ruoyi.system.api.domain.dto.AuctionGoodsListPageDTO;
 import com.ruoyi.system.api.domain.dto.GoodsStockUpdDTO;
+import com.ruoyi.system.api.domain.dto.MemberAuctionSalesroomDTO;
 import com.ruoyi.system.api.domain.dto.OrderDTO;
 import com.ruoyi.system.api.domain.dto.RefundDTO;
 import com.ruoyi.system.api.domain.vo.AuctionGoodsListVO;
@@ -51,12 +52,11 @@
 import java.util.Objects;
 import java.util.Set;
 import java.util.stream.Collectors;
+import javax.annotation.Resource;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
-
-import javax.annotation.Resource;
 
 /**
  * <p>
@@ -92,7 +92,7 @@
      * @return PageDTO<AuctionGoodsVO>
      */
     @Override
-    public PageDTO<AuctionGoodsVO> getAuctionGoodsPage(AuctionGoodsQuery query) {
+    public PageDTO<MgtAuctionGoodsVO> getAuctionGoodsPage(MgtAuctionGoodsQuery query) {
         Set<Long> goodsSkuIdList = null;
         if (StringUtils.isNotEmpty(query.getGoodsSkuName())) {
             List<GoodsSku> goodsSku = goodsSkuClient.getGoodsByName(query.getGoodsSkuName(),
@@ -114,13 +114,13 @@
                 .eq(StringUtils.isNotNull(query.getStartStatus()), AuctionGoods::getStartStatus,
                         query.getStartStatus())
                 .page(new Page<>(query.getPageCurr(), query.getPageSize()));
-        return PageDTO.of(page, AuctionGoodsVO.class);
+        return PageDTO.of(page, MgtAuctionGoodsVO.class);
     }
 
     @Override
     @Transactional
     @GlobalTransactional(rollbackFor = Exception.class)
-    public void saveAuctionGoods(AuctionGoodsDTO dto) {
+    public void saveAuctionGoods(MgtAuctionGoodsDTO dto) {
         Long id = dto.getId();
         Long goodsSkuId = dto.getGoodsSkuId();
         AuctionGoods auctionGoods = BeanUtils.copyBean(dto, AuctionGoods.class);
@@ -192,12 +192,13 @@
      * @return AuctionGoodsVO
      */
     @Override
-    public AuctionGoodsVO getAuctionGoodsById(Long id) {
+    public MgtAuctionGoodsVO getAuctionGoodsById(Long id) {
         AuctionGoods auctionGoods = this.getById(id);
         if (StringUtils.isNull(auctionGoods)) {
             throw new ServiceException("拍卖商品不存在");
         }
-        AuctionGoodsVO auctionGoodsVO = BeanUtils.copyBean(auctionGoods, AuctionGoodsVO.class);
+        MgtAuctionGoodsVO auctionGoodsVO = BeanUtils.copyBean(auctionGoods,
+                MgtAuctionGoodsVO.class);
         if (!auctionGoods.getStartStatus().equals(AuctionStartStatusEnum.IN_PREVIEW)) {
             List<AuctionBidRecord> list = auctionBidRecordService.lambdaQuery()
                     .eq(AuctionBidRecord::getTargetId, auctionGoodsVO.getId())
@@ -210,13 +211,13 @@
                         getMemberListByIds(collect, SecurityConstants.INNER).getData();
                 Map<Long, String> memberMap = memberList.stream()
                         .collect(Collectors.toMap(Member::getId, Member::getNickname));
-                List<AuctionBidRecordVO> auctionBidRecordVOS = BeanUtils.copyList(list,
-                        AuctionBidRecordVO.class);
-                for (AuctionBidRecordVO vo : auctionBidRecordVOS) {
+                List<MgtAuctionBidRecordVO> mgtAuctionBidRecordVOS = BeanUtils.copyList(list,
+                        MgtAuctionBidRecordVO.class);
+                for (MgtAuctionBidRecordVO vo : mgtAuctionBidRecordVOS) {
                     String memberName = memberMap.get(vo.getMemberId());
                     vo.setMemberName(StringUtils.isNotEmpty(memberName) ? memberName : "");
                 }
-                auctionGoodsVO.setRecordList(auctionBidRecordVOS);
+                auctionGoodsVO.setRecordList(mgtAuctionBidRecordVOS);
             }
         }
         return auctionGoodsVO;

--
Gitblit v1.7.1