|
@@ -51,8 +51,6 @@ import java.util.Map;
|
|
|
public class FileInfoServiceImpl extends ServiceImpl<FileInfoMapper, FileInfo> implements IFileInfoService {
|
|
|
@Value("${jeecg.path.image-upload}")
|
|
|
private String imageUploadPath;
|
|
|
- @Value("${jeecg.path.video-upload}")
|
|
|
- private String videoUploadPath;
|
|
|
@Resource
|
|
|
FileInfoMapper fileInfoMapper;
|
|
|
@Resource
|
|
@@ -74,23 +72,23 @@ public class FileInfoServiceImpl extends ServiceImpl<FileInfoMapper, FileInfo> i
|
|
|
CtopOauthToken token = ctopOauthTokenService.getOauthTokenByAccountId(accountId);
|
|
|
JSONObject jsonObject = videoUpload(token, videoUrl,materialName);
|
|
|
if (Check.isNull(jsonObject)) {
|
|
|
- log.info("头条上传素材返回结果为空,返回信息:{},accountId:{}", jsonObject, accountId);
|
|
|
+ log.info("头条视频素材推送信息==>返回结果为空,返回信息:{},accountId:{}", jsonObject, accountId);
|
|
|
String message = messageTemplate.getMaterialSyncTemplate(project.getProjectName(), accountId, userAllocation.getAuthName(), materialName, "头条上传素材返回结果为空");
|
|
|
sendMessageService.sendMessage(userId, message);
|
|
|
return ;
|
|
|
}
|
|
|
Integer code = jsonObject.getInteger("code");
|
|
|
if (code == 0) {
|
|
|
- log.info("头条上传素材成功,返回信息:{},accountId:{}", jsonObject, accountId);
|
|
|
+ log.info("头条视频素材推送信息==>上传素材成功,返回信息:{},accountId:{}", jsonObject, accountId);
|
|
|
String message = messageTemplate.getMaterialSyncSucessTemplate(project.getProjectName(), accountId, userAllocation.getAuthName(), materialName, jsonObject.getString("message"));
|
|
|
sendMessageService.sendMessage(userId, message);
|
|
|
return ;
|
|
|
}
|
|
|
- log.error("头条上传素材失败,返回信息:{},accountId:{}", jsonObject, accountId);
|
|
|
+ log.error("头条视频素材推送信息==>上传素材失败,返回信息:{},accountId:{}", jsonObject, accountId);
|
|
|
String message = messageTemplate.getMaterialSyncTemplate(project.getProjectName(), accountId, userAllocation.getAuthName(), materialName, jsonObject.getString("message"));
|
|
|
sendMessageService.sendMessage(userId, message);
|
|
|
} catch (Exception e) {
|
|
|
- log.error("头条上传视频文件失败,accountId:{}", accountId);
|
|
|
+ log.error("头条视频素材推送信息==>上传视频文件异常,accountId:{}", accountId);
|
|
|
e.printStackTrace();
|
|
|
String message = messageTemplate.getMaterialSyncTemplate(project.getProjectName(), accountId, userAllocation.getAuthName(), materialName, "头条api上传素材返回结果异常:系统异常,联系研发人员");
|
|
|
sendMessageService.sendMessage(userId, message);
|