diff --git a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserLoginServiceImpl.java b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserLoginServiceImpl.java index 69c23249..a9fc287f 100644 --- a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserLoginServiceImpl.java +++ b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserLoginServiceImpl.java @@ -124,17 +124,6 @@ public class UserLoginServiceImpl extends ServiceImpl //删除redis里面的userEntity JwtUtils.removeUserEntityByUserId(userEntity.getId()); } - //根据userId获取roleId - List> roleList = authEmployeeRoleDao.selectMaps(new QueryWrapper().eq("user_id", userEntity.getId())); - List list = new ArrayList<>(); - for (Map map:roleList) { - list.add(map.get("role_id").toString()); - } - String roleIds = StringUtils.join(list,","); - if(userEntity != null){ - //删除redis里面的roleId - JwtUtils.removeRoleIdByUserId(userEntity.getId()); - } if(loginRequest.getType() == 1){//手机号码登录 if(userEntity == null){ @@ -153,6 +142,18 @@ public class UserLoginServiceImpl extends ServiceImpl //return ResponseResult.FAIL(CommonCode.USER_IS_NOT_EXIST.code(), CommonCode.USER_IS_NOT_EXIST.message()); } } + //根据userId获取roleId + List> roleList = authEmployeeRoleDao.selectMaps(new QueryWrapper().eq("user_id", userEntity.getId())); + List list = new ArrayList<>(); + for (Map map:roleList) { + list.add(map.get("role_id").toString()); + } + String roleIds = StringUtils.join(list,","); + if(userEntity != null){ + //删除redis里面的roleId + JwtUtils.removeRoleIdByUserId(userEntity.getId()); + } + //登录成功,token生成 long times = 86400; if(loginRequest.getTenDayEffective() == 1){ diff --git a/dq-framework-common/src/main/java/com/daqing/framework/util/Md5Util.java b/dq-framework-common/src/main/java/com/daqing/framework/util/Md5Util.java index 029e1cc0..58fad167 100644 --- a/dq-framework-common/src/main/java/com/daqing/framework/util/Md5Util.java +++ b/dq-framework-common/src/main/java/com/daqing/framework/util/Md5Util.java @@ -43,8 +43,8 @@ public class Md5Util { } catch (ParseException e) { e.printStackTrace(); } - Timestamp time = DateUtils.getDayEndTime(date); +/* Timestamp time = DateUtils.getDayEndTime(date); System.out.println(time); - System.out.println(simpleDateFormat.format(time)); + System.out.println(simpleDateFormat.format(time));*/ } }