|
@@ -5,6 +5,7 @@ import cn.com.ctop.common.module.entity.MaterialCutFrame;
|
|
|
import cn.com.ctop.common.module.service.ICtopOauthTokenService;
|
|
|
import cn.com.ctop.common.module.service.IMaterialCutFrameService;
|
|
|
import cn.com.ctop.common.module.utils.Check;
|
|
|
+import cn.com.ctop.kuaishou.modules.ai.service.IKuaishouDirectionalPackageService;
|
|
|
import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouImageGet;
|
|
|
import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouVideoGet;
|
|
|
import cn.com.ctop.kuaishou.modules.batch.entity.KuaishouBatchCampaignPreview;
|
|
@@ -70,6 +71,8 @@ public class KuaishouBatchCreativePreviewServiceImpl extends ServiceImpl<Kuaisho
|
|
|
@Autowired
|
|
|
private IKuaiShouImageGetService imageGetService;
|
|
|
@Autowired
|
|
|
+ private IKuaishouDirectionalPackageService directionalPackageService;
|
|
|
+ @Autowired
|
|
|
private IKuaiShouUpdateService kuaiShouUpdateService;
|
|
|
static ExecutorService campaignService = Executors.newFixedThreadPool(10);
|
|
|
static ExecutorService unitService = Executors.newFixedThreadPool(20);
|
|
@@ -331,6 +334,15 @@ public class KuaishouBatchCreativePreviewServiceImpl extends ServiceImpl<Kuaisho
|
|
|
updateStatus.setIsSuccess(1);
|
|
|
updateStatus.setMessage((String) returnUnitMap.get("message"));
|
|
|
updateStatus.setUnitId(unitId);
|
|
|
+ try {
|
|
|
+ JSONObject request = new JSONObject();
|
|
|
+ request.put("unitId", unitId);
|
|
|
+ request.put("templateId", templateId);
|
|
|
+ request.put("message", "createAdcampaignAndGroups接口,批量创建");
|
|
|
+ directionalPackageService.createUnitAndTemplate(request);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error(e.getMessage());
|
|
|
+ }
|
|
|
createCopyCreatives(token, groupPreview.getKuaishouBatchCreativePreviews(), unitId, campaignId);
|
|
|
} else {
|
|
|
updateStatus.setIsSuccess(0);
|