| | |
| | | } |
| | | if (currentUserRoles.isEmpty()) { |
| | | checkResult = false; |
| | | } |
| | | boolean result = sysAllowedRoles.stream().anyMatch(role -> currentUserRoles.contains(role)); |
| | | if (!result) { |
| | | checkResult = false; |
| | | } else { |
| | | if (!sysAllowedRoles.contains("1")) { |
| | | boolean result = sysAllowedRoles.stream().anyMatch(role -> currentUserRoles.contains(role)); |
| | | if (!result) { |
| | | checkResult = false; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | } else { |
| | | comActDiscussDO.setStatus(ComActDiscussDO.status.yfb); |
| | | } |
| | | comActDiscussDO.setUpdateAt(new Date()); |
| | | comActDiscussDO.setUpdateAt(nowDate); |
| | | int insert = comActDiscussDAO.updateById(comActDiscussDO); |
| | | if (insert > 0) { |
| | | //如果是投票,需要把投票的选项存储 |
| | |
| | | */ |
| | | private void checkDiscussStatusIsCorrect(ComActDiscussVO comActDiscussVO) { |
| | | //判断discuss状态是否正确 |
| | | boolean isIncorrectStatus = comActDiscussVO.getEndTime().before(new Date()) && |
| | | (comActDiscussVO.getStatus().intValue() == 1 || comActDiscussVO.getStatus().intValue() == 2); |
| | | if (isIncorrectStatus) { |
| | | comActDiscussVO.setStatus(3); |
| | | comActDiscussDAO.updateStatusById(comActDiscussVO.getId(), 3); |
| | | if(comActDiscussVO.getEndTime() != null){ |
| | | boolean isIncorrectStatus = comActDiscussVO.getEndTime().before(new Date()) && |
| | | (comActDiscussVO.getStatus().intValue() == 1 || comActDiscussVO.getStatus().intValue() == 2); |
| | | if (isIncorrectStatus) { |
| | | comActDiscussVO.setStatus(3); |
| | | comActDiscussDAO.updateStatusById(comActDiscussVO.getId(), 3); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | @Override |
| | | public R discussJurisdictionGet(Long communityId, Long userId) { |
| | | List<SysConfDO> confDOList = sysConfDao.selectList(new LambdaQueryWrapper<SysConfDO>() |
| | | .eq(SysConfDO::getCommunityId, communityId).eq(SysConfDO::getCode,Constants.DISCUSS_IDENTITY_KEY + communityId).orderByDesc(SysConfDO::getCreateAt)); |
| | | .eq(SysConfDO::getCommunityId, communityId) |
| | | .eq(SysConfDO::getCode,Constants.DISCUSS_IDENTITY_KEY + communityId) |
| | | .orderByDesc(SysConfDO::getCreateAt)); |
| | | if (confDOList == null || confDOList.size() == 0) { |
| | | SysConfDO sysConfDO = new SysConfDO(); |
| | | sysConfDO.setCode(Constants.DISCUSS_IDENTITY_KEY + communityId); |