|
@@ -314,6 +314,11 @@ public class MaterialUploadTaskServiceImpl
|
|
|
new Runnable() {
|
|
|
@Override
|
|
|
public void run() {
|
|
|
+ try {
|
|
|
+ Thread.sleep(1500L);
|
|
|
+ } catch (InterruptedException e) {
|
|
|
+ throw new RuntimeException(e);
|
|
|
+ }
|
|
|
String token = materialUploadTaskMapper.getTAgentToken(73970348172L);
|
|
|
if (Check.isNull(token)) {
|
|
|
log.error("此账户id未获取到代理商token");
|
|
@@ -353,20 +358,19 @@ public class MaterialUploadTaskServiceImpl
|
|
|
}
|
|
|
bufferedReader.close();
|
|
|
JSONObject resultJson = JSONObject.parseObject(result.toString());
|
|
|
- System.err.println(resultJson);
|
|
|
if (!Check.isNull(resultJson)) {
|
|
|
if (resultJson.getInteger("code") == 0) {
|
|
|
JSONObject data = resultJson.getJSONObject("data");
|
|
|
if (!Check.isNull(data)) {
|
|
|
JSONObject videoInfo = data.getJSONObject("video_info");
|
|
|
materialUploadTaskMapper.updateAgentStatus(task.getSignature(), videoInfo.getString("video_id"), videoInfo.getLong("material_id"), 2, "同步成功");
|
|
|
- log.error("头条同步步素材到代理商成功");
|
|
|
+ log.error("头条同步素材到代理商成功");
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
String message = resultJson.getString("message");
|
|
|
materialUploadTaskMapper.updateAgentStatus(task.getSignature(), null, null, 3, message);
|
|
|
- log.error("头条同步步素材到代理商失败,返回信息:{}", resultJson);
|
|
|
+ log.error("头条同步素材到代理商失败,返回信息:{}", resultJson);
|
|
|
}
|
|
|
}
|
|
|
}
|