KKSU
2023-12-13 15a7dff1dccdc515a5eed2eed76958261edf989c
微信小程序配置
1 files modified
49 ■■■■■ changed files
src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallProductServiceImpl.java 49 ●●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallProductServiceImpl.java
@@ -363,24 +363,41 @@
        );
        DateTime endTime = DateUtil.parseTime(endTimeDic.getValue());
        if(nowTime.compareTo(startTime) >= 0 && nowTime.compareTo(endTime) <= 0){
            //买单
            if(2 == orderType){
                IPage<ApiOrderListVo> page = new Page<>(apiOrderListDto.getPageNum(), apiOrderListDto.getPageSize());
                IPage<ApiOrderListVo> apiOrderListVoIPageBuy = mallProductBuyMapper.selectListInPage(page, apiOrderListDto);
                if(CollUtil.isNotEmpty(apiOrderListVoIPageBuy.getRecords())){
                    for(ApiOrderListVo apiOrderListVo : apiOrderListVoIPageBuy.getRecords()){
                        objects.add(apiOrderListVo);
                    }
//            //买单
//            if(2 == orderType){
//                IPage<ApiOrderListVo> page = new Page<>(apiOrderListDto.getPageNum(), apiOrderListDto.getPageSize());
//                IPage<ApiOrderListVo> apiOrderListVoIPageBuy = mallProductBuyMapper.selectListInPage(page, apiOrderListDto);
//                if(CollUtil.isNotEmpty(apiOrderListVoIPageBuy.getRecords())){
//                    for(ApiOrderListVo apiOrderListVo : apiOrderListVoIPageBuy.getRecords()){
//                        objects.add(apiOrderListVo);
//                    }
//                }
//            }
//            //卖单
//            if(1 == orderType){
//                IPage<ApiOrderListVo> page = new Page<>(apiOrderListDto.getPageNum(), apiOrderListDto.getPageSize());
//                IPage<ApiOrderListVo> apiOrderListVoIPageSell = mallProductSellMapper.selectListInPage(page, apiOrderListDto);
//                if(CollUtil.isNotEmpty(apiOrderListVoIPageSell.getRecords())){
//                    for(ApiOrderListVo apiOrderListVo : apiOrderListVoIPageSell.getRecords()){
//                        objects.add(apiOrderListVo);
//                    }
//                }
//            }
            IPage<ApiOrderListVo> pageBuy = new Page<>(apiOrderListDto.getPageNum(), apiOrderListDto.getPageSize());
            IPage<ApiOrderListVo> apiOrderListVoIPageBuy = mallProductBuyMapper.selectListInPage(pageBuy, apiOrderListDto);
            if(CollUtil.isNotEmpty(apiOrderListVoIPageBuy.getRecords())){
                for(ApiOrderListVo apiOrderListVo : apiOrderListVoIPageBuy.getRecords()){
                    objects.add(apiOrderListVo);
                }
            }
            //卖单
            if(1 == orderType){
                IPage<ApiOrderListVo> page = new Page<>(apiOrderListDto.getPageNum(), apiOrderListDto.getPageSize());
                IPage<ApiOrderListVo> apiOrderListVoIPageSell = mallProductSellMapper.selectListInPage(page, apiOrderListDto);
                if(CollUtil.isNotEmpty(apiOrderListVoIPageSell.getRecords())){
                    for(ApiOrderListVo apiOrderListVo : apiOrderListVoIPageSell.getRecords()){
                        objects.add(apiOrderListVo);
                    }
            IPage<ApiOrderListVo> pageSell = new Page<>(apiOrderListDto.getPageNum(), apiOrderListDto.getPageSize());
            IPage<ApiOrderListVo> apiOrderListVoIPageSell = mallProductSellMapper.selectListInPage(pageSell, apiOrderListDto);
            if(CollUtil.isNotEmpty(apiOrderListVoIPageSell.getRecords())){
                for(ApiOrderListVo apiOrderListVo : apiOrderListVoIPageSell.getRecords()){
                    objects.add(apiOrderListVo);
                }
            }
        }