Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
yangxiujun
/
paidan_demo
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit c393a76a
authored
Oct 07, 2023
by
huangjinxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:事务校验
1 parent
9db66d1d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
project-user/src/main/java/com/dituhui/pea/user/service/RoleService.java
project-user/src/main/java/com/dituhui/pea/user/service/RoleService.java
View file @
c393a76
...
...
@@ -62,10 +62,10 @@ public class RoleService {
private
static
final
int
LIVE_TIME_MILLIS
=
360000
;
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
public
RoleInfo
addRole
(
RoleInfo
roleInfo
)
{
//
RoleEntity roleEntity = BeanUtil.copyProperties(roleInfo, RoleEntity.class);
//
roleEntity = roleDao.save(roleEntity);
RoleEntity
roleEntity
=
BeanUtil
.
copyProperties
(
roleInfo
,
RoleEntity
.
class
);
roleEntity
=
roleDao
.
save
(
roleEntity
);
// // List<RoleResourceInfo> resourceInfos = roleInfo.getResourceInfos();
// // if (CollectionUtils.isNotEmpty(resourceInfos)) {
// // for (RoleResourceInfo resourceInfo : resourceInfos) {
...
...
@@ -73,7 +73,7 @@ public class RoleService {
// // roleResourceDao.save(roleResourceEntity);
// // }
// // }
//
roleInfo = BeanUtil.copyProperties(roleEntity, RoleInfo.class);
roleInfo
=
BeanUtil
.
copyProperties
(
roleEntity
,
RoleInfo
.
class
);
return
roleInfo
;
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment