| | |
| | | String password = comActVO.getPassword(); |
| | | String encode = new BCryptPasswordEncoder().encode(password); |
| | | comActVO.setPassword(encode); |
| | | ComStreetDO comStreetDO = comStreetDAO.selectById(comActVO.getStreetId()+""); |
| | | ComStreetDO comStreetDO = comStreetDAO.selectById(comActVO.getStreetId()); |
| | | if (comStreetDO == null) { |
| | | return R.fail("当前街道不存在!"); |
| | | } |
| | |
| | | .eq(ComActDO::getCityCode,comActVO.getCityCode()) |
| | | .eq(ComActDO::getAreaCode,comActVO.getAreaCode()) |
| | | .eq(ComActDO::getProvinceCode,comActVO.getProvinceCode()) |
| | | .eq(ComActDO::getAppId,comActVO.getAppId()) |
| | | ); |
| | | if (integer > 0) { |
| | | return R.fail("社区已经存在"); |
| | |
| | | int insert = comActDAO.insert(comActDO); |
| | | if (insert > 0) { |
| | | ComActDO comActDO1 = |
| | | comActDAO.selectOne(new QueryWrapper<ComActDO>().lambda().eq(ComActDO::getName, comActVO.getName())); |
| | | comActDAO.selectOne(new QueryWrapper<ComActDO>().lambda() |
| | | .eq(ComActDO::getCommunityId, comActVO.getCommunityId()) |
| | | ); |
| | | BeanUtils.copyProperties(comActDO1, comActVO); |
| | | return R.ok(comActVO); |
| | | } |