p-honggang.li
2025-08-28 f0da95925bcb8ad19b0d1cc78afe4b4a4ae188a6
src/main/java/com/webmanage/controller/OrderController.java
@@ -43,6 +43,13 @@
        catch (Exception e) { log.error("查询买家订单列表失败", e); return Result.error("查询买家订单列表失败:" + e.getMessage()); }
    }
    @PostMapping("/buyer/page/with-product-conditions")
    @ApiOperation("分页查询买家订单列表(支持产品条件)")
    public Result<Object> getBuyerOrderPageWithProductConditions(@Valid @RequestBody OrderQueryDTO queryDTO) {
        try { return Result.success(orderInfoService.getBuyerOrderPageWithProductConditions(queryDTO)); }
        catch (Exception e) { log.error("查询买家订单列表失败", e); return Result.error("查询买家订单列表失败:" + e.getMessage()); }
    }
    @PostMapping("/create")
    @ApiOperation("创建订单(包含订单详情),需在 Header 携带 Idempotency-Token 防重复提交")
    public Result<OrderInfo> createOrder(@RequestHeader(value = "Idempotency-Token", required = false) String token,
@@ -119,6 +126,20 @@
                return Result.error("提供者ID不能为空");
            }
            return Result.success(orderInfoService.getSellerOrderPage(queryDTO));
        } catch (Exception e) {
            log.error("查询卖家订单列表失败", e);
            return Result.error("查询卖家订单列表失败:" + e.getMessage());
        }
    }
    @PostMapping("/seller/page/with-product-conditions")
    @ApiOperation("分页查询卖家订单列表(支持产品条件)")
    public Result<Object> getSellerOrderPageWithProductConditions(@Valid @RequestBody OrderQueryDTO queryDTO) {
        try {
            if (queryDTO.getProviderId() == null) {
                return Result.error("提供者ID不能为空");
            }
            return Result.success(orderInfoService.getSellerOrderPageWithProductConditions(queryDTO));
        } catch (Exception e) {
            log.error("查询卖家订单列表失败", e);
            return Result.error("查询卖家订单列表失败:" + e.getMessage());
@@ -290,6 +311,20 @@
        }
    }
    @PostMapping("/workflow/update")
    @ApiOperation("根据订单ID更新工作流ID(workflow_id)")
    public Result<Boolean> updateWorkflowId(
            @ApiParam("订单ID") @RequestParam @NotBlank String orderId,
            @ApiParam("工作流ID") @RequestParam @NotBlank String workflowId) {
        try {
            boolean result = orderInfoService.updateWorkflowId(orderId, workflowId);
            return result ? Result.success(true) : Result.error("更新工作流ID失败");
        } catch (Exception e) {
            log.error("更新工作流ID失败,订单ID: {}", orderId, e);
            return Result.error("更新工作流ID失败:" + e.getMessage());
        }
    }
    @GetMapping("/agreement/check/{orderId}")
    @ApiOperation("检查订单是否包含协议类型的子订单")
    public Result<Boolean> checkAgreementPriceType(