From d35d562b6e743f4eff9480f7a1ecbee890deb438 Mon Sep 17 00:00:00 2001 From: KKSU <15274802129@163.com> Date: Wed, 15 May 2024 14:34:33 +0800 Subject: [PATCH] 测试环境 --- src/main/java/cc/mrbird/febs/mall/controller/AdminMallOrderController.java | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 46 insertions(+), 1 deletions(-) diff --git a/src/main/java/cc/mrbird/febs/mall/controller/AdminMallOrderController.java b/src/main/java/cc/mrbird/febs/mall/controller/AdminMallOrderController.java index 8090049..8d98aea 100644 --- a/src/main/java/cc/mrbird/febs/mall/controller/AdminMallOrderController.java +++ b/src/main/java/cc/mrbird/febs/mall/controller/AdminMallOrderController.java @@ -38,6 +38,7 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections.CollectionUtils; +import org.springframework.beans.factory.annotation.Value; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; @@ -541,6 +542,11 @@ return null; } + + // 文件保存目录URL + @Value("${static.resource.path}") + private String resourcePath; + @PostMapping(value = "/importDeliver") @ControllerEndpoint(operation = "导入发货", exceptionMessage = "导入失败") public FebsResponse importDeliver(@RequestBody MultipartFile file) throws IOException { @@ -549,7 +555,7 @@ } String fileName = file.getOriginalFilename(); - String dirPath = "/home/javaweb/webresource/blnka/"; + String dirPath = resourcePath; File saveFile = new File(new File(dirPath).getAbsolutePath() + File.separator + fileName); if (!saveFile.exists()) { @@ -676,4 +682,43 @@ return new FebsResponse().success().data(data); } + /** + * 发票列表-订单子表 + */ + @GetMapping(value = "/invoiceItemList") + public FebsResponse invoiceItemList() { + return new FebsResponse().success().data(mallInvoiceService.invoiceItemList()); + } + + /** + * 发票列表-上传发票 + */ + @PostMapping("addInvoiceUrl") + @ControllerEndpoint(operation = " 发票列表-上传发票", exceptionMessage = "操作失败") + public FebsResponse addInvoiceUrl(@Valid MallInvoice mallInvoice) { + return mallInvoiceService.addInvoiceUrl(mallInvoice); + } + + /** + * 发票列表-更新抬头 + * @param id + * @return + */ + @GetMapping("updateInvoiceDetail/{id}") + @ControllerEndpoint(operation = "发票列表-更新抬头", exceptionMessage = "操作失败") + public FebsResponse updateInvoiceDetail(@NotNull(message = "{required}") @PathVariable Long id) { + return mallInvoiceService.updateInvoiceDetail(id); + } + + /** + * 发票列表-更新订单状态 + * @param id + * @return + */ + @GetMapping("updateOrderDetail/{id}") + @ControllerEndpoint(operation = "发票列表-更新订单状态", exceptionMessage = "操作失败") + public FebsResponse updateOrderDetail(@NotNull(message = "{required}") @PathVariable Long id) { + return mallInvoiceService.updateOrderDetail(id); + } + } -- Gitblit v1.9.1