|
|
@ -160,7 +160,9 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe |
|
|
|
this.saveAuthAccountInfo(customerId,authAppId,clientType); |
|
|
|
// customerMpDao.updateAuthorizationFlag(authAppId);
|
|
|
|
case ModuleConstant.UNAUTHORIZED://用户取消授权
|
|
|
|
return ModuleConstant.SUCCESS; |
|
|
|
//todo 取消授权
|
|
|
|
String authorizerAppId = result.get(ModuleConstant.AUTHORIZER_APP_ID_HUMP); |
|
|
|
customerMpDao.updateAuthorizationFlag(authorizerAppId); |
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
log.error(e.getMessage()); |
|
|
@ -498,9 +500,9 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe |
|
|
|
*/ |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public void updateCustomerMpAppIdAndCreateOpenPlatform(String customerId,String authAppId,String clientType){ |
|
|
|
Integer notAuthCount = customerMpDao.selectAuthCount(customerId); |
|
|
|
Integer authCount = customerMpDao.selectAuthCount(customerId); |
|
|
|
String openPlatformId = null; |
|
|
|
if (notAuthCount==NumConstant.ZERO){ |
|
|
|
if (authCount==NumConstant.ZERO){ |
|
|
|
//没有任何一个小程序/公众号授权,【先创建,再绑定】
|
|
|
|
JSONObject jsonObject = new JSONObject(); |
|
|
|
jsonObject.put(ModuleConstant.APP_ID,authAppId); |
|
|
@ -527,7 +529,7 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe |
|
|
|
//插入 open_platform_account 表
|
|
|
|
openPlatformAccountDao.insertOpenPlatFormAccount(coForm); |
|
|
|
openPlatformId = coForm.getId(); |
|
|
|
}else if (notAuthCount>NumConstant.ZERO){ |
|
|
|
}else if (authCount>NumConstant.ZERO){ |
|
|
|
String openAppId = openPlatformAccountDao.selectOpenAppIdByCustomerId(customerId); |
|
|
|
JSONObject jsonObject = new JSONObject(); |
|
|
|
jsonObject.put(ModuleConstant.LOW_APP_ID,componentAppId); |
|
|
|