From fc855f524ba0c8dc3222da76d28b38afbac69fe0 Mon Sep 17 00:00:00 2001 From: CeDo <cedoogle@gmail.com> Date: 星期二, 08 六月 2021 18:35:25 +0800 Subject: [PATCH] Merge branch 'master' into test --- springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbMemberServiceImpl.java | 54 +++++++++++++++++++++++++++++++++--------------------- 1 files changed, 33 insertions(+), 21 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbMemberServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbMemberServiceImpl.java index bb92c12..313814d 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbMemberServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbMemberServiceImpl.java @@ -101,28 +101,40 @@ @Override @Transactional(rollbackFor = Exception.class) public R listSavePartyBuildingMemberExcelVO(List<PartyBuildingMemberExcelVO> list) { - Boolean aBoolean = stringRedisTemplate.hasKey(REDIS_ORG_ALL); - ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); +// Boolean aBoolean = stringRedisTemplate.hasKey(REDIS_ORG_ALL); +// ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); List<PartyOrganizationVO> partyOrganizationVOS=new ArrayList<>(); - if (aBoolean) { - String orgs = valueOperations.get(REDIS_ORG_ALL); - if (!ObjectUtils.isEmpty(orgs)) { - partyOrganizationVOS= JSONArray.parseArray(orgs,PartyOrganizationVO.class); - } - } else { - List<ComPbOrgDO> comPbOrgDOS = comPbOrgDAO.selectList(new LambdaQueryWrapper<>()); - if (!ObjectUtils.isEmpty(comPbOrgDOS)) { - List<PartyOrganizationVO> partyOrganizationVOList=new ArrayList<>(); - comPbOrgDOS.forEach(comPbOrgDO -> { - PartyOrganizationVO partyOrganizationVO=new PartyOrganizationVO(); - partyOrganizationVO.setId(comPbOrgDO.getId()); - partyOrganizationVO.setName(comPbOrgDO.getName()); - partyOrganizationVO.setCommunityId(comPbOrgDO.getCommunityId()); - partyOrganizationVOList.add(partyOrganizationVO); - }); - partyOrganizationVOS= partyOrganizationVOList; - } - valueOperations.set(REDIS_ORG_ALL,JSONArray.toJSONString(partyOrganizationVOS),24, TimeUnit.HOURS); +// if (aBoolean) { +// String orgs = valueOperations.get(REDIS_ORG_ALL); +// if (!ObjectUtils.isEmpty(orgs)) { +// partyOrganizationVOS= JSONArray.parseArray(orgs,PartyOrganizationVO.class); +// } +// } else { +// List<ComPbOrgDO> comPbOrgDOS = comPbOrgDAO.selectList(new LambdaQueryWrapper<>()); +// if (!ObjectUtils.isEmpty(comPbOrgDOS)) { +// List<PartyOrganizationVO> partyOrganizationVOList=new ArrayList<>(); +// comPbOrgDOS.forEach(comPbOrgDO -> { +// PartyOrganizationVO partyOrganizationVO=new PartyOrganizationVO(); +// partyOrganizationVO.setId(comPbOrgDO.getId()); +// partyOrganizationVO.setName(comPbOrgDO.getName()); +// partyOrganizationVO.setCommunityId(comPbOrgDO.getCommunityId()); +// partyOrganizationVOList.add(partyOrganizationVO); +// }); +// partyOrganizationVOS= partyOrganizationVOList; +// } +// valueOperations.set(REDIS_ORG_ALL,JSONArray.toJSONString(partyOrganizationVOS),24, TimeUnit.HOURS); +// } + List<ComPbOrgDO> comPbOrgDOS = comPbOrgDAO.selectList(new LambdaQueryWrapper<>()); + if (!ObjectUtils.isEmpty(comPbOrgDOS)) { + List<PartyOrganizationVO> partyOrganizationVOList=new ArrayList<>(); + comPbOrgDOS.forEach(comPbOrgDO -> { + PartyOrganizationVO partyOrganizationVO=new PartyOrganizationVO(); + partyOrganizationVO.setId(comPbOrgDO.getId()); + partyOrganizationVO.setName(comPbOrgDO.getName()); + partyOrganizationVO.setCommunityId(comPbOrgDO.getCommunityId()); + partyOrganizationVOList.add(partyOrganizationVO); + }); + partyOrganizationVOS= partyOrganizationVOList; } List<ComPbMemberDO> comPbMemberDOS=new ArrayList<>(); if (!ObjectUtils.isEmpty(list)) { -- Gitblit v1.7.1