|
|
@@ -50,7 +50,6 @@ import com.tencent.ads.exception.TencentAdsResponseException;
|
|
|
import com.tencent.ads.model.v3.ActionButtonComponent;
|
|
|
import com.tencent.ads.model.v3.ActionButtonStruct;
|
|
|
import com.tencent.ads.model.v3.AdgroupsAddRequest;
|
|
|
-import com.tencent.ads.model.v3.AdgroupsAddResponseData;
|
|
|
import com.tencent.ads.model.v3.AdgroupsDeleteRequest;
|
|
|
import com.tencent.ads.model.v3.AdgroupsUpdateRequest;
|
|
|
import com.tencent.ads.model.v3.BrandComponent;
|
|
|
@@ -574,7 +573,7 @@ public class AdPlanConfServiceImpl extends ServiceImpl<AdPlanConfMapper, AdPlanC
|
|
|
tencentAds = clientFactory.getTencentAds(jobNumber, Constant.MAIN_ORG_ACCOUNT_ID);
|
|
|
} catch (Exception e) {
|
|
|
log.error("创建TencentAds实例失败,confId={}", confId, e);
|
|
|
- conf.setStatus(AdPlanStatus.FAILED);
|
|
|
+ conf.setStatus(AdPlantatus.FAILED);
|
|
|
conf.setFailReason("创建TencentAds实例失败: " + StrUtil.truncateError(e.getMessage()));
|
|
|
this.updateById(conf);
|
|
|
return;
|
|
|
@@ -583,12 +582,18 @@ public class AdPlanConfServiceImpl extends ServiceImpl<AdPlanConfMapper, AdPlanC
|
|
|
// 第一步:准备阶段 - 填充创意的 imageId/videoId
|
|
|
try {
|
|
|
prepareCreativeAssets(conf, tencentAds, plans);
|
|
|
+ this.lambdaUpdate()
|
|
|
+ .eq(AdPlanConf::getId, confId)
|
|
|
+ .set(AdPlanConf::getFailReason, "填充创意资产完毕")
|
|
|
+ .update();
|
|
|
} catch (Exception e) {
|
|
|
log.error("准备创意资产失败,confId={}", confId, e);
|
|
|
// 更新 AdPlanConf 状态为失败
|
|
|
- conf.setStatus(AdPlanStatus.FAILED);
|
|
|
- conf.setFailReason("准备创意资产失败: " + StrUtil.truncateError(e.getMessage()));
|
|
|
- this.updateById(conf);
|
|
|
+ this.lambdaUpdate()
|
|
|
+ .eq(AdPlanConf::getId, confId)
|
|
|
+ .set(AdPlanConf::getStatus, AdPlanStatus.FAILED)
|
|
|
+ .set(AdPlanConf::getFailReason, "准备创意资产失败: " + StrUtil.truncateError(e.getMessage()))
|
|
|
+ .update();
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
@@ -761,6 +766,7 @@ public class AdPlanConfServiceImpl extends ServiceImpl<AdPlanConfMapper, AdPlanC
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ adPlanCreativeService.updateBatchById(creatives);
|
|
|
}
|
|
|
|
|
|
log.info("准备创意资产完成");
|