|
@@ -82,7 +82,7 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
|
|
|
* @param videoCnt 视频数量
|
|
|
*/
|
|
|
@Override
|
|
|
- public Long autoCreateCreative(AiKuaishouAdvertiserStrategy strategy, Integer createType, Long videoCnt, String startTime, String endTime) {
|
|
|
+ public Long autoCreateCreative(AiKuaishouAdvertiserStrategy strategy, Integer createType, Long videoCnt, String startTime, String endTime) throws InterruptedException {
|
|
|
String strategyUuid = UUID.randomUUID().toString();
|
|
|
strategy.setUnitType(4);
|
|
|
Long accountId = strategy.getAccountId();
|
|
@@ -756,7 +756,7 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void customCreativeSupplement(AiKuaishouAdvertiserStrategy strategy, Integer hour) throws ParseException {
|
|
|
+ public void customCreativeSupplement(AiKuaishouAdvertiserStrategy strategy, Integer hour) throws ParseException, InterruptedException {
|
|
|
Long customUnitCnt = strategy.getCustomUnitCnt();
|
|
|
if (Check.isNull(customUnitCnt)) {
|
|
|
Integer imageCnt = strategy.getImageCnt();
|
|
@@ -1579,7 +1579,7 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
|
|
|
|
|
|
private void createCreativeByImage(List<MaterialCutFrame> cutFrameList, CtopOauthToken token, JSONObject creativeParams,
|
|
|
Long campaignId, Long unitId, KuaiShouVideoGet videoItem,
|
|
|
- int imageNumber, AiKuaishouAdvertiserStrategy strategy, String uuid, String appVersion) {
|
|
|
+ int imageNumber, AiKuaishouAdvertiserStrategy strategy, String uuid, String appVersion) throws InterruptedException {
|
|
|
if ((null != cutFrameList && !cutFrameList.isEmpty())) {
|
|
|
for (int i = 0; i < cutFrameList.size(); i++) {
|
|
|
String imageCode = cutFrameList.get(i).getSignature();
|
|
@@ -1587,6 +1587,7 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
|
|
|
String imageToken = getImageToken(imageUrl, imageCode, token.getAccountId(), token.getAccessToken());
|
|
|
creativeParams.put("image_token", imageToken);
|
|
|
createCreative(token, creativeParams, campaignId, unitId, i + 1, videoItem, strategy, uuid, appVersion);
|
|
|
+ Thread.sleep(200L);
|
|
|
imageNumber--;
|
|
|
if (imageNumber <= 0) {
|
|
|
break;
|