|
|
@@ -162,7 +162,15 @@ public class AdPlanConfServiceImpl extends ServiceImpl<AdPlanConfMapper, AdPlanC
|
|
|
public void asyncReGeneratePlan(Long confId) {
|
|
|
log.info("异步重新生成计划开始,配置ID: {}", confId);
|
|
|
// 根据配置ID获取计划列表
|
|
|
+ AdPlanConf conf = this.getById(confId);
|
|
|
List<AdPlan> plans = adPlanService.getPlansByConfId(confId);
|
|
|
+ plans.forEach(plan -> {
|
|
|
+ plan.setConversionId(conf.getConversionId());
|
|
|
+ plan.setDramaId(conf.getDramaId());
|
|
|
+ plan.setWxCorpid(conf.getWxCorpid());
|
|
|
+ plan.setBidAmount(conf.getBidAmount());
|
|
|
+ });
|
|
|
+ adPlanService.updateBatchById(plans);
|
|
|
List<AdPlanCreative> creatives = adPlanCreativeService.getCreativesByConfId(confId);
|
|
|
//group by planId
|
|
|
Map<Long, List<AdPlanCreative>> creativeMap = creatives.stream().collect(Collectors.groupingBy(AdPlanCreative::getAdPlanId));
|