|
@@ -4,8 +4,11 @@ import cn.com.ctop.common.module.entity.CtopOauthToken;
|
|
import cn.com.ctop.common.module.mapper.CtopOauthTokenMapper;
|
|
import cn.com.ctop.common.module.mapper.CtopOauthTokenMapper;
|
|
import cn.com.ctop.common.module.service.ICtopOauthTokenService;
|
|
import cn.com.ctop.common.module.service.ICtopOauthTokenService;
|
|
import cn.com.ctop.common.module.utils.CtopAdConstant;
|
|
import cn.com.ctop.common.module.utils.CtopAdConstant;
|
|
|
|
+import cn.com.ctop.common.module.utils.HttpUtils;
|
|
import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouHistoryReportTaskService;
|
|
import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouHistoryReportTaskService;
|
|
import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouInterfaceService;
|
|
import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouInterfaceService;
|
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.jeecg.common.util.DateUtils;
|
|
import org.jeecg.common.util.DateUtils;
|
|
@@ -41,12 +44,12 @@ public class SampleTest {
|
|
try {
|
|
try {
|
|
|
|
|
|
QueryWrapper<CtopOauthToken> queryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<CtopOauthToken> queryWrapper = new QueryWrapper<>();
|
|
- queryWrapper.eq("account_id",3727345L);
|
|
|
|
|
|
+ queryWrapper.eq("account_id", 3727345L);
|
|
CtopOauthToken token = tokenMapper.selectOne(queryWrapper);
|
|
CtopOauthToken token = tokenMapper.selectOne(queryWrapper);
|
|
|
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
Date parse = simpleDateFormat.parse("2020-03-12");
|
|
Date parse = simpleDateFormat.parse("2020-03-12");
|
|
- kuaishouInterfaceService.getAdvertiserReportDaily(token,parse,parse);
|
|
|
|
|
|
+ kuaishouInterfaceService.getAdvertiserReportDaily(token, parse, parse);
|
|
|
|
|
|
|
|
|
|
// reportTaskService.createTask(3727345L, "871fc2c248782a94ad2962c941555abc", "");
|
|
// reportTaskService.createTask(3727345L, "871fc2c248782a94ad2962c941555abc", "");
|
|
@@ -164,7 +167,78 @@ public class SampleTest {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+ @Test
|
|
|
|
+ public void wanHuaTong() {
|
|
|
|
+ String url = "https://ad.oceanengine.com/open_api/2/kaleidoscope/job/smart_cut/submit/";
|
|
|
|
+
|
|
|
|
+ JSONObject conditions = new JSONObject();
|
|
|
|
+
|
|
|
|
+ // 1629785592929294
|
|
|
|
+
|
|
|
|
+ conditions.put("advertiser_id", "109437044830");
|
|
|
|
+ JSONObject job = new JSONObject();
|
|
|
|
+ job.put("job_conf_id", 10);
|
|
|
|
+ JSONArray input = new JSONArray();
|
|
|
|
+ JSONObject inputJson = new JSONObject();
|
|
|
|
+ inputJson.put("task_id", 1);
|
|
|
|
+ JSONArray videoIds = new JSONArray();
|
|
|
|
+ videoIds.add("v02033290000bgq1cejpqv6e4k29b2jg");
|
|
|
|
+ inputJson.put("video_ids", videoIds);
|
|
|
|
+ JSONArray music_id = new JSONArray();
|
|
|
|
+ JSONArray image_urls = new JSONArray();
|
|
|
|
+ JSONArray texts = new JSONArray();
|
|
|
|
+
|
|
|
|
+ texts.add("哈哈哈哈,这是一个测试文案");
|
|
|
|
+ inputJson.put("texts", texts);
|
|
|
|
+
|
|
|
|
+ JSONArray tts = new JSONArray();
|
|
|
|
+ tts.add("true");
|
|
|
|
+ inputJson.put("tts", tts);
|
|
|
|
+
|
|
|
|
+ JSONArray video_ratio = new JSONArray();
|
|
|
|
+ video_ratio.add("1");
|
|
|
|
+ inputJson.put("video_ratio", video_ratio);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ JSONArray music_style = new JSONArray();
|
|
|
|
+ music_style.add("1");
|
|
|
|
+ inputJson.put("music_style", music_style);
|
|
|
|
+
|
|
|
|
+ JSONArray video_duration = new JSONArray();
|
|
|
|
+ video_duration.add("8");
|
|
|
|
+ inputJson.put("video_duration", video_duration);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ JSONArray speed = new JSONArray();
|
|
|
|
+ speed.add("1.2");
|
|
|
|
+ inputJson.put("speed", speed);
|
|
|
|
+
|
|
|
|
+ job.put("input", inputJson);
|
|
|
|
+ job.put("mesg", "测试万花筒");
|
|
|
|
+ conditions.put("job", job);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ JSONObject jsonObject = HttpUtils.bytedancePostRequest("8ea30cb02cab8d92b480c4ab01cfc4545fdce33e", url, conditions);
|
|
|
|
+ System.err.println(jsonObject);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|