|
@@ -1252,6 +1252,54 @@ public class OrderServiceImpl extends ServiceImpl<OrderDao, Order> implements Or
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ public OrderCountItemResponse getMerchantOrderStatusNumIntegral(String dateLimit) {
|
|
|
+ SystemAdmin systemAdmin = SecurityUtil.getLoginUserVo().getUser();
|
|
|
+ OrderCountItemResponse response = new OrderCountItemResponse();
|
|
|
+ // 全部订单
|
|
|
+ response.setAll(getIntegralCount(dateLimit, OrderConstants.MERCHANT_ORDER_STATUS_ALL, systemAdmin.getMerId()));
|
|
|
+ // 未支付订单
|
|
|
+ response.setUnPaid(getIntegralCount(dateLimit, OrderConstants.MERCHANT_ORDER_STATUS_UNPAID, systemAdmin.getMerId()));
|
|
|
+ // 未发货订单
|
|
|
+ response.setNotShipped(getIntegralCount(dateLimit, OrderConstants.MERCHANT_ORDER_STATUS_NOT_SHIPPED, systemAdmin.getMerId()));
|
|
|
+ // 待收货订单
|
|
|
+ response.setSpike(getIntegralCount(dateLimit, OrderConstants.MERCHANT_ORDER_STATUS_SPIKE, systemAdmin.getMerId()));
|
|
|
+ // 已收货订单
|
|
|
+ response.setReceiving(getIntegralCount(dateLimit, OrderConstants.MERCHANT_ORDER_STATUS_RECEIVING, systemAdmin.getMerId()));
|
|
|
+ // 交易完成订单
|
|
|
+ response.setComplete(getIntegralCount(dateLimit, OrderConstants.MERCHANT_ORDER_STATUS_COMPLETE, systemAdmin.getMerId()));
|
|
|
+ // 已退款订单
|
|
|
+ response.setRefunded(getIntegralCount(dateLimit, OrderConstants.MERCHANT_ORDER_STATUS_REFUNDED, systemAdmin.getMerId()));
|
|
|
+ // 已删除订单
|
|
|
+ response.setDeleted(getIntegralCount(dateLimit, OrderConstants.MERCHANT_ORDER_STATUS_DELETED, systemAdmin.getMerId()));
|
|
|
+ // 待核销订单
|
|
|
+ response.setVerification(getIntegralCount(dateLimit, OrderConstants.MERCHANT_ORDER_STATUS_AWAIT_VERIFICATION, systemAdmin.getMerId()));
|
|
|
+ return response;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取积分订单总数
|
|
|
+ *
|
|
|
+ * @param dateLimit 时间端
|
|
|
+ * @param status String 状态
|
|
|
+ * @return Integer
|
|
|
+ */
|
|
|
+ private Integer getIntegralCount(String dateLimit, String status, Integer merId) {
|
|
|
+ //总数只计算时间
|
|
|
+ LambdaQueryWrapper<Order> lqw = Wrappers.lambdaQuery();
|
|
|
+ if (merId > 0) {
|
|
|
+ lqw.eq(Order::getMerId, merId);
|
|
|
+ lqw.eq(Order::getIsMerchantDel, false);
|
|
|
+ lqw.eq(Order::getLevel, OrderConstants.ORDER_LEVEL_MERCHANT);
|
|
|
+ lqw.eq(Order::getIsIntegral, 1);
|
|
|
+ }
|
|
|
+ if (StrUtil.isNotBlank(dateLimit)) {
|
|
|
+ getRequestTimeWhere(lqw, dateLimit);
|
|
|
+ }
|
|
|
+ getMerchantStatusWhere(lqw, status);
|
|
|
+ return dao.selectCount(lqw);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
public List<Integer> getOrderUid() {
|
|
|
return dao.getOrderUid();
|
|
|
}
|