From d6aabd981bf80cd57c09819f42b1c4e79f1904f9 Mon Sep 17 00:00:00 2001 From: manailin <261030956@qq.com> Date: 星期三, 21 九月 2022 10:13:50 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/sanshuohuitang_dev' into sanshuohuitang_dev --- springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java index d54450b..aada98a 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java @@ -3679,8 +3679,20 @@ if (nonNull(administratorsUserVO.getImageUrl())){ sysUserDO.setImageUrl(administratorsUserVO.getImageUrl()); } - sysUserDO.setType(administratorsUserVO.getType()); + if (nonNull(administratorsUserVO.getType())){ + sysUserDO.setType(administratorsUserVO.getType()); + } userDao.insert(sysUserDO); + //分配权限 + SysUserRoleDO sysUserRole=new SysUserRoleDO(); + sysUserRole.setUserId(sysUserDO.getUserId()); + if (sysUserDO.getType().equals(11)){ + sysUserRole.setRoleId(Long.parseLong(UserConstants.SANSHUO_EXPERT_ROLE)); + }else{ + sysUserRole.setRoleId(Long.parseLong(UserConstants.SANSHUO_INDUSTRY_CENTER_ROLE)); + } + //配置权限 + sysUserRoleDAO.insert(sysUserRole); return R.ok(); } return R.fail("账户名已存在"); @@ -3690,8 +3702,8 @@ * 三说会堂后台重置密码 * */ @Override - public R resetPassExpertOrIndustryCenter(Long userId,String password) { - SysUserDO sysUserDO = userDao.selectById(userId); + public R resetPassExpertOrIndustryCenter(String account,String password) { + SysUserDO sysUserDO = userDao.selectOne(new QueryWrapper<SysUserDO>().eq("account", account)); if (nonNull(sysUserDO)){ sysUserDO.setPassword(password); userDao.updateById(sysUserDO); -- Gitblit v1.7.1