罗元桥
2021-09-27 5f349fe34e3e33625f8593ec1b616f0c4528a12c
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActSocialOrgServiceImpl.java
@@ -8,6 +8,7 @@
import com.panzhihua.common.model.vos.community.ComActSocialOrgVO;
import com.panzhihua.common.model.vos.user.AdministratorsUserVO;
import com.panzhihua.common.service.user.UserService;
import com.panzhihua.service_community.entity.ComActCommittee;
import com.panzhihua.service_community.entity.ComActSocialOrg;
import com.panzhihua.service_community.dao.ComActSocialOrgDao;
import com.panzhihua.service_community.service.ComActSocialOrgService;
@@ -62,7 +63,7 @@
                this.comActSocialOrgDao.insert(comActSocialOrg);
                return R.ok();
            }
            return R.fail(r.getMsg());
            return R.fail("账号或手机号已存在");
        }
        return R.fail();
    }
@@ -72,6 +73,14 @@
        if(comActSocialOrgVO!=null){
               ComActSocialOrg comActSocialOrg=new ComActSocialOrg();
               BeanUtils.copyProperties(comActSocialOrgVO,comActSocialOrg);
                if(comActSocialOrgVO.getRoleId()!=null){
                    ComActSocialOrg comPropertyBase=this.comActSocialOrgDao.selectById(comActSocialOrgVO.getId());
                    AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO();
                    administratorsUserVO.setUserId(comPropertyBase.getUserId());
                    administratorsUserVO.setRoleId(comActSocialOrgVO.getRoleId());
                    administratorsUserVO.setLastLoginTime(DateUtil.date());
                    this.userService.putUserBackstage(administratorsUserVO);
                }
               this.comActSocialOrgDao.updateById(comActSocialOrg);
               return R.ok();
        }