From 8c834663344b1cc9c2ca569e6911900edd407f73 Mon Sep 17 00:00:00 2001
From: jinlin <jinlin>
Date: 星期四, 06 六月 2024 16:44:14 +0800
Subject: [PATCH] 修改
---
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/sysPictureBase/controller/SysPictureBaseController.java | 18 ++++++------------
1 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/sysPictureBase/controller/SysPictureBaseController.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/sysPictureBase/controller/SysPictureBaseController.java
index 6bc2ac5..29551dc 100644
--- a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/sysPictureBase/controller/SysPictureBaseController.java
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/sysPictureBase/controller/SysPictureBaseController.java
@@ -73,16 +73,9 @@
} else {
sysPictureBaseService.insert(sysPictureBase);
}
- if (sysPictureBase.getIsDefault()==1){
- if (sysPictureBase.getId()==null){
- sysPictureBaseService.updateByDefault(sysPictureBase.getId(),sysPictureBase.getProductType());
- sysPictureBaseService.updateProdeuctImg(sysPictureBase.getId(),sysPictureBase.getProductType(),null);
- }else{
- if (!sysPictureBase.getId().equals(sysPictureBase.getId())){
- sysPictureBaseService.updateByDefault(sysPictureBase.getId(),sysPictureBase.getProductType());
- sysPictureBaseService.updateProdeuctImg(sysPictureBase.getId(),sysPictureBase.getProductType(),sysPictureBase.getId());
- }
- }
+ if (sysPictureBase.getIsDefault() == 1) {
+ sysPictureBaseService.updateByDefault(sysPictureBase.getId(), sysPictureBase.getProductType());
+ sysPictureBaseService.updateProdeuctImg(sysPictureBase.getId(), sysPictureBase.getProductType(), null);
}
return Result.ok();
}
@@ -111,7 +104,7 @@
//鍏虫祦
outputStream.close();
in.close();
- } catch (IOException e) {
+ } catch (IOException e) {
e.printStackTrace();
}
}
@@ -126,7 +119,7 @@
response.getWriter().flush();
response.getWriter().close();
- } catch (IOException e) {
+ } catch (IOException e) {
e.printStackTrace();
}
}
@@ -136,6 +129,7 @@
SysPictureBase data = sysPictureBaseService.getDefaultImg(productType);
return Result.ok(data);
}
+
@DeleteMapping
@ApiOperation("鍒犻櫎")
@LogOperation("鍒犻櫎")
--
Gitblit v1.9.1