|
|
@@ -188,8 +188,12 @@ public class AdPlanConfServiceImpl extends ServiceImpl<AdPlanConfMapper, AdPlanC
|
|
|
try {
|
|
|
log.info("开始处理广告计划,planId={}, adgroupName={}", plan.getId(), plan.getAdgroupName());
|
|
|
|
|
|
- if (plan.getAdgroupId() > 0 || plan.getStatus() == AdPlanStatus.SUCCESS)
|
|
|
- continue;
|
|
|
+ if (plan.getAdgroupId() > 0 || plan.getStatus() == AdPlanStatus.SUCCESS) {
|
|
|
+ // 创建动态创意
|
|
|
+ createDynamicCreatives(plan, jobNumber, 33453856L);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
// 更新状态为执行中
|
|
|
plan.setStatus(AdPlanStatus.IN_PROGRESS);
|
|
|
@@ -221,6 +225,7 @@ public class AdPlanConfServiceImpl extends ServiceImpl<AdPlanConfMapper, AdPlanC
|
|
|
|
|
|
// 更新状态为成功
|
|
|
plan.setStatus(AdPlanStatus.SUCCESS);
|
|
|
+ plan.setFailReason("");
|
|
|
plan.setSuccessTime(LocalDateTime.now());
|
|
|
adPlanService.updateById(plan);
|
|
|
|
|
|
@@ -307,6 +312,7 @@ public class AdPlanConfServiceImpl extends ServiceImpl<AdPlanConfMapper, AdPlanC
|
|
|
// 更新创意ID和状态
|
|
|
creative.setCreativeId(response.getDynamicCreativeId());
|
|
|
creative.setStatus(AdPlanStatus.SUCCESS);
|
|
|
+ creative.setFailReason("");
|
|
|
creative.setSuccessTime(LocalDateTime.now());
|
|
|
adPlanCreativeService.updateById(creative);
|
|
|
|
|
|
@@ -409,10 +415,11 @@ public class AdPlanConfServiceImpl extends ServiceImpl<AdPlanConfMapper, AdPlanC
|
|
|
List<BrandComponent> brands = new ArrayList<>();
|
|
|
|
|
|
BrandComponent brand = new BrandComponent();
|
|
|
- BrandStruct brandValue = new BrandStruct();
|
|
|
- brandValue.setBrandName("情感美文");
|
|
|
- brandValue.setBrandImageId("30026044695");
|
|
|
- brand.setValue(brandValue);
|
|
|
+ brand.setComponentId(44579024220L);
|
|
|
+ // BrandStruct brandValue = new BrandStruct();
|
|
|
+ // brandValue.setBrandName("情感美文");
|
|
|
+ // brandValue.setBrandImageId("30026044695");
|
|
|
+ // brand.setValue(brandValue);
|
|
|
brands.add(brand);
|
|
|
|
|
|
return brands;
|