| | |
| | | @Override |
| | | public R putCommunity(ComActVO comActVO) { |
| | | ComActDO comActDO=new ComActDO(); |
| | | String password = comActVO.getPassword(); |
| | | String account = comActVO.getAccount(); |
| | | Long communityId = comActVO.getCommunityId(); |
| | | // String contacts = comActVO.getContacts(); |
| | | int a=0; |
| | | if (!ObjectUtils.isEmpty(password)) { |
| | | String encode = new BCryptPasswordEncoder().encode(password); |
| | | comActVO.setPassword(encode); |
| | | a=1; |
| | | } |
| | | // if(!ObjectUtils.isEmpty(account)||!ObjectUtils.isEmpty(contacts)){ |
| | | // a=1; |
| | | // } |
| | | BeanUtils.copyProperties(comActVO,comActDO); |
| | | int update = comActDAO.updateById(comActDO); |
| | | if (update>0) { |
| | | if (a==1) { |
| | | // 修改登录账户的密码 |
| | | comActDAO.updateAccountPassword(comActVO.getPassword(),account,communityId); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |