Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
zrqx-statistics-2.0
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
svn
zrqx-statistics-2.0
Commits
2b2cbc0a
提交
2b2cbc0a
authored
12月 09, 2020
作者:
chaoyanjun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
上级
b917ac69
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
0 行增加
和
64 行删除
+0
-64
UserServiceImpl.java
...ava/com/zrqx/statistics/user/service/UserServiceImpl.java
+0
-64
没有找到文件。
src/main/java/com/zrqx/statistics/user/service/UserServiceImpl.java
浏览文件 @
2b2cbc0a
...
@@ -116,59 +116,9 @@ public class UserServiceImpl extends BaseServiceImpl<User,String> implements Use
...
@@ -116,59 +116,9 @@ public class UserServiceImpl extends BaseServiceImpl<User,String> implements Use
redis
.
set
(
user
.
getToken
(),
JsonUtil
.
bean2Json
(
user
),
60
*
60
*
24
*
7
,
TimeUnit
.
SECONDS
);
redis
.
set
(
user
.
getToken
(),
JsonUtil
.
bean2Json
(
user
),
60
*
60
*
24
*
7
,
TimeUnit
.
SECONDS
);
}
}
// 添加用户id到组、角色、部门对象集合
/*if(ArrayUtils.isNotEmpty(form.getDeptList())){
List<UserDepartmentRelation> udList = new ArrayList<UserDepartmentRelation>();
for (UserDepartmentRelationForm dept : form.getDeptList()) {
UserDepartmentRelation ud = new UserDepartmentRelation();
ud.setUserId(user.getId());
ud.setDepartmentId(dept.getDeptId());
udList.add(ud);
}
udMapper.insertList(udList);
}
if(ArrayUtils.isNotEmpty(form.getRoleList())){
List<UserRoleRelation> urList = new ArrayList<UserRoleRelation>();
for (UserRoleRelationForm role : form.getRoleList()) {
UserRoleRelation ur = new UserRoleRelation();
ur.setUserId(user.getId());
ur.setRoleId(role.getRoleId());
urList.add(ur);
}
urMapper.insertList(urList);
}*/
}
}
/*@Override
public boolean update(SaveUserForm form) throws Exception {
User entity = userMapper.selectByPrimaryKey(form.getId());
// md5密码加密
if (StringUtils.isNotEmpty(form.getPassword())) {
if(form.getPassword().equals("******")){
form.setPassword(entity.getPassword());
}else{
form.setPassword(MD5Util.getEncoderByMd5(form.getPassword()));
}
}
BeanUtils.copyProperties(form, entity);
userMapper.updateByPrimaryKeySelective(entity);
// 根据用户id 删除用户与角色关系
UserRoleRelation rr = new UserRoleRelation();
rr.setUserId(form.getId());
urMapper.delete(rr);
// 添加用户与角色关系
if(ArrayUtils.isNotEmpty(form.getRoleId())){
form.getRoleId().forEach(v -> {
UserRoleRelation t = new UserRoleRelation();
t.setUserId(form.getId());
t.setRoleId(v);
urMapper.insertSelective(t);
});
}
return true;
}*/
@Override
@Override
...
@@ -228,20 +178,6 @@ public class UserServiceImpl extends BaseServiceImpl<User,String> implements Use
...
@@ -228,20 +178,6 @@ public class UserServiceImpl extends BaseServiceImpl<User,String> implements Use
User
member
=
notNull
(
oid
);
User
member
=
notNull
(
oid
);
UserVO
vo
=
BeanUtils
.
copy
(
member
,
UserVO
.
class
);
UserVO
vo
=
BeanUtils
.
copy
(
member
,
UserVO
.
class
);
vo
.
setPassword
(
null
);
vo
.
setPassword
(
null
);
// 2. 查询角色列表
/*List<UserRoleRelation> qldyList = null;
List<Role> roleList = new ArrayList<Role>();
UserRoleRelation type = new UserRoleRelation();
type.setUserId(oid);
qldyList = urMapper.select(type);
if(ArrayUtils.isNotEmpty(qldyList)){
for(UserRoleRelation q : qldyList){
Integer roleId = q.getRoleId();
Role role = roleMapper.selectByPrimaryKey(roleId);
roleList.add(role);
}
vo.setRoleList(roleList);
}*/
// 角色
// 角色
List
<
UserRoleRelation
>
urList
=
new
ArrayList
<
UserRoleRelation
>();
List
<
UserRoleRelation
>
urList
=
new
ArrayList
<
UserRoleRelation
>();
UserRoleRelation
ur
=
new
UserRoleRelation
();
UserRoleRelation
ur
=
new
UserRoleRelation
();
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论