|
@@ -81,15 +81,23 @@ public class AuthServiceController {
|
|
|
|
|
|
DecodedJWT decode = JWT.decode(userToken);
|
|
|
String idcard = decode.getClaim("idcard").asString();
|
|
|
+ int iat = decode.getClaim("iat").asInt();
|
|
|
+ int exp = decode.getClaim("exp").asInt();
|
|
|
|
|
|
- log.info("UserToken:{} , idcard:{}", userToken, idcard);
|
|
|
+ int expAt = exp - iat;
|
|
|
+
|
|
|
+ log.info("UserToken:{} , idcard:{}, expAt:{}", userToken, idcard, expAt);
|
|
|
|
|
|
UserInfo userInfo = userFacade.detailBySfzh(idcard);
|
|
|
if (userInfo == null) {
|
|
|
return ApiResult.setFailMessage("用户不存在");
|
|
|
}
|
|
|
+
|
|
|
+ staffAssignAuthInfoFacade.cacheUserToken(idcard, userToken, expAt);
|
|
|
+
|
|
|
String userId = userInfo.getId();
|
|
|
List<AppDataSensitiveLevelDTO> appList = staffAssignAuthInfoFacade.getAppLitByUserId(userId);
|
|
|
+
|
|
|
List<AppAuthRespVO> respVOList = appList.stream().map(AppAuthRespVO::parseDto)
|
|
|
.collect(Collectors.toList());
|
|
|
return ApiResult.setSuccessResult(respVOList);
|