huanghongfa
2021-06-08 657fb5800382488f3ea6941b4e43e90adbe21e59
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
@@ -237,6 +237,12 @@
//        志愿者状态
        String phone = sysUserDO.getPhone();
        Long userCommunityId = sysUserDO.getCommunityId();
        if(userCommunityId!=null){
            ComActVO comActVO = userDao.selectCommunity(userCommunityId);
            if(comActVO!=null) {
                loginUserInfoVO.setCommunityName(comActVO.getName());
            }
        }
        if (!ObjectUtils.isEmpty(phone)) {
            ComMngVolunteerMngVO comMngVolunteerMngVO = userDao.selectVolunteerMngByPhone(phone);
            if (ObjectUtils.isEmpty(comMngVolunteerMngVO)) {
@@ -1907,6 +1913,9 @@
        String encode = new BCryptPasswordEncoder().encode(eventGridMemberAddDTO.getPassword());
        eventGridMemberAddDTO.setPassword(encode);
        BeanUtils.copyProperties(eventGridMemberAddDTO, sysUserDO);
        if(!StringUtils.isEmpty(sysUserDO.getNickName())){
            sysUserDO.setName(sysUserDO.getNickName());
        }
        sysUserDO.setType(6);
        int insert = 0;
        try {
@@ -1919,9 +1928,9 @@
            e.printStackTrace();
            log.error("新增后台用户报错【{}】", e.getMessage());
            if (e.getMessage().contains("union_phone_type")) {
                throw new ServiceException("手机号已经存在");
                return R.fail("手机号已经存在");
            } else if (e.getMessage().contains("union_account_type")) {
                throw new ServiceException("账户已经存在");
                return R.fail("账户已经存在");
            }
        }
        if(insert > 0){
@@ -1974,9 +1983,9 @@
            e.printStackTrace();
            log.error("修改网格员用户报错【{}】", e.getMessage());
            if (e.getMessage().contains("union_phone_type")) {
                throw new ServiceException("手机号已经存在");
                return R.fail("手机号已经存在");
            } else if (e.getMessage().contains("union_account_type")) {
                throw new ServiceException("账户已经存在");
                return R.fail("账户已经存在");
            }
        }
        if(insert > 0){