|
|
@ -378,7 +378,6 @@ 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); |
|
|
@ -456,18 +455,20 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe |
|
|
|
//todo 小程序配置的类目信息插入
|
|
|
|
List<MiniCategoryInfoFormDTO> categoryInfoList = new ArrayList<>(); |
|
|
|
List<Map> categories = (List<Map>) miniProgramInfo.get(ModuleConstant.CATEGORIES); |
|
|
|
categories.forEach(category -> { |
|
|
|
category.forEach((key,value) -> { |
|
|
|
MiniCategoryInfoFormDTO categoryInfo = new MiniCategoryInfoFormDTO(); |
|
|
|
categoryInfo.setCustomerId(customerId); |
|
|
|
categoryInfo.setClientType(clientType); |
|
|
|
categoryInfo.setCategorySort(key.toString()); |
|
|
|
categoryInfo.setCategoryName(value.toString()); |
|
|
|
categoryInfo.setPrimaryId(primaryId); |
|
|
|
categoryInfoList.add(categoryInfo); |
|
|
|
if (categories.size() != NumConstant.ZERO) { |
|
|
|
categories.forEach(category -> { |
|
|
|
category.forEach((key, value) -> { |
|
|
|
MiniCategoryInfoFormDTO categoryInfo = new MiniCategoryInfoFormDTO(); |
|
|
|
categoryInfo.setCustomerId(customerId); |
|
|
|
categoryInfo.setClientType(clientType); |
|
|
|
categoryInfo.setCategorySort(key.toString()); |
|
|
|
categoryInfo.setCategoryName(value.toString()); |
|
|
|
categoryInfo.setPrimaryId(primaryId); |
|
|
|
categoryInfoList.add(categoryInfo); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
miniCategoryInfoDao.insertCategoryInfo(categoryInfoList); |
|
|
|
miniCategoryInfoDao.insertCategoryInfo(categoryInfoList); |
|
|
|
} |
|
|
|
}else { |
|
|
|
log.info("授权方为公众号 并 开始插入信息"); |
|
|
|
PaInfoFormDTO paInfoFormDTO = this.mapToEntity(authorizerInfo, PaInfoFormDTO.class); |
|
|
@ -499,7 +500,7 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe |
|
|
|
*/ |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public void updateCustomerMpAppIdAndCreateOpenPlatform(String customerId,String authAppId,String clientType){ |
|
|
|
log.info("开始创建开放平台账号并绑定"); |
|
|
|
/*log.info("开始创建开放平台账号并绑定"); |
|
|
|
Integer authCount = customerMpDao.selectAuthCount(customerId); |
|
|
|
String openPlatformId = null; |
|
|
|
Map<String, Object> authorizerRefreshToken = redisThird.getAuthorizerRefreshToken(customerId + ThirdRedisKeyConstant.COLON + clientType); |
|
|
@ -561,7 +562,7 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe |
|
|
|
case ModuleConstant.EIGHTY_NINE_THOUSAND_AND_FOUR: |
|
|
|
throw new RenException(TO_LIMIT); |
|
|
|
} |
|
|
|
} |
|
|
|
}*/ |
|
|
|
AuthCodeFormDTO formDTO = new AuthCodeFormDTO(); |
|
|
|
formDTO.setClientType(clientType); |
|
|
|
formDTO.setAuthAppId(authAppId); |
|
|
@ -569,12 +570,12 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe |
|
|
|
//回填customer_mp的appId 只需以上三个字段
|
|
|
|
customerMpDao.updateAppIDByCustomerIdAndClient(formDTO); |
|
|
|
//插入 binding_account
|
|
|
|
BindingAccountFormDTO bindingAccount = new BindingAccountFormDTO(); |
|
|
|
/*BindingAccountFormDTO bindingAccount = new BindingAccountFormDTO(); |
|
|
|
bindingAccount.setOpenPlatformAccountId(openPlatformId); |
|
|
|
bindingAccount.setAuthAppId(authAppId); |
|
|
|
bindingAccount.setClientType(clientType); |
|
|
|
bindingAccount.setCustomerId(customerId); |
|
|
|
bindingAccountDao.insertBindingAccount(bindingAccount); |
|
|
|
bindingAccountDao.insertBindingAccount(bindingAccount);*/ |
|
|
|
log.info("创建绑定账号结束"); |
|
|
|
} |
|
|
|
|
|
|
|