From c26092c422c4b72fa5d51a38f6de1b48ab1ccd87 Mon Sep 17 00:00:00 2001 From: mitao <2763622819@qq.com> Date: 星期一, 27 五月 2024 15:53:36 +0800 Subject: [PATCH] 提交普通拍品、资讯文章、商城商品收藏基础代码 --- ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionSalesroomServiceImpl.java | 35 +++++++++++++++++++---------------- 1 files changed, 19 insertions(+), 16 deletions(-) diff --git a/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionSalesroomServiceImpl.java b/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionSalesroomServiceImpl.java index b421a8f..ba88837 100644 --- a/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionSalesroomServiceImpl.java +++ b/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionSalesroomServiceImpl.java @@ -2,21 +2,23 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; 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.dto.AuctionSalesroomGoodsDTO; import com.ruoyi.auction.controller.forepart.dto.ForepartAuctionBidRecordDTO; import com.ruoyi.auction.controller.forepart.vo.ForepartAuctionSalesroomVO; -import com.ruoyi.auction.domain.pojo.AuctionSalesroom; -import com.ruoyi.auction.domain.pojo.AuctionVideo; +import com.ruoyi.auction.domain.AuctionSalesroom; +import com.ruoyi.auction.domain.AuctionVideo; import com.ruoyi.auction.mapper.AuctionSalesroomMapper; import com.ruoyi.auction.service.IAuctionSalesroomService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ruoyi.auction.service.IAuctionVideoService; import com.ruoyi.common.core.domain.R; +import com.ruoyi.common.core.exception.ServiceException; +import com.ruoyi.common.core.utils.page.PageDTO; import com.ruoyi.system.api.domain.SysUser; import com.ruoyi.system.api.feignClient.SysUserClient; -import org.springframework.stereotype.Service; - import javax.annotation.Resource; -import java.util.List; +import org.springframework.stereotype.Service; /** * <p> @@ -39,22 +41,23 @@ @Override - public List<AuctionSalesroom> getAuctionBidRecordList(String salesroomName) { + public PageDTO<AuctionSalesroom> getAuctionBidRecordList(AuctionSalesroomGoodsDTO ationSalesroomGoodsDTO) { + Page<AuctionSalesroom> page = new Page<>(ationSalesroomGoodsDTO.getPageCurr(), ationSalesroomGoodsDTO.getPageSize()); LambdaQueryWrapper<AuctionSalesroom> wrapper=Wrappers.lambdaQuery(); - wrapper.eq(AuctionSalesroom::getSalesroomName,salesroomName); + wrapper.eq(AuctionSalesroom::getSalesroomName,ationSalesroomGoodsDTO.getSalesroomName()); wrapper.eq(AuctionSalesroom::getDelFlag,0); - List<AuctionSalesroom> auctionBidRecordList=iAuctionSalesroomService.list(wrapper); - return auctionBidRecordList; + Page<AuctionSalesroom> page1=iAuctionSalesroomService.page(page, wrapper); + return PageDTO.of(page1); } @Override - public ForepartAuctionSalesroomVO getBaaner(Integer SalesroomId) { + public ForepartAuctionSalesroomVO getBaaner(AuctionSalesroomGoodsDTO ationSalesroomGoodsDTO) { LambdaQueryWrapper<AuctionVideo> wrapper=Wrappers.lambdaQuery(); - wrapper.eq(AuctionVideo::getAuctionSalesroomId,SalesroomId); + wrapper.eq(AuctionVideo::getAuctionSalesroomId,ationSalesroomGoodsDTO.getAuctionSalesroomId()); wrapper.eq(AuctionVideo::getDelFlag,0); AuctionVideo auctionVideo=iAuctionVideoService.getOne(wrapper); ForepartAuctionSalesroomVO forepartAuctionSalesroomVO =new ForepartAuctionSalesroomVO(); - AuctionSalesroom auctionSalesroom=iAuctionSalesroomService.getById(SalesroomId); + AuctionSalesroom auctionSalesroom=iAuctionSalesroomService.getById(ationSalesroomGoodsDTO.getAuctionSalesroomId()); forepartAuctionSalesroomVO.setAuctionSalesroomStatus(auctionSalesroom.getStatus().getCode()); if (auctionVideo!=null){ forepartAuctionSalesroomVO.setUrl(auctionVideo.getPromotionVideoUrl()); @@ -70,15 +73,15 @@ SysUser sysUser=r.getData(); if (sysUser!=null){ - R.fail("手机号未注册"); + throw new ServiceException("手机号未注册"); } if (!sysUser.getPassword().equals(arepartAuctionBidRecordDTO.getPassword())){ - R.fail("密码输入错误"); + throw new ServiceException("密码输入错误"); } if (!sysUser.getUserType().equals("2")){ - R.fail("该人员不是拍卖师"); + throw new ServiceException("该人员不是拍卖师"); } LambdaQueryWrapper<AuctionSalesroom> wrapper=Wrappers.lambdaQuery(); -- Gitblit v1.7.1