Commit c393a76a by huangjinxin

fix:事务校验

1 parent 9db66d1d
......@@ -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;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!