|
|
|
@@ -285,30 +285,34 @@ public class WxProjectConfigController extends BaseController { |
|
|
|
|
|
|
|
wxAppinfoService.saveOrUpdate(wxAppinfo); |
|
|
|
|
|
|
|
WxAuthorizerInfo wxAuthorizerInfo = new WxAuthorizerInfo(); |
|
|
|
WxAuthorizerInfo wxAuthorizerInfo = wxAuthorizerInfoService.getByAppId(wxAppinfo.getAppId()); |
|
|
|
if(wxAuthorizerInfo == null){ |
|
|
|
wxAuthorizerInfo = new WxAuthorizerInfo(); |
|
|
|
} |
|
|
|
wxAuthorizerInfo.updateTenantInfo(wxAppinfo); |
|
|
|
wxAuthorizerInfo.setType(wxAppinfo.getType()); |
|
|
|
wxAuthorizerInfo.setAuthorizerAppid(wxAppinfo.getAppId()); |
|
|
|
if(wxAppinfo.getId() == null && wxAuthorizerInfo.getAuthorizationStatus() == null){ |
|
|
|
|
|
|
|
if(wxAuthorizerInfo.getAuthorizationStatus() == null){ |
|
|
|
wxAuthorizerInfo.setAuthorizationStatus(0);//授权状态,0为已授权,1为已取消授权 |
|
|
|
wxAuthorizerInfo.setAuthTime(new Date()); |
|
|
|
} |
|
|
|
if(wxAppinfo.getId() == null && wxAuthorizerInfo.getBaseStatus() == null){ |
|
|
|
if(wxAuthorizerInfo.getBaseStatus() == null){ |
|
|
|
wxAuthorizerInfo.setBaseStatus(0);//微信基础版本设置状态,0为已设置,1为设置失败 |
|
|
|
wxAuthorizerInfo.setBaseTime(new Date()); |
|
|
|
} |
|
|
|
if(wxAppinfo.getId() == null && wxAuthorizerInfo.getDomainStatus() == null){ |
|
|
|
if(wxAuthorizerInfo.getDomainStatus() == null){ |
|
|
|
wxAuthorizerInfo.setDomainStatus(0);//服务器域名设置状态,0为已设置,1为设置失败 |
|
|
|
wxAuthorizerInfo.setDomainTime(new Date()); |
|
|
|
} |
|
|
|
if(wxAppinfo.getId() == null && wxAuthorizerInfo.getWebdomainStatus() == null){ |
|
|
|
if(wxAuthorizerInfo.getWebdomainStatus() == null){ |
|
|
|
wxAuthorizerInfo.setWebdomainStatus(0);//服务器业务域名设置状态,0为已设置,1为设置失败 |
|
|
|
wxAuthorizerInfo.setWebdomainTime(new Date()); |
|
|
|
} |
|
|
|
if(wxAppinfo.getId() == null && StringUtils.isBlank(wxAuthorizerInfo.getRefreshToken())){ |
|
|
|
if(StringUtils.isBlank(wxAuthorizerInfo.getRefreshToken())){ |
|
|
|
wxAuthorizerInfo.setRefreshToken(""); |
|
|
|
} |
|
|
|
if(wxAppinfo.getId() == null && StringUtils.isBlank(wxAuthorizerInfo.getAccessToken())){ |
|
|
|
if(StringUtils.isBlank(wxAuthorizerInfo.getAccessToken())){ |
|
|
|
wxAuthorizerInfo.setAccessToken(""); |
|
|
|
} |
|
|
|
wxAuthorizerInfoService.saveOrUpdate(wxAuthorizerInfo); |
|
|
|
|