|
@@ -110,7 +110,8 @@ public class TestController {
|
|
|
list.add(7882996L);
|
|
|
list.add(7883032L);
|
|
|
list.add(7922257L);*/
|
|
|
- list.add(7607818L);
|
|
|
+ list.add(8166349L);
|
|
|
+ list.add(8159827L);
|
|
|
|
|
|
for (int i = 0; i < list.size(); i++) {
|
|
|
Long accountId = list.get(i);
|
|
@@ -135,7 +136,7 @@ public class TestController {
|
|
|
list.add(7087866L);
|
|
|
list.add(7087890L);
|
|
|
list.add(7421646L);*/
|
|
|
- list.add(7607818L);
|
|
|
+
|
|
|
/* list.add(7421660L);
|
|
|
list.add(7421671L);
|
|
|
list.add(7607727L);
|
|
@@ -149,6 +150,10 @@ public class TestController {
|
|
|
list.add(7883032L);
|
|
|
list.add(7922257L);*/
|
|
|
|
|
|
+ list.add(8166349L);
|
|
|
+ list.add(8159827L);
|
|
|
+
|
|
|
+
|
|
|
for (int i = 0; i < list.size(); i++) {
|
|
|
Long accountId = list.get(i);
|
|
|
CtopOauthToken oauthToken = oauthTokenService.getTokenByAccountId(accountId);
|
|
@@ -157,12 +162,9 @@ public class TestController {
|
|
|
|
|
|
List<KuaiShouCampaign> list1 = campaignService.list(campaignQueryWrapper);
|
|
|
for (KuaiShouCampaign campaign : list1) {
|
|
|
- executorService.submit(new Runnable() {
|
|
|
- @Override
|
|
|
- public void run() {
|
|
|
- kuaishouInterfaceService.getAsyncCreativeListV2(oauthToken.getAccountId(), oauthToken.getAccessToken(), campaign.getCampaignId(),1);
|
|
|
- }
|
|
|
- });
|
|
|
+
|
|
|
+ kuaishouInterfaceService.getAsyncCreativeListV2(oauthToken.getAccountId(), oauthToken.getAccessToken(), campaign.getCampaignId(), 1);
|
|
|
+
|
|
|
try {
|
|
|
Thread.sleep(1000L);
|
|
|
} catch (InterruptedException e) {
|
|
@@ -229,15 +231,9 @@ public class TestController {
|
|
|
@GetMapping(value = "/updateCreative")
|
|
|
public void updateCreative() {
|
|
|
List<Long> list = new ArrayList();
|
|
|
- list.add(7607727L);
|
|
|
- list.add(7607803L);
|
|
|
- list.add(7607830L);
|
|
|
- list.add(7607849L);
|
|
|
- list.add(7783907L);
|
|
|
- list.add(7882964L);
|
|
|
- list.add(7882996L);
|
|
|
- list.add(7883032L);
|
|
|
-
|
|
|
+ list.add(8166349L);
|
|
|
+ list.add(8159827L);
|
|
|
+
|
|
|
for (int i = 0; i < list.size(); i++) {
|
|
|
Long accountId = list.get(i);
|
|
|
CtopOauthToken oauthToken = oauthTokenService.getTokenByAccountId(accountId);
|
|
@@ -250,23 +246,30 @@ public class TestController {
|
|
|
QueryWrapper<KuaiShouCreative> creativeQueryWrapper = new QueryWrapper<>();
|
|
|
creativeQueryWrapper.eq("account_id", accountId);
|
|
|
creativeQueryWrapper.eq("campaign_id", campaign.getCampaignId());
|
|
|
- creativeQueryWrapper.notLike("click_track_url","&ad_name=__DNAME__");
|
|
|
+ // creativeQueryWrapper.notLike("click_track_url", "&ad_name=__DNAME__");
|
|
|
List<KuaiShouCreative> creativeList = creativeService.list(creativeQueryWrapper);
|
|
|
for (KuaiShouCreative creative : creativeList) {
|
|
|
- executorService.submit(new Runnable() {
|
|
|
+ /* executorService.submit(new Runnable() {
|
|
|
@Override
|
|
|
- public void run() {
|
|
|
- try {
|
|
|
- JSONObject json = new JSONObject();
|
|
|
- json.put("creativeId", creative.getCreativeId());
|
|
|
- String url = "";
|
|
|
+ public void run() {*/
|
|
|
+ try {
|
|
|
+ JSONObject json = new JSONObject();
|
|
|
+ json.put("creativeId", creative.getCreativeId());
|
|
|
+ /*String url = "";
|
|
|
if (!Check.isNull(creative.getClickTrackUrl())) {
|
|
|
url = creative.getClickTrackUrl().replace("&idfa_md5=__IDFA__", "").replace("&idfa_md5=__IDFA2__", "");
|
|
|
} else {
|
|
|
url = creative.getImpressionUrl().replace("&idfa_md5=__IDFA__", "").replace("&idfa_md5=__IDFA2__", "");
|
|
|
- }
|
|
|
+ }*/
|
|
|
+ String url = "";
|
|
|
+ if (accountId == 8166349L) {
|
|
|
+ url = "https://market.wsskj520.cn/kuaishou/android.php?appid=602102&pkg=msailiao.weiling&aid=__AID__&cid=__CID__&did=__DID__&dname=__DNAME__&callback=__CALLBACK__&imei=__IMEI2__&oaid=__OAID__&ip=__IP__&ts=__TS__";
|
|
|
|
|
|
- if (!Check.isNull(url)) {
|
|
|
+ } else if (accountId == 8159827L) {
|
|
|
+ url = "https://market.wsskj520.cn/kuaishou/android.php?appid=602100&pkg=msailiao.weiling&aid=__AID__&cid=__CID__&did=__DID__&dname=__DNAME__&callback=__CALLBACK__&imei=__IMEI2__&oaid=__OAID__&ip=__IP__&ts=__TS__";
|
|
|
+ }
|
|
|
+
|
|
|
+ /*if (!Check.isNull(url)) {
|
|
|
String[] split1 = url.split("&imei_md5=");
|
|
|
String replaceUrll = split1[0];
|
|
|
replaceUrll += "&imei_md5=__IMEI2__&ip=__IP__×tamp=__TS__&campaign_id=__AID__&creative_id=__CID__&ad_id=__DID__&androidid_md5=__ANDROIDID2__&callback=__CALLBACK__&ua=__UA__&oaid=__OAID__&csite=__CSITE__&advertiser_id=__ACCOUNTID__&ad_name=__DNAME__";
|
|
@@ -293,12 +296,23 @@ public class TestController {
|
|
|
}
|
|
|
batchService.updateCreative(json, oauthToken);
|
|
|
Thread.sleep(1000);
|
|
|
- }
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
+ }*/
|
|
|
+
|
|
|
+ if (creative.getCreativeMaterialType() == 1) {
|
|
|
+ json.put("clickTrackUrl", url);
|
|
|
+ } else if (creative.getCreativeMaterialType() == 4) {
|
|
|
+ json.put("impressionUrl", url);
|
|
|
+ json.put("clickTrackUrl", url);
|
|
|
+
|
|
|
}
|
|
|
- });
|
|
|
+
|
|
|
+ batchService.updateCreative(json, oauthToken);
|
|
|
+
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ /* }
|
|
|
+ });*/
|
|
|
}
|
|
|
}
|
|
|
}
|