From 9ad8b94e643ea2a996a10aca7bf5948643e3571d Mon Sep 17 00:00:00 2001 From: jinlin <jinlin> Date: 星期四, 14 三月 2024 09:19:46 +0800 Subject: [PATCH] 修改 --- modules/mainPart/src/main/java/com/zt/life/modules/sysPictureBase/controller/SysPictureBaseController.java | 2 +- web/src/views/modules/sysPictureBase/SysPictureBase-AddOrUpdate.vue | 3 +++ 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/sysPictureBase/controller/SysPictureBaseController.java b/modules/mainPart/src/main/java/com/zt/life/modules/sysPictureBase/controller/SysPictureBaseController.java index 11cc5a0..5d3d060 100644 --- a/modules/mainPart/src/main/java/com/zt/life/modules/sysPictureBase/controller/SysPictureBaseController.java +++ b/modules/mainPart/src/main/java/com/zt/life/modules/sysPictureBase/controller/SysPictureBaseController.java @@ -83,7 +83,7 @@ public Result save(@RequestBody MultipartFile file, Long id, String type, String subType, String name, String contentType, String systemMark, Integer sortNo, String remark) { SysPictureBase sysPictureBase; - if (id != null) { + if (id != 0) { sysPictureBase = sysPictureBaseService.get(id); sysPictureBase.setType(type); sysPictureBase.setSubType(subType); diff --git a/web/src/views/modules/sysPictureBase/SysPictureBase-AddOrUpdate.vue b/web/src/views/modules/sysPictureBase/SysPictureBase-AddOrUpdate.vue index 49b5bed..1968216 100644 --- a/web/src/views/modules/sysPictureBase/SysPictureBase-AddOrUpdate.vue +++ b/web/src/views/modules/sysPictureBase/SysPictureBase-AddOrUpdate.vue @@ -96,6 +96,9 @@ params.append('file', x.file) }); // 灏嗚緭鍏ヨ〃鍗曟暟鎹坊鍔犲埌params琛ㄥ崟涓� + if (!this.dataForm.id){ + this.dataForm.id = 0 + } params.append('id', this.dataForm.id) params.append('type', this.dataForm.type) params.append('subType', this.dataForm.subType) -- Gitblit v1.9.1