From aa9c634ba1584c268fb08a23d6360a661d3fc751 Mon Sep 17 00:00:00 2001 From: zhangqinlin <1500920753@qq.com> Date: Thu, 9 Sep 2021 15:04:39 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=84=E6=96=99=E7=BB=B4=E6=8A=A4=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/PayDataFileController.java | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/jero-boot-incoming-payment/src/main/java/com/jero/data/controller/PayDataFileController.java b/jero-boot-incoming-payment/src/main/java/com/jero/data/controller/PayDataFileController.java index a5f7ea5c..b0e8759c 100644 --- a/jero-boot-incoming-payment/src/main/java/com/jero/data/controller/PayDataFileController.java +++ b/jero-boot-incoming-payment/src/main/java/com/jero/data/controller/PayDataFileController.java @@ -192,7 +192,7 @@ public class PayDataFileController extends JeroController edit(@RequestParam(name="dataId") String dataId, @RequestParam(name="keyId") String keyId, @RequestParam(name="fileIds") String fileIds, - @RequestParam(name="filePath") String filePath, + @RequestParam(name="dataType") int dataType, @RequestParam(name="oldFileId") String oldFileId) { iossFileService.removeById(oldFileId); payDataFileService.removeById(keyId); - ArrayList strings2 = new ArrayList<>(Arrays.asList(fileIds.split(","))); - ArrayList objects = new ArrayList<>(); - for(String fileid:strings2){ + ArrayList fileIdList = new ArrayList<>(Arrays.asList(fileIds.split(","))); + ArrayList list = new ArrayList<>(); + stringBuffer = new StringBuffer(); + findToTree(dataId, dataType); + stringBuffer.deleteCharAt(stringBuffer.lastIndexOf("/")); + for (String id : fileIdList) { PayDataFile payDataFile = new PayDataFile(); - payDataFile.setFileId(fileid); - payDataFile.setFilePath(filePath); + payDataFile.setFilePath(stringBuffer.toString()); + payDataFile.setFileId(id); payDataFile.setDataId(dataId); - objects.add(payDataFile); + list.add(payDataFile); } - payDataFileService.saveBatch(objects); - return Result.OK("编辑成功!"); + payDataFileService.saveBatch(list); + return Result.OK("编辑成功!"); } - - /** * 通过id删除 *