|
@@ -109,7 +109,6 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
if(timeEnd != 0){
|
|
if(timeEnd != 0){
|
|
endTime = DateUtils.formatDateTime(now + timeEnd * 60 * 1000L);
|
|
endTime = DateUtils.formatDateTime(now + timeEnd * 60 * 1000L);
|
|
}
|
|
}
|
|
- //List<ByteDanceVideoInfo> videoInfos = getVideoInfoByCreateType(userAllocation.getProjectId(),strategy,startTime,endTime,createType,videoCnt);
|
|
|
|
List<ByteDanceVideoInfo> videoInfos = getvideoOrImageInfoByCreateType(userAllocation.getProjectId(),strategy,startTime,endTime,createType,videoCnt);
|
|
List<ByteDanceVideoInfo> videoInfos = getvideoOrImageInfoByCreateType(userAllocation.getProjectId(),strategy,startTime,endTime,createType,videoCnt);
|
|
if(null == videoInfos||videoInfos.isEmpty()){
|
|
if(null == videoInfos||videoInfos.isEmpty()){
|
|
log.info("获取{}视频素材为空=>accountId:{}",BytedanceCreativeMatTypeEnum.getNameByType(createType+""),token.getAccountId());
|
|
log.info("获取{}视频素材为空=>accountId:{}",BytedanceCreativeMatTypeEnum.getNameByType(createType+""),token.getAccountId());
|
|
@@ -497,11 +496,6 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
if(!Check.isNull(creativeDisplayMode)){
|
|
if(!Check.isNull(creativeDisplayMode)){
|
|
params.put("creative_display_mode",creativeDisplayMode);
|
|
params.put("creative_display_mode",creativeDisplayMode);
|
|
}
|
|
}
|
|
-// 允许客户端下载视频功能
|
|
|
|
-// Integer adDownloadStatus = strategy.getCreativeAdDownloadStatus();
|
|
|
|
-// if(!Check.isNull(adDownloadStatus)&&adDownloadStatus!=0){
|
|
|
|
-// params.put("ad_download_status",adDownloadStatus);
|
|
|
|
-// }
|
|
|
|
//商品推广卡片
|
|
//商品推广卡片
|
|
String imageCode = strategy.getCreativeProductImageCode();
|
|
String imageCode = strategy.getCreativeProductImageCode();
|
|
if(!Check.isNull(imageCode)){
|
|
if(!Check.isNull(imageCode)){
|
|
@@ -568,10 +562,6 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
if(!Check.isNull(videoPlayEffectiveTrackUrl)){
|
|
if(!Check.isNull(videoPlayEffectiveTrackUrl)){
|
|
params.put("video_play_effective_track_url",videoPlayEffectiveTrackUrl);
|
|
params.put("video_play_effective_track_url",videoPlayEffectiveTrackUrl);
|
|
}
|
|
}
|
|
-// String videoPlayDoneTrackUrl = strategy.getCreativeVideoPlayDoneTrackUrl();
|
|
|
|
-// if(!Check.isNull(videoPlayDoneTrackUrl)){
|
|
|
|
-// params.put("video_play_done_track_url",videoPlayDoneTrackUrl);
|
|
|
|
-// }
|
|
|
|
String videoPlayTrackUrl = strategy.getCreativeVideoPlayTrackUrl();
|
|
String videoPlayTrackUrl = strategy.getCreativeVideoPlayTrackUrl();
|
|
if(!Check.isNull(videoPlayTrackUrl)){
|
|
if(!Check.isNull(videoPlayTrackUrl)){
|
|
params.put("video_play_track_url",videoPlayTrackUrl);
|
|
params.put("video_play_track_url",videoPlayTrackUrl);
|
|
@@ -646,8 +636,6 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
if(!Check.isNull(strategy.getAdPackage())){
|
|
if(!Check.isNull(strategy.getAdPackage())){
|
|
params.put("package",strategy.getAdPackage());
|
|
params.put("package",strategy.getAdPackage());
|
|
}
|
|
}
|
|
- //params.put("download_url","https://apps.bytesfield.com/download/basic/cur/1c728178004c8d4d6c83444a05c414c1a1cfae48");
|
|
|
|
- // params.put("package","com.taobao.litetao");
|
|
|
|
if(!Check.isNull(strategy.getAdQuickAppUrl())){
|
|
if(!Check.isNull(strategy.getAdQuickAppUrl())){
|
|
params.put("quick_app_url",strategy.getAdQuickAppUrl());
|
|
params.put("quick_app_url",strategy.getAdQuickAppUrl());
|
|
}
|
|
}
|
|
@@ -1296,11 +1284,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
//BUDGET_MODE_DAY-日预算
|
|
//BUDGET_MODE_DAY-日预算
|
|
// BUDGET_MODE_INFINITE-不限
|
|
// BUDGET_MODE_INFINITE-不限
|
|
String accountBudgetMode = "1".equals(updAdStaOrCpaOrBudget.getBudgetType()) ? "BUDGET_MODE_INFINITE" : "BUDGET_MODE_DAY";
|
|
String accountBudgetMode = "1".equals(updAdStaOrCpaOrBudget.getBudgetType()) ? "BUDGET_MODE_INFINITE" : "BUDGET_MODE_DAY";
|
|
- Result resultBudget = marketingService.updateBudget(token,accountBudgetMode,new BigDecimal(updAdStaOrCpaOrBudget.getBudget()));
|
|
|
|
- /* if (!resultBudget.isSuccess()){
|
|
|
|
- return Result.error(resultBudget.getMessage());
|
|
|
|
- }*/
|
|
|
|
-
|
|
|
|
|
|
+ marketingService.updateBudget(token,accountBudgetMode,new BigDecimal(updAdStaOrCpaOrBudget.getBudget()));
|
|
}
|
|
}
|
|
return Result.successMsg("修改"+(BytedanceConstant.UPDTYPE_BID.equals(updAdStaOrCpaOrBudget.getType()) ? "出价" : "预算")+"成功。",null);
|
|
return Result.successMsg("修改"+(BytedanceConstant.UPDTYPE_BID.equals(updAdStaOrCpaOrBudget.getType()) ? "出价" : "预算")+"成功。",null);
|
|
}
|
|
}
|
|
@@ -1539,8 +1523,6 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
aiBytedanceAdvertiserStrategy.setCreativeAdKeywords(org.apache.commons.lang3.StringUtils.join(aiBytedanceAdvertiserStrategy.getAdKeywords(), ","));
|
|
aiBytedanceAdvertiserStrategy.setCreativeAdKeywords(org.apache.commons.lang3.StringUtils.join(aiBytedanceAdvertiserStrategy.getAdKeywords(), ","));
|
|
aiBytedanceAdvertiserStrategy.setCreateTime(new Date());
|
|
aiBytedanceAdvertiserStrategy.setCreateTime(new Date());
|
|
//默认组数量为 1 -前端已修改完成
|
|
//默认组数量为 1 -前端已修改完成
|
|
- //aiBytedanceAdvertiserStrategy.setCampaignAdCnt(aiBytedanceAdvertiserStrategy.getCampaignAdCnt() == 0L ? 1 : aiBytedanceAdvertiserStrategy.getCampaignAdCnt());
|
|
|
|
-
|
|
|
|
//同一账户下 同素材类型 只能有一条信息为开启
|
|
//同一账户下 同素材类型 只能有一条信息为开启
|
|
//关闭 账户下 其他数据信息(不包含本条id信息) 状态为 关闭
|
|
//关闭 账户下 其他数据信息(不包含本条id信息) 状态为 关闭
|
|
aiBytedanceAdvertiserStrategyMapper.updStaByAccountId(String.valueOf(aiBytedanceAdvertiserStrategy.getAccountId()),aiBytedanceAdvertiserStrategy.getCreativeImageMode(),"1",null);
|
|
aiBytedanceAdvertiserStrategyMapper.updStaByAccountId(String.valueOf(aiBytedanceAdvertiserStrategy.getAccountId()),aiBytedanceAdvertiserStrategy.getCreativeImageMode(),"1",null);
|
|
@@ -1562,10 +1544,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
//BUDGET_MODE_DAY-日预算
|
|
//BUDGET_MODE_DAY-日预算
|
|
// BUDGET_MODE_INFINITE-不限
|
|
// BUDGET_MODE_INFINITE-不限
|
|
String accountBudgetMode = "1".equals(aiBytedanceAdvertiserStrategy.getAccountBudgetMode()) ? "BUDGET_MODE_INFINITE" : "BUDGET_MODE_DAY";
|
|
String accountBudgetMode = "1".equals(aiBytedanceAdvertiserStrategy.getAccountBudgetMode()) ? "BUDGET_MODE_INFINITE" : "BUDGET_MODE_DAY";
|
|
- Result resultBudget = marketingService.updateBudget(token,accountBudgetMode,aiBytedanceAdvertiserStrategy.getAccountBudget());
|
|
|
|
- /* if (!resultBudget.isSuccess()){
|
|
|
|
- return Result.error(resultBudget.getMessage());
|
|
|
|
- }*/
|
|
|
|
|
|
+ marketingService.updateBudget(token,accountBudgetMode,aiBytedanceAdvertiserStrategy.getAccountBudget());
|
|
return Result.successMsg("新增成功。",aiBytedanceAdvertiserStrategy);
|
|
return Result.successMsg("新增成功。",aiBytedanceAdvertiserStrategy);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1660,10 +1639,8 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public Result getAdActionText(String accountId, String landingType, String advancedCreativeType) throws Exception{
|
|
public Result getAdActionText(String accountId, String landingType, String advancedCreativeType) throws Exception{
|
|
- CtopOauthToken token = tokenService.getOauthTokenByAccountId(accountId);
|
|
|
|
- // return marketingService.getActionText(token,landingType,advancedCreativeType);
|
|
|
|
//行动号召 不使用 api接口获取 使用自定义
|
|
//行动号召 不使用 api接口获取 使用自定义
|
|
- String actionText[] = {"购买同款","专属优惠","抢抢看","去看看","立即下单",
|
|
|
|
|
|
+ String[] actionText = {"购买同款","专属优惠","抢抢看","去看看","立即下单",
|
|
"获取优惠","查看详情","更多精彩","查看惊喜","领取好礼",
|
|
"获取优惠","查看详情","更多精彩","查看惊喜","领取好礼",
|
|
"去逛逛","领取福利","来拼一拼","立即抢购","更多秒杀",
|
|
"去逛逛","领取福利","来拼一拼","立即抢购","更多秒杀",
|
|
"更多优惠","了解更多","了解详情","点击抢购"};
|
|
"更多优惠","了解更多","了解详情","点击抢购"};
|
|
@@ -1740,7 +1717,6 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
if (!list.isSuccess()){
|
|
if (!list.isSuccess()){
|
|
return Result.errorMsg(list.getMessage());
|
|
return Result.errorMsg(list.getMessage());
|
|
}
|
|
}
|
|
- //List<Map<String,Object>> listMap = (List<Map<String, Object>>) list.getResult();
|
|
|
|
JSONArray array =(JSONArray)list.getResult();
|
|
JSONArray array =(JSONArray)list.getResult();
|
|
List<Map<String,Object>> dataList = JSONArray.parseObject(array.toJSONString(),List.class);
|
|
List<Map<String,Object>> dataList = JSONArray.parseObject(array.toJSONString(),List.class);
|
|
//获取人群包id List
|
|
//获取人群包id List
|