|
|
@ -124,17 +124,6 @@ public class UserLoginServiceImpl extends ServiceImpl<UserLoginDao, UserEntity> |
|
|
|
//删除redis里面的userEntity
|
|
|
|
//删除redis里面的userEntity
|
|
|
|
JwtUtils.removeUserEntityByUserId(userEntity.getId()); |
|
|
|
JwtUtils.removeUserEntityByUserId(userEntity.getId()); |
|
|
|
} |
|
|
|
} |
|
|
|
//根据userId获取roleId
|
|
|
|
|
|
|
|
List<Map<String, Object>> roleList = authEmployeeRoleDao.selectMaps(new QueryWrapper<EmployeeRoleEntity>().eq("user_id", userEntity.getId())); |
|
|
|
|
|
|
|
List<String> 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(loginRequest.getType() == 1){//手机号码登录
|
|
|
|
|
|
|
|
|
|
|
|
if(userEntity == null){ |
|
|
|
if(userEntity == null){ |
|
|
@ -153,6 +142,18 @@ public class UserLoginServiceImpl extends ServiceImpl<UserLoginDao, UserEntity> |
|
|
|
//return ResponseResult.FAIL(CommonCode.USER_IS_NOT_EXIST.code(), CommonCode.USER_IS_NOT_EXIST.message());
|
|
|
|
//return ResponseResult.FAIL(CommonCode.USER_IS_NOT_EXIST.code(), CommonCode.USER_IS_NOT_EXIST.message());
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//根据userId获取roleId
|
|
|
|
|
|
|
|
List<Map<String, Object>> roleList = authEmployeeRoleDao.selectMaps(new QueryWrapper<EmployeeRoleEntity>().eq("user_id", userEntity.getId())); |
|
|
|
|
|
|
|
List<String> 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生成
|
|
|
|
//登录成功,token生成
|
|
|
|
long times = 86400; |
|
|
|
long times = 86400; |
|
|
|
if(loginRequest.getTenDayEffective() == 1){ |
|
|
|
if(loginRequest.getTenDayEffective() == 1){ |
|
|
|