From 72401cca1d42db78aa25fc10758195b52dfcef96 Mon Sep 17 00:00:00 2001 From: mitao <2763622819@qq.com> Date: 星期三, 29 五月 2024 15:03:17 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionSalesroomServiceImpl.java | 56 +++++++++++++++++++++++++++++--------------------------- 1 files changed, 29 insertions(+), 27 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 51c8790..4a89185 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 @@ -16,7 +16,8 @@ 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.dto.MemberAuctionSalesroomDTO; +import com.ruoyi.system.api.domain.OrderAuctionBond; +import com.ruoyi.system.api.domain.dto.MemberAuctionSalesroomDTO; import com.ruoyi.auction.controller.forepart.vo.ForepartAuctionSalesroomGoodsVO; import com.ruoyi.auction.controller.forepart.vo.ForepartAuctionSalesroomVO; import com.ruoyi.auction.controller.forepart.vo.MemberAuctionSalesroomInfoVO; @@ -31,13 +32,12 @@ import com.ruoyi.common.core.utils.StringUtils; import com.ruoyi.common.core.utils.page.PageDTO; import com.ruoyi.auction.util.HttpUtils; -import com.ruoyi.system.api.constants.SecurityConstant; import com.ruoyi.system.api.domain.AppMiniLoginVO; import com.ruoyi.system.api.domain.GoodsSku; -import com.ruoyi.system.api.domain.Member; import com.ruoyi.system.api.domain.SysUser; import com.ruoyi.system.api.domain.dto.AppMiniLoginDTO; import com.ruoyi.system.api.feignClient.GoodsSkuClient; +import com.ruoyi.system.api.feignClient.OrderClient; import com.ruoyi.system.api.feignClient.SysUserClient; import javax.annotation.Resource; @@ -50,9 +50,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.concurrent.TimeUnit; - -import static com.ruoyi.member.service.impl.MemberServiceImpl.getAccessTokenByWX; /** * <p> @@ -83,13 +80,13 @@ private WxMaService wxMaService; @Resource - private IMemberBondService memberBondService; - - @Resource private AuctionSalesroomGoodsMapper auctionSalesroomGoodsMapper; @Resource private GoodsSkuClient goodsSkuClient; + + @Resource + private OrderClient orderClient; //微信 @@ -293,21 +290,16 @@ memberAuctionSalesroomVO.setStatus(auctionSalesroom.getStatus().getCode()); memberAuctionSalesroomVO.setSalesroomId(auctionSalesroom.getId()); memberAuctionSalesroomVO.setCoverPic(auctionSalesroom.getCoverPic()); - LambdaQueryWrapper<MemberBond> wrapper=Wrappers.lambdaQuery(); - wrapper.eq(MemberBond::getMemberId,memberAuctionSalesroomDTO.getMemberId()); - wrapper.eq(MemberBond::getAuctionRoomId,auctionSalesroom.getId()); - wrapper.eq(MemberBond::getDelFlag,0); - List<MemberBond> list = memberBondService.list(wrapper); - if (list.size()>0){ + List<OrderAuctionBond> data = orderClient.getOrderAuctionBondList(memberAuctionSalesroomDTO, SecurityConstants.INNER).getData(); + if (data.size()>0){ memberAuctionSalesroomVO.setIsApply(2); }else{ memberAuctionSalesroomVO.setIsApply(1); } - LambdaQueryWrapper<MemberBond> wrapper1=Wrappers.lambdaQuery(); - wrapper1.eq(MemberBond::getAuctionRoomId,auctionSalesroom.getId()); - wrapper1.eq(MemberBond::getDelFlag,0); - List<MemberBond> list1 = memberBondService.list(wrapper1); - memberAuctionSalesroomVO.setApplyNum(list1.size()); + MemberAuctionSalesroomDTO memberAuctionSalesroomDTO1=new MemberAuctionSalesroomDTO(); + memberAuctionSalesroomDTO1.setAuctionSalesroomId(auctionSalesroom.getId()); + List<OrderAuctionBond> data1 = orderClient.getOrderAuctionBondList(memberAuctionSalesroomDTO1, SecurityConstants.INNER).getData(); + memberAuctionSalesroomVO.setApplyNum(data1.size()); List.add(memberAuctionSalesroomVO); } page.setRecords(List); @@ -330,12 +322,8 @@ memberAuctionSalesroomInfoVO.setStartTime(byId.getStartTime()); memberAuctionSalesroomInfoVO.setStatus(byId.getStatus()); memberAuctionSalesroomInfoVO.setCoverPic(byId.getCoverPic()); - LambdaQueryWrapper<MemberBond> wrapper=Wrappers.lambdaQuery(); - wrapper.eq(MemberBond::getMemberId,memberAuctionSalesroomDTO.getMemberId()); - wrapper.eq(MemberBond::getAuctionRoomId,byId.getId()); - wrapper.eq(MemberBond::getDelFlag,0); - List<MemberBond> list = memberBondService.list(wrapper); - if (list.size()>0){ + List<OrderAuctionBond> data = orderClient.getOrderAuctionBondList(memberAuctionSalesroomDTO, SecurityConstants.INNER).getData(); + if (data.size()>0){ memberAuctionSalesroomInfoVO.setIsApply(2); }else{ memberAuctionSalesroomInfoVO.setIsApply(1); @@ -358,7 +346,7 @@ LambdaQueryWrapper<AuctionBidRecord> wrapper1=Wrappers.lambdaQuery(); wrapper1.eq(AuctionBidRecord::getMemberId,memberAuctionSalesroomDTO.getMemberId()); wrapper1.eq(AuctionBidRecord::getAuctionSalesroomId,byId.getId()); - wrapper1.eq(AuctionBidRecord::getGoodsSkuId,salesroomGoods.getId()); + wrapper1.eq(AuctionBidRecord::getTargetId,salesroomGoods.getId()); wrapper1.eq(AuctionBidRecord::getDelFlag,0); AuctionBidRecord list1 = auctionBidRecordService.getOne(wrapper1); if (list1!=null){ @@ -378,6 +366,20 @@ return memberAuctionSalesroomInfoVO; } + @Override + public MemberAuctionSalesroomVO getMemberAuctionSalesroomSweep(MemberAuctionSalesroomDTO MemberAuctionSalesroomDTO) { + LambdaQueryWrapper<AuctionSalesroom> wrapper=Wrappers.lambdaQuery(); + wrapper.eq(AuctionSalesroom::getAuctionSalesroomNo,MemberAuctionSalesroomDTO.getSalesroomNO()); + wrapper.eq(AuctionSalesroom::getDelFlag,0); + AuctionSalesroom auctionSalesroom=iAuctionSalesroomService.getOne(wrapper); + MemberAuctionSalesroomVO memberAuctionSalesroomVO=new MemberAuctionSalesroomVO(); + memberAuctionSalesroomVO.setSalesroomName(auctionSalesroom.getSalesroomName()); + memberAuctionSalesroomVO.setStatus(auctionSalesroom.getStatus().getCode()); + memberAuctionSalesroomVO.setDescription(auctionSalesroom.getDescription()); + memberAuctionSalesroomVO.setSalesroomId(auctionSalesroom.getId()); + return memberAuctionSalesroomVO; + } + public static String getAccessTokenByWX() throws Exception { String host = ACCESS_TOKEN_HOST + "?appid=" + WX_APPID + "&secret=" + WX_SECRET + "&grant_type=client_credential"; -- Gitblit v1.7.1