rentaiming
2024-07-30 96397396303313c08e0ca91888337b71ecfe05ae
修改bug
5个文件已修改
210 ■■■■■ 已修改文件
ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/domain/AuctionBrowseRecord.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionBrowseRecordServiceImpl.java 167 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionGoodsServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionSalesroomGoodsServiceImpl.java 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionSalesroomServiceImpl.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/domain/AuctionBrowseRecord.java
@@ -66,4 +66,8 @@
    @TableLogic
    private Integer delFlag;
    @ApiModelProperty(value = "商品名称")
    private String skuName;
}
ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionBrowseRecordServiceImpl.java
@@ -4,7 +4,9 @@
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.domain.AuctionBondJl;
import com.ruoyi.auction.domain.AuctionBrowseRecord;
import com.ruoyi.auction.mapper.AuctionBondJlMapper;
import com.ruoyi.auction.mapper.AuctionBrowseRecordMapper;
import com.ruoyi.auction.mapper.AuctionGoodsMapper;
import com.ruoyi.auction.mapper.AuctionSalesroomMapper;
@@ -59,9 +61,17 @@
    @Resource
    private AuctionGoodsMapper auctionGoodsMapper;
    @Resource
    private AuctionBondJlMapper auctionBondJlMapper;
    @Override
    public PageDTO<AuctionGoodsListVO> getWdAuctionBrowseRecordList(AuctionGoodsListDTO auctionGoodsListDTO) {
        Page<AuctionBrowseRecord> page = new Page<>();
        page.setSize(auctionGoodsListDTO.getPageSize());
        page.setCurrent(auctionGoodsListDTO.getPageCurr());
        LocalDateTime now = LocalDateTime.now();
        LocalDateTime newTime7 = now.minusDays(7);
        LambdaQueryWrapper<AuctionBrowseRecord> wrapper3= Wrappers.lambdaQuery();
@@ -70,62 +80,38 @@
        wrapper3.eq(AuctionBrowseRecord::getMemberId,auctionGoodsListDTO.getMemberId());
        wrapper3.ge(AuctionBrowseRecord::getCreateTime, newTime7)
                .le(AuctionBrowseRecord::getCreateTime, now);
        Set<Long> goodsSkuIdList = new HashSet<>();
        List<AuctionBrowseRecord> list = this.list(wrapper3);
        for (AuctionBrowseRecord auctionBrowseRecord:list){
            goodsSkuIdList.add(auctionBrowseRecord.getTargetId());
        }
        Set<Long> goodsSkuIdList1 = null;
        if (StringUtils.isNotEmpty(auctionGoodsListDTO.getGoodsSkuName())) {
            List<GoodsSku> goodsSku = goodsSkuClient.getGoodsByName(auctionGoodsListDTO.getGoodsSkuName(),
                            SecurityConstants.INNER)
                    .getData();
            goodsSkuIdList1 = goodsSku.stream().map(GoodsSku::getId)
            wrapper3.like(AuctionBrowseRecord::getSkuName,auctionGoodsListDTO.getGoodsSkuName());
        }
        Set<Long> goodsSkuIdList = null;
        if (auctionGoodsListDTO.getStartStatus()!=4){
            LambdaQueryWrapper<AuctionGoods> wrapper=Wrappers.lambdaQuery();
            wrapper.eq(AuctionGoods::getStartStatus,auctionGoodsListDTO.getStartStatus());
            wrapper.eq(AuctionGoods::getDelFlag,0);
            List<AuctionGoods> auctionSalesrooms = auctionGoodsMapper.selectList(wrapper);
            goodsSkuIdList = auctionSalesrooms.stream().map(AuctionGoods::getId)
                    .collect(Collectors.toSet());
        }
        Set<Long> goodsSkuIdList3 =new HashSet<>();
        if (StringUtils.isNotEmpty(goodsSkuIdList1)){
            for (Long i:goodsSkuIdList1){
                LambdaQueryWrapper<AuctionGoods> wrapper= Wrappers.lambdaQuery();
                wrapper.eq(AuctionGoods::getGoodsSkuId,i);
                wrapper.eq(AuctionGoods::getDelFlag,0);
                List<AuctionGoods> auctionGoods = auctionGoodsMapper.selectList(wrapper);
                for (AuctionGoods a:auctionGoods){
                    goodsSkuIdList3.add(a.getId());
                }
            }
        }
        Set<Long> goodsSkuIdList2 =new HashSet<>();
        if (StringUtils.isNotEmpty(auctionGoodsListDTO.getGoodsSkuName())) {
            if (goodsSkuIdList3.size() > 0) {
                goodsSkuIdList2 = goodsSkuIdList.stream()
                        .filter(goodsSkuIdList3::contains)
                        .collect(Collectors.toSet());
        if (auctionGoodsListDTO.getStartStatus()!=4) {
            if (goodsSkuIdList != null) {
                wrapper3.in(AuctionBrowseRecord::getTargetId,goodsSkuIdList);
            } else {
               goodsSkuIdList2.add(0L);;
                goodsSkuIdList = new HashSet<>();
                goodsSkuIdList.add(0L);
                wrapper3.in(AuctionBrowseRecord::getTargetId,goodsSkuIdList);
            }
        }else{
            goodsSkuIdList2=goodsSkuIdList;
        }
        Page<AuctionGoodsListVO> page = new Page<>();
        page.setSize(auctionGoodsListDTO.getPageSize());
        page.setCurrent(auctionGoodsListDTO.getPageCurr());
        AuctionGoodsListPageDTO auctionGoodsListPageDTO=new AuctionGoodsListPageDTO();
        if (goodsSkuIdList2.size()>0){
            auctionGoodsListPageDTO.setGoodsSkuIdList(goodsSkuIdList2);
        }else{
            goodsSkuIdList2.add(0L);
            auctionGoodsListPageDTO.setGoodsSkuIdList(goodsSkuIdList2);
        }
        List<AuctionGoods> auctionGoodsPgeList = auctionGoodsMapper.getAuctionGoodsPgeList1(page, auctionGoodsListPageDTO);
        wrapper3.orderByDesc(AuctionBrowseRecord::getCreateTime);
        Page<AuctionBrowseRecord> page1 = this.page(page, wrapper3);
        PageDTO<AuctionGoodsListVO> articleCommentsVOPageDTO = PageDTO.of(page1, AuctionGoodsListVO.class);
        List<AuctionGoodsListVO> auctionGoodsPgeList = articleCommentsVOPageDTO.getList();
        List<AuctionGoodsListVO> auctionGoodsVOS=new ArrayList<>();
        for (AuctionGoods auctionGoods:auctionGoodsPgeList){
            AuctionGoodsListVO auctionGoodsVO=new AuctionGoodsListVO();
        for (AuctionGoodsListVO auctionGoodsVO:auctionGoodsPgeList){
            AuctionGoods   auctionGoods =auctionGoodsMapper.selectById(auctionGoodsVO.getTargetId());
            auctionGoodsVO.setAuctionStock(auctionGoods.getAuctionStock());
            auctionGoodsVO.setGoodsSkuId(auctionGoods.getId());
            auctionGoodsVO.setEndTime(auctionGoods.getEndTime());
@@ -143,15 +129,29 @@
            auctionGoodsVO.setDetail(goodsSkuOne.getDetail());
            auctionGoodsVOS.add(auctionGoodsVO);
        }
        page.setRecords(auctionGoodsVOS);
        return PageDTO.of(page);
        return articleCommentsVOPageDTO;
    }
    @Override
    public PageDTO<WdMemberAuctionSalesroomVO> getWdAuctionSalesroomBrowseRecordList(MemberAuctionSalesroomDTO MemberAuctionSalesroomDTO) {
        Set<Long> goodsSkuIdList = null;
        if (MemberAuctionSalesroomDTO.getStatus()!=4){
            LambdaQueryWrapper<AuctionSalesroom> wrapper=Wrappers.lambdaQuery();
            wrapper.eq(AuctionSalesroom::getStatus,MemberAuctionSalesroomDTO.getStatus());
            wrapper.eq(AuctionSalesroom::getDelFlag,0);
            List<AuctionSalesroom> auctionSalesrooms = auctionSalesroomMapper.selectList(wrapper);
            goodsSkuIdList = auctionSalesrooms.stream().map(AuctionSalesroom::getId)
                            .collect(Collectors.toSet());
        }
        LocalDateTime now = LocalDateTime.now();
        LocalDateTime newTime7 = now.minusDays(7);
        Page<AuctionBrowseRecord> page = new Page<>();
        page.setSize(MemberAuctionSalesroomDTO.getPageSize());
        page.setCurrent(MemberAuctionSalesroomDTO.getPageCurr());
        LambdaQueryWrapper<AuctionBrowseRecord> wrapper3= Wrappers.lambdaQuery();
        wrapper3.eq(AuctionBrowseRecord::getDelFlag,0);
        wrapper3.eq(AuctionBrowseRecord::getMemberId,MemberAuctionSalesroomDTO.getMemberId());
@@ -159,48 +159,55 @@
        wrapper3.ge(AuctionBrowseRecord::getCreateTime, newTime7)
                .le(AuctionBrowseRecord::getCreateTime, now);
        List<AuctionBrowseRecord> list = this.list(wrapper3);
        Set<Long> goodsSkuIdList = null;
        goodsSkuIdList = list.stream().map(AuctionBrowseRecord::getTargetId)
                .collect(Collectors.toSet());
        Page<AuctionSalesroom> page = new Page<>();
        page.setSize(MemberAuctionSalesroomDTO.getPageSize());
        page.setCurrent(MemberAuctionSalesroomDTO.getPageCurr());
        MemberAuctionSalesroomWdDTO memberAuctionSalesroomWdDTO=new MemberAuctionSalesroomWdDTO();
        if (goodsSkuIdList.size()>0){
            memberAuctionSalesroomWdDTO.setGoodsSkuIdList(goodsSkuIdList);
        }else{
            goodsSkuIdList=new HashSet<>();
            goodsSkuIdList.add(0L);
            memberAuctionSalesroomWdDTO.setGoodsSkuIdList(goodsSkuIdList);
        if (MemberAuctionSalesroomDTO.getStatus()!=4) {
            if (goodsSkuIdList != null) {
                wrapper3.in(AuctionBrowseRecord::getTargetId,goodsSkuIdList);
            } else {
                goodsSkuIdList = new HashSet<>();
                goodsSkuIdList.add(0L);
                wrapper3.in(AuctionBrowseRecord::getTargetId,goodsSkuIdList);
            }
        }
        memberAuctionSalesroomWdDTO.setSalesroomName(MemberAuctionSalesroomDTO.getSalesroomName());
        Page<AuctionSalesroom> auctionSalesroomList=auctionSalesroomMapper.pageMemberAuctionSalesroomWdList(page,memberAuctionSalesroomWdDTO);
        PageDTO<WdMemberAuctionSalesroomVO> wdMemberAuctionSalesroomVOPageDTO = PageDTO.of(auctionSalesroomList, WdMemberAuctionSalesroomVO.class);
        List<WdMemberAuctionSalesroomVO> list1 = wdMemberAuctionSalesroomVOPageDTO.getList();
        for (WdMemberAuctionSalesroomVO auctionSalesroom:list1){
            auctionSalesroom.setSalesroomName(auctionSalesroom.getSalesroomName());
            auctionSalesroom.setDescription(auctionSalesroom.getDescription());
            auctionSalesroom.setStatus(auctionSalesroom.getStatus());
            auctionSalesroom.setSalesroomId(auctionSalesroom.getId());
            auctionSalesroom.setId(auctionSalesroom.getId());
            auctionSalesroom.setCoverPic(auctionSalesroom.getCoverPic());
        wrapper3.orderByDesc(AuctionBrowseRecord::getCreateTime);
        if (MemberAuctionSalesroomDTO.getSalesroomName()!=null){
            wrapper3.like(AuctionBrowseRecord::getSkuName,MemberAuctionSalesroomDTO.getSalesroomName());
        }
        Page<AuctionBrowseRecord> page1 = this.page(page, wrapper3);
        PageDTO<WdMemberAuctionSalesroomVO> articleCommentsVOPageDTO = PageDTO.of(page1, WdMemberAuctionSalesroomVO.class);
        List<WdMemberAuctionSalesroomVO> list1 = articleCommentsVOPageDTO.getList();
        for (WdMemberAuctionSalesroomVO auctionSalesroom1:list1){
            AuctionSalesroom auctionSalesroom = auctionSalesroomMapper.selectById(auctionSalesroom1.getTargetId());
            auctionSalesroom1.setSalesroomName(auctionSalesroom.getSalesroomName());
            auctionSalesroom1.setDescription(auctionSalesroom.getDescription());
            auctionSalesroom1.setStatus(auctionSalesroom.getStatus().getCode());
            auctionSalesroom1.setSalesroomId(auctionSalesroom.getId());
            auctionSalesroom1.setId(auctionSalesroom.getId());
            auctionSalesroom1.setCoverPic(auctionSalesroom.getCoverPic());
            MemberAuctionSalesroomDTO memberAuctionSalesroomDTO1=new MemberAuctionSalesroomDTO();
            memberAuctionSalesroomDTO1.setAuctionSalesroomId(auctionSalesroom.getId());
            memberAuctionSalesroomDTO1.setMemberId(MemberAuctionSalesroomDTO.getMemberId());
            List<OrderAuctionBond> data1 = orderClient.getOrderAuctionBondList1(memberAuctionSalesroomDTO1, SecurityConstants.INNER).getData();
            if (data1.size()>0){
                auctionSalesroom.setIsBond(2);
                auctionSalesroom1.setIsBond(2);
            }else{
                auctionSalesroom.setIsBond(1);
                auctionSalesroom1.setIsBond(1);
            }
            MemberAuctionSalesroomDTO memberAuctionSalesroomDTO2=new MemberAuctionSalesroomDTO();
            memberAuctionSalesroomDTO2.setAuctionSalesroomId(auctionSalesroom.getId());
            List<OrderAuctionBond> data2 = orderClient.getOrderAuctionBondList1(memberAuctionSalesroomDTO2, SecurityConstants.INNER).getData();
            auctionSalesroom.setBondNum(data2.size());
            auctionSalesroom.setBond(auctionSalesroom.getBond());
            LambdaQueryWrapper<AuctionBondJl> wrapper1=Wrappers.lambdaQuery();
            wrapper1.eq(AuctionBondJl::getAuctionSalesroomId,auctionSalesroom.getId());
            wrapper1.eq(AuctionBondJl::getBondType,2);
            wrapper1.eq(AuctionBondJl::getIsState,0);
            java.util.List<AuctionBondJl> auctionBondJls = auctionBondJlMapper.selectList(wrapper1);
            auctionSalesroom1.setBondNum(auctionBondJls.size());
            auctionSalesroom1.setBond(auctionSalesroom.getBond());
        }
        return wdMemberAuctionSalesroomVOPageDTO;
        return articleCommentsVOPageDTO;
    }
}
ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionGoodsServiceImpl.java
@@ -609,6 +609,7 @@
            AuctionBrowseRecord auctionBrowseRecord=new AuctionBrowseRecord();
            auctionBrowseRecord.setBrowseType(AuctionOrderTypeEnum.REGULAR_ITEMS);
            auctionBrowseRecord.setMemberId(auctionGoodsListDTO.getMemberId());
            auctionBrowseRecord.setSkuName(goodsSkuOne.getSkuName());
            auctionBrowseRecord.setTargetId(auctionGoodsListDTO.getGoodsSkuId());
            iAuctionBrowseRecordService.save(auctionBrowseRecord);
        }
ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionSalesroomGoodsServiceImpl.java
@@ -7,8 +7,10 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.collect.Lists;
import com.ruoyi.auction.domain.AuctionBidRecord;
import com.ruoyi.auction.domain.AuctionBondJl;
import com.ruoyi.auction.domain.AuctionSalesroomGoods;
import com.ruoyi.auction.mapper.AuctionBidRecordMapper;
import com.ruoyi.auction.mapper.AuctionBondJlMapper;
import com.ruoyi.auction.mapper.AuctionSalesroomGoodsMapper;
import com.ruoyi.auction.mapper.AuctionSalesroomMapper;
import com.ruoyi.auction.service.IAuctionBrowseRecordService;
@@ -78,6 +80,10 @@
    @Resource
    private IAuctionSalesroomService  iAuctionSalesroomService;
    @Resource
    private AuctionBondJlMapper auctionBondJlMapper;
    private static final ObjectMapper objectMapper = new ObjectMapper();
@@ -196,6 +202,7 @@
            wrapper.eq(AuctionSalesroomGoods::getDelFlag,0);
            wrapper.eq(AuctionSalesroomGoods::getBackupStatus,false);
            wrapper.eq(AuctionSalesroomGoods::getAuctionSalesroomId,ationSalesroomGoodsDTO.getAuctionSalesroomId());
            wrapper.orderByAsc(AuctionSalesroomGoods::getSortNum);
            wrapper.last("limit 1");
            AuctionSalesroomGoods auctionSalesroomGoods = this.getOne(wrapper);
            ForepartAuctionSalesroomGoodsVO currentAuctionSalesroomGoods=  new ForepartAuctionSalesroomGoodsVO();
@@ -218,7 +225,7 @@
            wrapper1.eq(AuctionSalesroomGoods::getBackupStatus,false);
            wrapper1.eq(AuctionSalesroomGoods::getAuctionSalesroomId,ationSalesroomGoodsDTO.getAuctionSalesroomId());
            if (auctionSalesroomGoods!=null) {
                wrapper1.eq(AuctionSalesroomGoods::getSortNum, auctionSalesroomGoods.getSortNum() + 1);
                wrapper1.eq(AuctionSalesroomGoods::getSortNum, auctionSalesroomGoods.getSortNum() - 1);
            }else{
                LambdaQueryWrapper<AuctionSalesroomGoods> wrappers=Wrappers.lambdaQuery();
@@ -226,7 +233,7 @@
                wrappers.eq(AuctionSalesroomGoods::getDelFlag,0);
                wrappers.eq(AuctionSalesroomGoods::getBackupStatus,false);
                wrappers.eq(AuctionSalesroomGoods::getAuctionSalesroomId,ationSalesroomGoodsDTO.getAuctionSalesroomId());
                wrappers.orderByAsc(AuctionSalesroomGoods::getSortNum);
                wrappers.orderByDesc(AuctionSalesroomGoods::getSortNum);
                wrappers.last("limit 1");
                AuctionSalesroomGoods auctionSalesroomGoodss = this.getOne(wrappers);
                if (auctionSalesroomGoodss!=null){
@@ -267,7 +274,7 @@
            }
            wrapper2.eq(AuctionSalesroomGoods::getAuctionSalesroomId,ationSalesroomGoodsDTO.getAuctionSalesroomId());
            wrapper2.orderByAsc(AuctionSalesroomGoods::getStatus);
            wrapper2.orderByAsc(AuctionSalesroomGoods::getSortNum);
            wrapper2.orderByDesc(AuctionSalesroomGoods::getSortNum);
            wrapper2.eq(AuctionSalesroomGoods::getBackupStatus,false);
            List<AuctionSalesroomGoods> auctionSalesroomGoods2 = this.list(wrapper2);
            for (AuctionSalesroomGoods salesroomGoods:auctionSalesroomGoods2){
@@ -593,6 +600,18 @@
        AuctionSalesroomGoodsInfoVO.setSpec(goodsSku.getSpec());
        AuctionSalesroomGoodsInfoVO.setSpecUnit(goodsSku.getSpecUnit());
        LambdaQueryWrapper<AuctionBondJl> wrapper=Wrappers.lambdaQuery();
        wrapper.eq(AuctionBondJl::getAuctionSalesroomId,byId.getId());
        wrapper.eq(AuctionBondJl::getMemberId,auctionSalesroomGoodsInfoDTO.getMemberId());
        wrapper.eq(AuctionBondJl::getIsState,0);
        AuctionBondJl auctionBondJl = auctionBondJlMapper.selectOne(wrapper);
        if (auctionBondJl!=null){
            AuctionSalesroomGoodsInfoVO.setIsApply(2);
        }else{
            AuctionSalesroomGoodsInfoVO.setIsApply(1);
        }
        CustomConfig returnAddressUserName = sysUserClient.getconfig("MALL_ORDER_DESCRIPTION").getData();
        AuctionSalesroomGoodsInfoVO.setExplain(returnAddressUserName.getConfigValue());
        AuctionSalesroomGoodsInfoVO.setMinimumMarkupAmount(byId1.getMinimumMarkupAmount());
ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionSalesroomServiceImpl.java
@@ -414,11 +414,13 @@
           }else{
               memberAuctionSalesroomVO.setIsApply(1);
           }
            MemberAuctionSalesroomDTO memberAuctionSalesroomDTO1=new MemberAuctionSalesroomDTO();
            memberAuctionSalesroomDTO1.setAuctionSalesroomId(auctionSalesroom.getId());
            List<OrderAuctionBond> data1 = orderClient.getOrderAuctionBondList1(memberAuctionSalesroomDTO1, SecurityConstants.INNER).getData();
            if(data1!=null){
                memberAuctionSalesroomVO.setApplyNum(data1.size());
            LambdaQueryWrapper<AuctionBondJl> wrapper1=Wrappers.lambdaQuery();
            wrapper1.eq(AuctionBondJl::getAuctionSalesroomId,auctionSalesroom.getId());
            wrapper1.eq(AuctionBondJl::getBondType,2);
            wrapper1.eq(AuctionBondJl::getIsState,0);
            java.util.List<AuctionBondJl> auctionBondJls = auctionBondJlMapper.selectList(wrapper1);
            if(auctionBondJls!=null){
                memberAuctionSalesroomVO.setApplyNum(auctionBondJls.size());
            }else{
                memberAuctionSalesroomVO.setApplyNum(0);
@@ -552,6 +554,7 @@
            auctionBrowseRecord.setBrowseType(AuctionOrderTypeEnum.AUCTION_ITEMS);
            auctionBrowseRecord.setMemberId(memberAuctionSalesroomDTO.getMemberId());
            auctionBrowseRecord.setTargetId(memberAuctionSalesroomDTO.getAuctionSalesroomId());
            auctionBrowseRecord.setSkuName(byId.getSalesroomName());
            iAuctionBrowseRecordService.save(auctionBrowseRecord);
        }