|
|
|
@ -106,7 +106,11 @@ public abstract class SyncAccountsJobAbstract {
|
|
|
|
|
private String buildRobotErrorMessage(Exception e){
|
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
|
|
jsonObject.put("同步任务",getClassName());
|
|
|
|
|
jsonObject.put("异常信息",e.getMessage());
|
|
|
|
|
String errorMessage = e.getMessage();
|
|
|
|
|
if (org.apache.commons.lang3.StringUtils.isNotBlank(errorMessage)){
|
|
|
|
|
errorMessage = errorMessage.replaceAll("\\\\","");
|
|
|
|
|
}
|
|
|
|
|
jsonObject.put("异常信息", errorMessage);
|
|
|
|
|
return jsonObject.toJSONString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -347,7 +351,7 @@ public abstract class SyncAccountsJobAbstract {
|
|
|
|
|
JSONObject value = body.getJSONObject("value");
|
|
|
|
|
String token = value.getString("accessToken");
|
|
|
|
|
context.setOpenToken(token);
|
|
|
|
|
redisCache.setCacheObject(RedisConstants.CJT_TOKEN_CACHE_KEY,token,10, TimeUnit.MINUTES);
|
|
|
|
|
redisCache.setCacheObject(RedisConstants.CJT_TOKEN_CACHE_KEY,token,5, TimeUnit.MINUTES);
|
|
|
|
|
return token;
|
|
|
|
|
}else{
|
|
|
|
|
context.setOpenToken(openToken);
|
|
|
|
|