From 527cbd85e37842d93d081f33916dca5c6f7156e0 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期日, 24 九月 2023 09:53:58 +0800
Subject: [PATCH] 修改 9.22
---
inventory-server/src/main/java/com/yuanchu/mom/controller/SaleController.java | 21 +++++++++++++++++----
1 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/inventory-server/src/main/java/com/yuanchu/mom/controller/SaleController.java b/inventory-server/src/main/java/com/yuanchu/mom/controller/SaleController.java
index 55b47ec..dfc3a62 100644
--- a/inventory-server/src/main/java/com/yuanchu/mom/controller/SaleController.java
+++ b/inventory-server/src/main/java/com/yuanchu/mom/controller/SaleController.java
@@ -98,8 +98,7 @@
public Result updateSaleById(@RequestHeader("token") String token, Integer id, String str) throws Exception {
SaleVo saleVo = JackSonUtil.unmarshal(str, SaleVo.class);
Map<String, String> data = JackSonUtil.unmarshal(jwt.readJWT(token).get("data"), Map.class);
- saleService.updateSaleById(data.get("name").replaceAll("\"", ""), id, saleVo);
- return Result.success("淇敼鎴愬姛!");
+ return Result.success(saleService.updateSaleById(data.get("name").replaceAll("\"", ""), id, saleVo));
}
@ApiOperation(value = "鏍规嵁閿�鍞崟id鍒犻櫎")
@@ -114,10 +113,10 @@
@ApiOperation(value = "鎵归噺鍒犻櫎")
@ApiImplicitParams(value = {
- @ApiImplicitParam(name = "ids", value = "ids", dataTypeClass = Integer.class, dataType = "List", required = true)
+ @ApiImplicitParam(name = "ids", value = "ids", dataTypeClass = String.class,required = true)
})
@PostMapping("/delAllSale")
- public Result delAllSale(@RequestParam("ids") List<Integer> ids) {
+ public Result delAllSale(String ids) {
saleService.delAllSale(ids);
return Result.success();
}
@@ -134,5 +133,19 @@
return Result.success("瀹℃牳鎴愬姛");
}
+ @ApiOperation(value = "鍚屾")
+ @PostMapping("/synchronization")
+ public Result synchronization(){
+ return Result.success(saleService.synchronization());
+ }
+
+ @ApiOperation(value = "涓嬭浇闄勪欢")
+ @ApiImplicitParams(value = {
+ @ApiImplicitParam(name = "id", value = "閿�鍞崟id", dataTypeClass = Integer.class, required = true)
+ })
+ @PostMapping("/download")
+ public Result download(Integer id){
+ return Result.success(saleService.download(id));
+ }
}
--
Gitblit v1.9.3