From f71115e045a86d8cbc2da33aebf70903314fb073 Mon Sep 17 00:00:00 2001 From: wxyclub Date: Mon, 13 Nov 2023 10:29:04 +0800 Subject: [PATCH] =?UTF-8?q?bug:=20=E6=94=BF=E7=AD=96=E8=B5=84=E6=96=99?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/SarLawsInformationServiceImpl.java | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsInformation/service/impl/SarLawsInformationServiceImpl.java b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsInformation/service/impl/SarLawsInformationServiceImpl.java index b5cef826..072b1504 100644 --- a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsInformation/service/impl/SarLawsInformationServiceImpl.java +++ b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsInformation/service/impl/SarLawsInformationServiceImpl.java @@ -118,6 +118,7 @@ public class SarLawsInformationServiceImpl extends ServiceImpl wrapper2 = new LambdaQueryWrapper<>(); wrapper2.eq(SarLawsInformationAuth::getLawsInformationId, sarLawsInformation.getId()); wrapper2.eq(SarLawsInformationAuth::getAuthType, "downloadableBy"); @@ -134,6 +135,16 @@ public class SarLawsInformationServiceImpl extends ServiceImpl wrapper3 = new LambdaQueryWrapper<>(); + wrapper3.eq(SarLawsInformationAuth::getLawsInformationId, sarLawsInformation.getId()); + wrapper3.eq(SarLawsInformationAuth::getAuthType, "createAndApproveBy"); + wrapper3.eq(SarLawsInformationAuth::getUserId, userId); + int count = authService.count(wrapper3); + if (count > 0) { + sarLawsInformation.setDownloadable(true); } return sarLawsInformation; } @@ -147,6 +158,8 @@ public class SarLawsInformationServiceImpl extends ServiceImpl wrapper = new LambdaQueryWrapper<>(); wrapper.eq(SarLawsInformationAuth::getUserId, userId); + wrapper.eq(SarLawsInformationAuth::getAuthType, "viewableBy"); + wrapper.or().eq(SarLawsInformationAuth::getAuthType, "createAndApproveBy"); wrapper.select(SarLawsInformationAuth::getLawsInformationId); List informationAuthList = authService.list(wrapper); if (informationAuthList.size() > 0) { @@ -348,6 +361,8 @@ public class SarLawsInformationServiceImpl extends ServiceImpl wrapper = new LambdaQueryWrapper<>(); wrapper.eq(SarLawsInformationAuth::getUserId, userId); + wrapper.eq(SarLawsInformationAuth::getAuthType, "viewableBy"); + wrapper.or().eq(SarLawsInformationAuth::getAuthType, "createAndApproveBy"); wrapper.select(SarLawsInformationAuth::getLawsInformationId); List informationAuthList = authService.list(wrapper); if (informationAuthList.size() > 0) { @@ -683,16 +698,6 @@ public class SarLawsInformationServiceImpl extends ServiceImpl set1, Set set2){ - if(set1 == null || set2 ==null){//null就直接不比了 - return false; - } - if(set1.size()!=set2.size()){//大小不同也不用比了 - return false; - } - return set1.containsAll(set2);//最后比containsAll - } }