|
@@ -268,24 +268,24 @@ public class ServiceAuthResultServiceImpl implements IServiceAuthResultService {
|
|
|
*/
|
|
|
@Override
|
|
|
public Object serviceAuthentication(String appCode) {
|
|
|
- String redisKey = DcucConstantsUtil.AUTHENTICATION_SPACE + appCode;
|
|
|
- //PermissionUpdateService已存入鉴权结果
|
|
|
- Object redisValue = redisTemplate.opsForValue().get(redisKey);
|
|
|
- //当缓存找不到时候去数据库查询
|
|
|
- if (redisValue == null) {
|
|
|
- List<ServiceAuthResult> results = serviceAuthResultBPO.serviceAuthResultList(appCode);
|
|
|
- List<ServiceAuthenticationResVO> list = new ArrayList<>();
|
|
|
- for (ServiceAuthResult result : results) {
|
|
|
- ServiceAuthenticationResVO serviceAuthenticationResVO = new ServiceAuthenticationResVO();
|
|
|
- serviceAuthenticationResVO.setServiceCode(result.getServiceCode());
|
|
|
- list.add(serviceAuthenticationResVO);
|
|
|
- }
|
|
|
- //鉴权结果存到缓存
|
|
|
- permissionUpdateService.setAuthtionResultToRedis(appCode, list);
|
|
|
- return list;
|
|
|
- } else {
|
|
|
- return redisValue;
|
|
|
+// String redisKey = DcucConstantsUtil.AUTHENTICATION_SPACE + appCode;
|
|
|
+// //PermissionUpdateService已存入鉴权结果
|
|
|
+// Object redisValue = redisTemplate.opsForValue().get(redisKey);
|
|
|
+// //当缓存找不到时候去数据库查询
|
|
|
+// if (redisValue == null) {
|
|
|
+ List<ServiceAuthResult> results = serviceAuthResultBPO.serviceAuthResultList(appCode);
|
|
|
+ List<ServiceAuthenticationResVO> list = new ArrayList<>();
|
|
|
+ for (ServiceAuthResult result : results) {
|
|
|
+ ServiceAuthenticationResVO serviceAuthenticationResVO = new ServiceAuthenticationResVO();
|
|
|
+ serviceAuthenticationResVO.setServiceCode(result.getServiceCode());
|
|
|
+ list.add(serviceAuthenticationResVO);
|
|
|
}
|
|
|
+ //鉴权结果存到缓存
|
|
|
+ // permissionUpdateService.setAuthtionResultToRedis(appCode, list);
|
|
|
+ return list;
|
|
|
+// } else {
|
|
|
+// return redisValue;
|
|
|
+// }
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -309,6 +309,7 @@ public class ServiceAuthResultServiceImpl implements IServiceAuthResultService {
|
|
|
result.setDeleted(BooleanEnum.FALSE.value);
|
|
|
ServiceResource serviceResource = serviceResourceFacade.detailByCode(dto.getServiceCode());
|
|
|
result.setServiceId(serviceResource.getId());
|
|
|
+ result.setAuthStatus("1");
|
|
|
this.saveAuthResult(result);
|
|
|
List<String> addServiceCodes=new ArrayList<>();
|
|
|
addServiceCodes.add(result.getServiceCode());
|