update 查询用户可申请开票的订单列表

This commit is contained in:
2023-04-11 17:00:44 +08:00
parent 383d900997
commit fb3480484f
2 changed files with 7 additions and 0 deletions

View File

@@ -247,6 +247,7 @@ public class OrderController extends BaseController {
/**
* 查询未开发票订单
* 时间限制60天内
* http://localhost:8080/uniapp/order/queryUninvoicedOrderList
*/
@PostMapping("/queryUninvoicedOrderList")
public RestApiResponse<?> queryUninvoicedOrderList(HttpServletRequest request, @RequestBody QueryOrderDTO dto) {
@@ -259,6 +260,9 @@ public class OrderController extends BaseController {
}
List<OrderVO> list = orderService.queryUninvoicedOrderList(dto);
response = new RestApiResponse<>(ImmutableMap.of("list", list));
} catch (BusinessException e) {
logger.error("查询未开发票订单 warn", e);
response = new RestApiResponse<>(e.getCode(), e.getMessage());
} catch (Exception e){
logger.error("查询未开发票订单 error", e);
response = new RestApiResponse<>("00300003", "查询未开发票订单异常");

View File

@@ -994,6 +994,9 @@ public class OrderService {
orderList = orderList.stream()
.filter(x -> x.getOrderAmount().compareTo(BigDecimal.ZERO) > 0)
.collect(Collectors.toList());
if (CollectionUtils.isEmpty(orderList)) {
return orderList;
}
// 查询最近60天申请开票记录
QueryInvoiceRecordDTO build = QueryInvoiceRecordDTO.builder()