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 - } }