用户管理 创建时间
This commit is contained in:
parent
b6e61961f7
commit
7694dd8242
@ -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);
|
||||
|
||||
//更新角色用户关系
|
||||
|
Loading…
Reference in New Issue
Block a user