Merge pull request 'yanyang' (#28) from yanyang into master
Reviewed-on: #28
This commit is contained in:
commit
045688f123
@ -21,6 +21,7 @@ import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -90,7 +91,8 @@ public class SysRoleServiceImpl extends BaseServiceImpl<SysRoleDao, SysRoleEntit
|
||||
SysRoleEntity entity = ConvertUtils.sourceToTarget(dto, SysRoleEntity.class);
|
||||
|
||||
//保存角色
|
||||
BaseSupportUtils.setCommonField(entity);
|
||||
Timestamp timestamp = new Timestamp(System.currentTimeMillis());
|
||||
entity.setCreateDate(timestamp);
|
||||
insert(entity);
|
||||
|
||||
//保存角色菜单关系
|
||||
@ -106,7 +108,6 @@ public class SysRoleServiceImpl extends BaseServiceImpl<SysRoleDao, SysRoleEntit
|
||||
SysRoleEntity entity = ConvertUtils.sourceToTarget(dto, SysRoleEntity.class);
|
||||
|
||||
//更新角色
|
||||
BaseSupportUtils.setUpdateCommonField(entity);
|
||||
updateById(entity);
|
||||
|
||||
//更新角色菜单关系
|
||||
|
@ -22,6 +22,7 @@ import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -99,7 +100,8 @@ public class SysUserServiceImpl extends BaseServiceImpl<SysUserDao, SysUserEntit
|
||||
|
||||
//保存用户
|
||||
entity.setSuperAdmin(SuperAdminEnum.NO.value());
|
||||
BaseSupportUtils.setCommonField(entity);
|
||||
Timestamp timestamp = new Timestamp(System.currentTimeMillis());
|
||||
entity.setCreateDate(timestamp);
|
||||
insert(entity);
|
||||
|
||||
//保存角色用户关系
|
||||
@ -120,7 +122,6 @@ public class SysUserServiceImpl extends BaseServiceImpl<SysUserDao, SysUserEntit
|
||||
}
|
||||
|
||||
//更新用户
|
||||
BaseSupportUtils.setUpdateCommonField(entity);
|
||||
updateById(entity);
|
||||
|
||||
//更新角色用户关系
|
||||
|
Laden…
Verwijs in nieuw issue
Block a user