| 
						
						
							
								
							
						
						
					 | 
					@ -119,7 +119,7 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            log.info(String.format(ThirdRunTimeInfoConstant.MSG,msg)); | 
					 | 
					 | 
					            log.info(String.format(ThirdRunTimeInfoConstant.MSG,msg)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            // 将xml转为map
 | 
					 | 
					 | 
					            // 将xml转为map
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            Map<String, String> result = WXXmlToMapUtil.xmlToMap(msg); | 
					 | 
					 | 
					            Map<String, String> result = WXXmlToMapUtil.xmlToMap(msg); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            String infotype = result.get(ModuleConstant.INFO_TYPE);  //获取infotype,注:微信开放平台文档中标明固定为:"component_verify_ticket",但参考其他代码,还包含authorized???
 | 
					 | 
					 | 
					            String infotype = result.get(ModuleConstant.INFO_TYPE); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            log.info(infotype); | 
					 | 
					 | 
					            log.info(infotype); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            switch (infotype){ | 
					 | 
					 | 
					            switch (infotype){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                case ModuleConstant.TICKET_UNDERLINE_KEY:   //接收票据 【component_verify_ticket】
 | 
					 | 
					 | 
					                case ModuleConstant.TICKET_UNDERLINE_KEY:   //接收票据 【component_verify_ticket】
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -131,7 +131,7 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    ticketFormDTO.setComponentAppId(componentAppId); | 
					 | 
					 | 
					                    ticketFormDTO.setComponentAppId(componentAppId); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    ticketFormDTO.setComponentVerifyTicket(ComponentVerifyTicket); | 
					 | 
					 | 
					                    ticketFormDTO.setComponentVerifyTicket(ComponentVerifyTicket); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    //先逻辑删
 | 
					 | 
					 | 
					                    //先逻辑删
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                    ticketDao.updateOldComponentVerifyTicket(); | 
					 | 
					 | 
					                    ticketDao.deleteOldComponentVerifyTicket(); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                    ticketDao.insertComponentVerifyTicket(ticketFormDTO); | 
					 | 
					 | 
					                    ticketDao.insertComponentVerifyTicket(ticketFormDTO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    log.info(ModuleConstant.TICKET_UNDERLINE_KEY+":"+ComponentVerifyTicket); | 
					 | 
					 | 
					                    log.info(ModuleConstant.TICKET_UNDERLINE_KEY+":"+ComponentVerifyTicket); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    break; | 
					 | 
					 | 
					                    break; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -509,79 +509,87 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public void createAndBindOpenAccount(String customerId,String authAppId,String clientType){ | 
					 | 
					 | 
					    public void createAndBindOpenAccount(String customerId,String authAppId,String clientType){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        log.info("开始创建开放平台账号并绑定"); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        List<String> authCount = customerMpDao.selectAuthCount(customerId); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        String openPlatformId = null; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if (authCount.size()>0){ | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            openPlatformId = openPlatformAccountDao.selectOpenAppIdByCustomerId(customerId); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        Map<String, Object> authorizerRefreshToken = redisThird.getAuthorizerRefreshToken(customerId + ThirdRedisKeyConstant.COLON + clientType); | 
					 | 
					 | 
					        Map<String, Object> authorizerRefreshToken = redisThird.getAuthorizerRefreshToken(customerId + ThirdRedisKeyConstant.COLON + clientType); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        String authorizerAccessToken = authorizerRefreshToken.get("authorizerAccessToken").toString(); | 
					 | 
					 | 
					        String authorizerAccessToken = authorizerRefreshToken.get("authorizerAccessToken").toString(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        if (authCount.size()==NumConstant.ZERO){ | 
					 | 
					 | 
					        JSONObject bindInfoForm = new JSONObject(); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            log.info("未查询到该客户授权信息,先创建开放平台账号,再绑定"); | 
					 | 
					 | 
					        bindInfoForm.put(ModuleConstant.LOW_APP_ID,authAppId); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            //没有任何一个小程序/公众号授权,【先创建,再绑定】
 | 
					 | 
					 | 
					        String bindResult = HttpClientManager.getInstance().sendPostByJSON(WxMaCodeConstant.API_OPEN_GET + authorizerAccessToken, JSON.toJSONString(bindInfoForm)).getData(); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            JSONObject jsonObject = new JSONObject(); | 
					 | 
					 | 
					        Map<String,Object> bindInfo = JSON.parseObject(bindResult, Map.class); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            jsonObject.put(ModuleConstant.LOW_APP_ID,authAppId); | 
					 | 
					 | 
					        boolean bindStatus = bindInfo.containsKey(ModuleConstant.OPEN_APP_ID); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            // 此处的 access_token 为 【authorizer_access_token】
 | 
					 | 
					 | 
					        if (bindStatus != true) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            String data = HttpClientManager.getInstance().sendPostByJSON(WxMaCodeConstant.API_CREATE_OPEN + authorizerAccessToken, JSON.toJSONString(jsonObject)).getData(); | 
					 | 
					 | 
					            log.info("开始创建开放平台账号并绑定"); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            Map<String,Object> map = JSON.parseObject(data, Map.class); | 
					 | 
					 | 
					            List<String> authCount = customerMpDao.selectAuthCount(customerId); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            openPlatformId = map.get(ModuleConstant.OPEN_APP_ID).toString(); | 
					 | 
					 | 
					            String openPlatformId = null; | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            CreateOpenResultDTO createOpen = new CreateOpenResultDTO(); | 
					 | 
					 | 
					            if (authCount.size() > 0) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            createOpen.setErrCode((Integer)map.get(ModuleConstant.ERR_CODE)); | 
					 | 
					 | 
					                openPlatformId = openPlatformAccountDao.selectOpenAppIdByCustomerId(customerId); | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					            createOpen.setErrMsg(map.get(ModuleConstant.ERR_MSG).toString()); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            createOpen.setOpenAppId(map.get(ModuleConstant.OPEN_APP_ID).toString()); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            switch (createOpen.getErrCode()){ | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                case NumConstant.ZERO: | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    log.info(CREATE_AND_BIND_SUCCESS); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    CreateOpenFormDTO coForm = new CreateOpenFormDTO(); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    coForm.setOpenid(map.get(ModuleConstant.OPEN_APP_ID).toString()); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    coForm.setCustomerId(customerId); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    //插入 open_platform_account 表
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    openPlatformAccountDao.insertOpenPlatFormAccount(coForm); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    break; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                case NumConstant.ONE_NEG: | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    throw new RenException(SYSTEM_ERROR); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                case ModuleConstant.FORTY_THOUSAND_AND_THIRTEEN: | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    throw new RenException(INVALID_APP_ID); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                case ModuleConstant.EIGHTY_NINE_THOUSAND: | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    throw new RenException(ACCOUNT_HAS_BOUND_OPEN); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        }else if (authCount.size()>NumConstant.ZERO && !authCount.contains(authAppId)){ | 
					 | 
					 | 
					            if (authCount.size() == NumConstant.ZERO) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            log.info("该客户已创建过开放平台账号,直接绑定"); | 
					 | 
					 | 
					                log.info("未查询到该客户授权信息,先创建开放平台账号,再绑定"); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            JSONObject jsonObject = new JSONObject(); | 
					 | 
					 | 
					                //没有任何一个小程序/公众号授权,【先创建,再绑定】
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            jsonObject.put(ModuleConstant.LOW_APP_ID,authAppId); | 
					 | 
					 | 
					                JSONObject jsonObject = new JSONObject(); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            jsonObject.put(ModuleConstant.OPEN_APP_ID,openPlatformId); | 
					 | 
					 | 
					                jsonObject.put(ModuleConstant.LOW_APP_ID, authAppId); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            String data = HttpClientManager.getInstance().sendPostByJSON(WxMaCodeConstant.API_BIND_OPEN + authorizerAccessToken, JSON.toJSONString(jsonObject)).getData(); | 
					 | 
					 | 
					                // 此处的 access_token 为 【authorizer_access_token】
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            Map<String,Object> map = JSON.parseObject(data, Map.class); | 
					 | 
					 | 
					                String data = HttpClientManager.getInstance().sendPostByJSON(WxMaCodeConstant.API_CREATE_OPEN + authorizerAccessToken, JSON.toJSONString(jsonObject)).getData(); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            CreateOpenResultDTO createOpen = new CreateOpenResultDTO(); | 
					 | 
					 | 
					                Map<String, Object> map = JSON.parseObject(data, Map.class); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            createOpen.setErrCode((Integer)map.get(ModuleConstant.ERR_CODE)); | 
					 | 
					 | 
					                openPlatformId = map.get(ModuleConstant.OPEN_APP_ID).toString(); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            createOpen.setErrMsg(map.get(ModuleConstant.ERR_MSG).toString()); | 
					 | 
					 | 
					                CreateOpenResultDTO createOpen = new CreateOpenResultDTO(); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            switch (createOpen.getErrCode()){ | 
					 | 
					 | 
					                createOpen.setErrCode((Integer) map.get(ModuleConstant.ERR_CODE)); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                case NumConstant.ZERO: | 
					 | 
					 | 
					                createOpen.setErrMsg(map.get(ModuleConstant.ERR_MSG).toString()); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                    log.info(BIND_SUCCESS); | 
					 | 
					 | 
					                createOpen.setOpenAppId(map.get(ModuleConstant.OPEN_APP_ID).toString()); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                    break; | 
					 | 
					 | 
					                switch (createOpen.getErrCode()) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                case NumConstant.ONE_NEG: | 
					 | 
					 | 
					                    case NumConstant.ZERO: | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                    throw new RenException(SYSTEM_ERROR); | 
					 | 
					 | 
					                        log.info(CREATE_AND_BIND_SUCCESS); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                case ModuleConstant.FORTY_THOUSAND_AND_THIRTEEN: | 
					 | 
					 | 
					                        CreateOpenFormDTO coForm = new CreateOpenFormDTO(); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                    throw new RenException(INVALID_APP_ID); | 
					 | 
					 | 
					                        coForm.setOpenid(map.get(ModuleConstant.OPEN_APP_ID).toString()); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                case ModuleConstant.EIGHTY_NINE_THOUSAND: | 
					 | 
					 | 
					                        coForm.setCustomerId(customerId); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                    throw new RenException(ACCOUNT_HAS_BOUND_OPEN); | 
					 | 
					 | 
					                        //插入 open_platform_account 表
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                case ModuleConstant.EIGHTY_NINE_THOUSAND_AND_ONE: | 
					 | 
					 | 
					                        openPlatformAccountDao.deleteOldOpenPlatFprmAccount(customerId); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                    throw new RenException(NOT_SAME_CONTRACTOR); | 
					 | 
					 | 
					                        openPlatformAccountDao.insertOpenPlatFormAccount(coForm); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                case ModuleConstant.EIGHTY_NINE_THOUSAND_AND_THREE: | 
					 | 
					 | 
					                        break; | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                    throw new RenException(NOT_ALLOWED_OPERATE); | 
					 | 
					 | 
					                    case NumConstant.ONE_NEG: | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                case ModuleConstant.EIGHTY_NINE_THOUSAND_AND_FOUR: | 
					 | 
					 | 
					                        throw new RenException(SYSTEM_ERROR); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                    throw new RenException(TO_LIMIT); | 
					 | 
					 | 
					                    case ModuleConstant.FORTY_THOUSAND_AND_THIRTEEN: | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        throw new RenException(INVALID_APP_ID); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                    case ModuleConstant.EIGHTY_NINE_THOUSAND: | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        throw new RenException(ACCOUNT_HAS_BOUND_OPEN); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            } else if (authCount.size() > NumConstant.ZERO && !authCount.contains(authAppId)) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                log.info("该客户已创建过开放平台账号,直接绑定"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                JSONObject jsonObject = new JSONObject(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                jsonObject.put(ModuleConstant.LOW_APP_ID, authAppId); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                jsonObject.put(ModuleConstant.OPEN_APP_ID, openPlatformId); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                String data = HttpClientManager.getInstance().sendPostByJSON(WxMaCodeConstant.API_BIND_OPEN + authorizerAccessToken, JSON.toJSONString(jsonObject)).getData(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                Map<String, Object> map = JSON.parseObject(data, Map.class); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                CreateOpenResultDTO createOpen = new CreateOpenResultDTO(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                createOpen.setErrCode((Integer) map.get(ModuleConstant.ERR_CODE)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                createOpen.setErrMsg(map.get(ModuleConstant.ERR_MSG).toString()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                switch (createOpen.getErrCode()) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                    case NumConstant.ZERO: | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        log.info(BIND_SUCCESS); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        break; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                    case NumConstant.ONE_NEG: | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        throw new RenException(SYSTEM_ERROR); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                    case ModuleConstant.FORTY_THOUSAND_AND_THIRTEEN: | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        throw new RenException(INVALID_APP_ID); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                    case ModuleConstant.EIGHTY_NINE_THOUSAND: | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        throw new RenException(ACCOUNT_HAS_BOUND_OPEN); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                    case ModuleConstant.EIGHTY_NINE_THOUSAND_AND_ONE: | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        throw new RenException(NOT_SAME_CONTRACTOR); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                    case ModuleConstant.EIGHTY_NINE_THOUSAND_AND_THREE: | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        throw new RenException(NOT_ALLOWED_OPERATE); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                    case ModuleConstant.EIGHTY_NINE_THOUSAND_AND_FOUR: | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        throw new RenException(TO_LIMIT); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            //插入 binding_account
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            BindingAccountFormDTO bindingAccount = new BindingAccountFormDTO(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            bindingAccount.setOpenPlatformAccountId(openPlatformId); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            bindingAccount.setAuthAppId(authAppId); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            bindingAccount.setClientType(clientType); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            bindingAccount.setCustomerId(customerId); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            bindingAccountDao.insertBindingAccount(bindingAccount); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            log.info("创建绑定账号结束"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //插入 binding_account
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        BindingAccountFormDTO bindingAccount = new BindingAccountFormDTO(); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        bindingAccount.setOpenPlatformAccountId(openPlatformId); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        bindingAccount.setAuthAppId(authAppId); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        bindingAccount.setClientType(clientType); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        bindingAccount.setCustomerId(customerId); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        bindingAccountDao.insertBindingAccount(bindingAccount); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        log.info("创建绑定账号结束"); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    /** | 
					 | 
					 | 
					    /** | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |