| | |
| | | // 生成订单号 |
| | | String orderNo = OrderNoUtils.NextOrderNo(userId); |
| | | // 配送方式 |
| | | Integer deliveryType = 0; |
| | | Integer deliveryType = 1; |
| | | // 订单总金额 |
| | | BigDecimal orderTotal = BigDecimal.ZERO; |
| | | // 创建订单商品信息 |
| | |
| | | continue; |
| | | } |
| | | storeId = goodsDO.getStoreId(); |
| | | deliveryType = goodsDO.getDeliveryType(); |
| | | deliveryType = orderCreateDTO.getDeliveryType(); |
| | | ComShopFlowerOrderGoodsDO orderGoodsDO = new ComShopFlowerOrderGoodsDO(); |
| | | orderGoodsDO.setGoodsId(goodsDO.getId()); |
| | | orderGoodsDO.setGoodsName(goodsDO.getName()); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R selectCountByDeliveryType(Integer deliveryType,Long storeId) { |
| | | public R selectCountByDeliveryType(Integer deliveryType,Long userId) { |
| | | //1.等待配送 2.配送中 3.待收货 4.待评价 5.已完成 6.已取消 7.已退款 8.总订单 |
| | | String[] statusStr = {"ddps","psz","dsh","dpj","ywc","yqx","ytk"}; |
| | | List<ComShopOrderCountVO> comShopOrderCountVOS = this.baseMapper.selectCountByDeliveryType(deliveryType,storeId); |
| | | ConvenientMerchantVO convenientMerchantVO = convenientMerchantDAO.selectMerchantByUserId(userId); |
| | | List<ComShopOrderCountVO> comShopOrderCountVOS = this.baseMapper.selectCountByDeliveryType(deliveryType,convenientMerchantVO.getId()); |
| | | Map<Integer, Integer> collect = comShopOrderCountVOS.stream().collect(Collectors.toMap(ComShopOrderCountVO::getStatus, ComShopOrderCountVO::getAmount)); |
| | | Map<String,Integer> retMap = new HashMap<>(); |
| | | int amountTotal = 0; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R selectCountByStoreId(Long storeId){ |
| | | public R selectCountByUserId(Long userId){ |
| | | ConvenientMerchantVO convenientMerchantVO = convenientMerchantDAO.selectMerchantByUserId(userId); |
| | | Long storeId = convenientMerchantVO.getId(); |
| | | Map<String,Object> retMap = new HashMap<>(); |
| | | //查询我的店铺订单量 |
| | | List<ComShopOrderStoreIdCountVO> comShopOrderStoreIdCountVOS = this.baseMapper.selectCountByStoreId(storeId, null); |
| | |
| | | retMap.put("kddd",kdddMap); |
| | | |
| | | //拼单订单各状态 |
| | | R r = this.selectCountByDeliveryType(ComShopFlowerOrderDO.deliveryType.store,storeId); |
| | | R r = this.selectCountByDeliveryType(ComShopFlowerOrderDO.deliveryType.store,userId); |
| | | retMap.put("pdddStatus",r.getData()); |
| | | |
| | | //快递订单各状态 |
| | | R r1 = this.selectCountByDeliveryType(ComShopFlowerOrderDO.deliveryType.express,storeId); |
| | | R r1 = this.selectCountByDeliveryType(ComShopFlowerOrderDO.deliveryType.express,userId); |
| | | retMap.put("kdddStatus",r1.getData()); |
| | | //营业额 |
| | | List<ComShopOrderStoreIdCountVO> comShopOrderStoreIdCountVOS3 = this.baseMapper.selectSumAmountByStoreId(storeId); |