MALL:合并订单和售后订单的数量接口

This commit is contained in:
YunaiV 2023-12-28 23:15:25 +08:00
parent 1f3f3d789b
commit 33c3686bef
3 changed files with 7 additions and 6 deletions

View File

@ -10,6 +10,7 @@ import cn.iocoder.yudao.module.trade.convert.order.TradeOrderConvert;
import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderDO;
import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderItemDO;
import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderLogDO;
import cn.iocoder.yudao.module.trade.service.aftersale.AfterSaleService;
import cn.iocoder.yudao.module.trade.service.order.TradeOrderLogService;
import cn.iocoder.yudao.module.trade.service.order.TradeOrderQueryService;
import cn.iocoder.yudao.module.trade.service.order.TradeOrderUpdateService;

View File

@ -47,12 +47,6 @@ public class AppAfterSaleController {
return success(AfterSaleConvert.INSTANCE.convert(afterSaleService.getAfterSale(getLoginUserId(), id)));
}
@GetMapping(value = "/get-applying-count")
@Operation(summary = "获得进行中的售后订单数量")
public CommonResult<Long> getApplyingAfterSaleCount() {
return success(afterSaleService.getApplyingAfterSaleCount(getLoginUserId()));
}
@PostMapping(value = "/create")
@Operation(summary = "申请售后")
public CommonResult<Long> createAfterSale(@RequestBody AppAfterSaleCreateReqVO createReqVO) {

View File

@ -13,6 +13,7 @@ import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderDO;
import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderItemDO;
import cn.iocoder.yudao.module.trade.enums.order.TradeOrderStatusEnum;
import cn.iocoder.yudao.module.trade.framework.order.config.TradeOrderProperties;
import cn.iocoder.yudao.module.trade.service.aftersale.AfterSaleService;
import cn.iocoder.yudao.module.trade.service.delivery.DeliveryExpressService;
import cn.iocoder.yudao.module.trade.service.order.TradeOrderQueryService;
import cn.iocoder.yudao.module.trade.service.order.TradeOrderUpdateService;
@ -48,6 +49,9 @@ public class AppTradeOrderController {
@Resource
private DeliveryExpressService deliveryExpressService;
@Resource
private AfterSaleService afterSaleService;
@Resource
private TradeOrderProperties tradeOrderProperties;
@ -131,6 +135,8 @@ public class AppTradeOrderController {
// 待评价
orderCount.put("uncommentedCount", tradeOrderQueryService.getOrderCount(getLoginUserId(),
TradeOrderStatusEnum.COMPLETED.getStatus(), false));
// 售后数量
orderCount.put("afterSaleCount", afterSaleService.getApplyingAfterSaleCount(getLoginUserId()));
return success(orderCount);
}