|  |  | @ -141,11 +141,12 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe | 
			
		
	
		
			
				
					|  |  |  |                     // 更改customer_mp 授权信息,appId,并绑定
 | 
			
		
	
		
			
				
					|  |  |  |                     String authAppId = result.get(ModuleConstant.APP_ID); | 
			
		
	
		
			
				
					|  |  |  |                     String authCode = result.get(ModuleConstant.AUTHORIZATION_CODE_HUMP); | 
			
		
	
		
			
				
					|  |  |  |                     log.info("=============================="+authCode); | 
			
		
	
		
			
				
					|  |  |  |                     AuthCodeResultDTO authCodeResultDTO = authCodeDao.selectCustomerIdByAuthCode(authCode); | 
			
		
	
		
			
				
					|  |  |  |                     String clientType = authCodeResultDTO.getClientType(); | 
			
		
	
		
			
				
					|  |  |  |                     String customerId = authCodeResultDTO.getCustomerId(); | 
			
		
	
		
			
				
					|  |  |  |                     this.updateCustomerMpAppIdAndCreateOpenPlatform(customerId,authAppId,clientType); | 
			
		
	
		
			
				
					|  |  |  |                     this.authInfoByAuthCode(authCode, customerId,clientType); | 
			
		
	
		
			
				
					|  |  |  | //                    this.authInfoByAuthCode(authCode, customerId,clientType);
 | 
			
		
	
		
			
				
					|  |  |  |                     authCodeDao.updateAppId(customerId,clientType,authAppId); | 
			
		
	
		
			
				
					|  |  |  |                     this.saveAuthAccountInfo(customerId,authAppId,clientType); | 
			
		
	
		
			
				
					|  |  |  | //                    customerMpDao.updateAuthorizationFlag(authAppId);
 | 
			
		
	
	
		
			
				
					|  |  | @ -269,7 +270,7 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe | 
			
		
	
		
			
				
					|  |  |  |         authorizationInfoResultDTO = mapToEntity(map, AuthorizationInfoResultDTO.class); | 
			
		
	
		
			
				
					|  |  |  |         String authAppId = authorizationInfoResultDTO.getAuthorizer_appid(); | 
			
		
	
		
			
				
					|  |  |  |         log.info("授权信息:"+map); | 
			
		
	
		
			
				
					|  |  |  |         String expiresIn = authorizationInfoResultDTO.getExpires_in(); | 
			
		
	
		
			
				
					|  |  |  |         String expiresIn = authorizationInfoResultDTO.getExpires_in().toString(); | 
			
		
	
		
			
				
					|  |  |  |         Date expiresInTime = this.countExpirationTime(expiresIn); | 
			
		
	
		
			
				
					|  |  |  |         //授权信息分为两张表,基础信息authorization_info,授权列表func_info
 | 
			
		
	
		
			
				
					|  |  |  |         // 1. 基础信息
 | 
			
		
	
	
		
			
				
					|  |  | @ -288,7 +289,7 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe | 
			
		
	
		
			
				
					|  |  |  |         List<FuncInfoFormDTO> funcInfos = new ArrayList<>(); | 
			
		
	
		
			
				
					|  |  |  |         List<Map> func_info = authorizationInfoResultDTO.getFunc_info(); | 
			
		
	
		
			
				
					|  |  |  |         log.info("权限列表信息:"+func_info); | 
			
		
	
		
			
				
					|  |  |  |         func_info.forEach(func -> { | 
			
		
	
		
			
				
					|  |  |  |         /*func_info.forEach(func -> { | 
			
		
	
		
			
				
					|  |  |  |             func.forEach((key,value) -> { | 
			
		
	
		
			
				
					|  |  |  |                 FuncInfoFormDTO fu = new FuncInfoFormDTO(); | 
			
		
	
		
			
				
					|  |  |  |                 fu.setFuncscopeCategory((String) key); | 
			
		
	
	
		
			
				
					|  |  | @ -298,10 +299,10 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe | 
			
		
	
		
			
				
					|  |  |  |                 fu.setCustomerId(customerId); | 
			
		
	
		
			
				
					|  |  |  |                 funcInfos.add(fu); | 
			
		
	
		
			
				
					|  |  |  |             }); | 
			
		
	
		
			
				
					|  |  |  |         }); | 
			
		
	
		
			
				
					|  |  |  |         //先逻辑删除,在插入
 | 
			
		
	
		
			
				
					|  |  |  |         funcInfoDao.updateOldFuncInfo(customerId,authAppId); | 
			
		
	
		
			
				
					|  |  |  |         funcInfoDao.insertFuncInfo(funcInfos); | 
			
		
	
		
			
				
					|  |  |  |         });*/ | 
			
		
	
		
			
				
					|  |  |  |         // todo 先逻辑删除,在插入
 | 
			
		
	
		
			
				
					|  |  |  |         /*funcInfoDao.updateOldFuncInfo(customerId,authAppId); | 
			
		
	
		
			
				
					|  |  |  |         funcInfoDao.insertFuncInfo(funcInfos);*/ | 
			
		
	
		
			
				
					|  |  |  |         // 授权信息放入缓存
 | 
			
		
	
		
			
				
					|  |  |  |         redisThird.setAuthInfo(authorizationInfoResultDTO,customerId,clientType); | 
			
		
	
		
			
				
					|  |  |  |         //authorizer_refresh_token 放入缓存
 | 
			
		
	
	
		
			
				
					|  |  | @ -375,6 +376,7 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe | 
			
		
	
		
			
				
					|  |  |  |         String client = authCodeAndTime.getClientType(); | 
			
		
	
		
			
				
					|  |  |  |         String expiresIn = authCodeAndTime.getExpiresIn(); | 
			
		
	
		
			
				
					|  |  |  |         String customerId = tokenDto.getCustomerId(); | 
			
		
	
		
			
				
					|  |  |  |         customerId = "f530774b31e0609a3c7f0f83794cda0c"; | 
			
		
	
		
			
				
					|  |  |  |         Date expiresInTime = this.countExpirationTime(expiresIn); | 
			
		
	
		
			
				
					|  |  |  |         if (StringUtils.isBlank(customerId)||StringUtils.isBlank(client)||StringUtils.isBlank(authCode)||StringUtils.isBlank(expiresIn)){ | 
			
		
	
		
			
				
					|  |  |  |             log.info("客户ID = "+customerId+", 客户端类型为 = "+client+", 授权码为 = "+authCode+", 有效期 = "+expiresIn); | 
			
		
	
	
		
			
				
					|  |  | @ -387,9 +389,11 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe | 
			
		
	
		
			
				
					|  |  |  |         //授权方AppId
 | 
			
		
	
		
			
				
					|  |  |  |         formDTO.setCustomerId(customerId); | 
			
		
	
		
			
				
					|  |  |  |         log.info(formDTO.toString()); | 
			
		
	
		
			
				
					|  |  |  |         authCodeDao.deleteCustomerAuthCode(customerId,client); | 
			
		
	
		
			
				
					|  |  |  |         authCodeDao.insertRedirectAuthCode(formDTO); | 
			
		
	
		
			
				
					|  |  |  |         //authCode存缓存
 | 
			
		
	
		
			
				
					|  |  |  |         redisThird.setAuthCode(formDTO); | 
			
		
	
		
			
				
					|  |  |  |         this.authInfoByAuthCode(authCode, customerId,client); | 
			
		
	
		
			
				
					|  |  |  |         log.info("回调结束"); | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  | 
 |