yanghui
2022-11-29 156396675d099acac1f10b99e5451f68acd76616
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopFlowerOrderServiceImpl.java
@@ -387,6 +387,24 @@
                        orderVo.setComShopFlowerEvaluateVO(comShopFlowerEvaluateVO);
                    }
                }
                //判断是否可以退款 订单是否已超过15天 是否已有退款订单
                int count = comShopFlowerRefundOrderDAO.selectCountRefundNowByOrderId(orderVo.getOrderId());
                if (count > 0){
                    orderVo.setRefundable(2);
                }else {
                    if (null == orderVo.getReceivingTime()){
                        orderVo.setRefundable(2);
                    }else {
                        //收货时间往前推15天和当前时间做比较
                        Date date = DateUtils.addDay(orderVo.getReceivingTime(), 15);
                        if(date.before(new Date())){
                            orderVo.setRefundable(2);
                        }
                    }
                }
            });
        }
        return R.ok(orderPageVOIPage);
@@ -409,7 +427,7 @@
            //查询自提点信息
            ConvenientElevatingPointDO convenientElevatingPointDO = convenientElevatingPointDAO.selectOne(new LambdaQueryWrapper<ConvenientElevatingPointDO>().eq(ConvenientElevatingPointDO::getWechatAccount, phone));
            if (isNull(convenientElevatingPointDO)) {
                return R.fail("自提点不存在");
                return R.ok();
            }
            Long pointDOId = convenientElevatingPointDO.getId();
            shopOrderDO = this.baseMapper.selectOne(new LambdaQueryWrapper<ComShopFlowerOrderDO>().eq(ComShopFlowerOrderDO::getId, orderId).eq(ComShopFlowerOrderDO::getPointId, pointDOId));
@@ -988,7 +1006,7 @@
        Map<Integer, Integer> collect = comShopOrderCountVOS.stream().collect(Collectors.toMap(ComShopOrderCountVO::getStatus, ComShopOrderCountVO::getAmount));
        Map<String, Integer> retMap = new HashMap<>();
        int amountTotal = 0;
        for (int i = 0; i < statusStr.length; i++) {
        for (int i = 1; i <= statusStr.length; i++) {
            if (collect.containsKey(i)) {
                Integer amount = collect.get(i);
                amountTotal = amountTotal + amount;
@@ -1028,8 +1046,8 @@
        R r1 = this.selectCountByDeliveryType(ComShopFlowerOrderDO.deliveryType.express, userId);
        retMap.put("kdddStatus", r1.getData());
        //营业额
        List<ComShopOrderStoreIdCountVO> comShopOrderStoreIdCountVOS3 = this.baseMapper.selectSumAmountByStoreId(storeId);
        Map<String, Integer> yyeMap = comShopOrderStoreIdCountVOS3.stream().collect(Collectors.toMap(ComShopOrderStoreIdCountVO::getCountName, ComShopOrderStoreIdCountVO::getCountNum));
        List<ComShopOrderStoreIdNumVO> comShopOrderStoreIdCountVOS3 = this.baseMapper.selectSumAmountByStoreId(storeId);
        Map<String, BigDecimal> yyeMap = comShopOrderStoreIdCountVOS3.stream().collect(Collectors.toMap(ComShopOrderStoreIdNumVO::getCountName, ComShopOrderStoreIdNumVO::getCountNum));
        retMap.put("yye", yyeMap);
        //在售商品
        Integer countSale = comShopFlowerGoodsDAO.selectCountSaleByStoreId(storeId);