| | |
| | | administratorsUserVO.setAccount(comActSocialOrgVO.getAccount()); |
| | | administratorsUserVO.setPassword(comActSocialOrgVO.getPassword()); |
| | | administratorsUserVO.setRoleId(comActSocialOrgVO.getRoleId()); |
| | | administratorsUserVO.setCommunityId(comActSocialOrg.getCommunityId()); |
| | | R r=userService.addUserBackstageProperty(administratorsUserVO); |
| | | if(R.isOk(r)){ |
| | | comActSocialOrg.setUserId(Long.parseLong(r.getData().toString())); |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R update(ComActSocialOrgVO comActSocialOrgVO) { |
| | | if(comActSocialOrgVO!=null){ |
| | | if(!comActSocialOrgVO.getAccount().isEmpty()||!comActSocialOrgVO.getPassword().isEmpty()){ |
| | | AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO(); |
| | | administratorsUserVO.setUserId(comActSocialOrgVO.getUserId()); |
| | | administratorsUserVO.setAccount(comActSocialOrgVO.getAccount()); |
| | | administratorsUserVO.setPassword(comActSocialOrgVO.getPassword()); |
| | | R r=userService.putUserBackstage(administratorsUserVO); |
| | | if(R.isOk(r)){ |
| | | ComActSocialOrg comActSocialOrg=new ComActSocialOrg(); |
| | | BeanUtils.copyProperties(comActSocialOrgVO,comActSocialOrg); |
| | | this.comActSocialOrgDao.updateById(comActSocialOrg); |
| | | return R.ok(); |
| | | } |
| | | return R.fail("账号密码修改失败"); |
| | | } |
| | | else { |
| | | ComActSocialOrg comActSocialOrg=new ComActSocialOrg(); |
| | | BeanUtils.copyProperties(comActSocialOrgVO,comActSocialOrg); |
| | | this.comActSocialOrgDao.updateById(comActSocialOrg); |
| | | return R.ok(); |
| | | } |
| | | } |
| | | return R.fail(); |
| | | } |
| | |
| | | if(comActSocialOrg.getUserId()!=null){ |
| | | AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO(); |
| | | administratorsUserVO.setUserId(comActSocialOrg.getUserId()); |
| | | administratorsUserVO.setCommunityId(comActSocialOrg.getCommunityId()); |
| | | R r=userService.deleteUserBackstage(administratorsUserVO); |
| | | if(R.isOk(r)){ |
| | | this.comActSocialOrgDao.deleteById(id); |