|
@@ -69,6 +69,9 @@ public class AiStrategyServiceImpl implements IAiStrategyService {
|
|
|
log.info("token获取失败=>accountId:{}",strategy.getAccountId());
|
|
|
return;
|
|
|
}
|
|
|
+ strategy.setCpaBidMin(1000L);
|
|
|
+ strategy.setCpaBidMax(3000L);
|
|
|
+ strategy.setStepSize(200L);
|
|
|
//1:获取相应账户下的最新的5条素材信息
|
|
|
List<KuaiShouVideoGet> videoGets = videoGetService.getNewVideoByAccountId(accountId,1);
|
|
|
if(null == videoGets){
|
|
@@ -246,7 +249,6 @@ public class AiStrategyServiceImpl implements IAiStrategyService {
|
|
|
int creativeCnt = 1;
|
|
|
if (null!=orgFrameList&&!orgFrameList.isEmpty()) {
|
|
|
for (int i = 0; i < orgFrameList.size(); i++) {
|
|
|
- System.out.println(creativeCnt);
|
|
|
String imageCode = orgFrameList.get(i).getCode();
|
|
|
String imageUrl = orgFrameList.get(i).getUrl();
|
|
|
String imageToken = getImageToken(imageUrl,imageCode,accountId,token.getAccessToken());
|
|
@@ -261,7 +263,6 @@ public class AiStrategyServiceImpl implements IAiStrategyService {
|
|
|
|
|
|
if ((null!=cutFrameList&&!cutFrameList.isEmpty()) && (creativeCnt<=15)){
|
|
|
for (int i = 0; i < cutFrameList.size(); i++) {
|
|
|
- System.out.println(creativeCnt);
|
|
|
String imageCode = cutFrameList.get(i).getSignature();
|
|
|
String imageUrl = cutFrameList.get(i).getUrl();
|
|
|
String imageToken = getImageToken(imageUrl,imageCode,accountId,token.getAccessToken());
|
|
@@ -363,11 +364,6 @@ public class AiStrategyServiceImpl implements IAiStrategyService {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
- public static void main(String[] args) {
|
|
|
- List<Long> result = splitCapBidByDomain(10L,30L,2L);
|
|
|
- System.out.println(result.toString());
|
|
|
- }
|
|
|
-
|
|
|
private JSONObject creativeParams(CtopOauthToken token,Long unitId,KuaiShouVideoGet videoItem,int unitCnt,KuaishouStrategy strategy){
|
|
|
JSONObject creativeParams = new JSONObject();
|
|
|
creativeParams.put("advertiser_id",token.getAccountId());
|
|
@@ -377,8 +373,7 @@ public class AiStrategyServiceImpl implements IAiStrategyService {
|
|
|
creativeParams.put("creative_name","智能创意-"+uuid+unitCnt+"-"+1);
|
|
|
creativeParams.put("creative_material_type",videoItem.getMaterialType());
|
|
|
creativeParams.put("action_bar_text","立即下载");
|
|
|
- //TODO 广告语
|
|
|
- creativeParams.put("description","测试广告语");
|
|
|
+ creativeParams.put("description","太美了!来电显示设为视频铃声,来电话就开始播放~");
|
|
|
// 安卓下载中间页ID
|
|
|
JSONArray siteIdArray = JSONArray.parseArray(strategy.getSiteId());
|
|
|
if(null == siteIdArray||!siteIdArray.isEmpty()){
|