|
@@ -79,7 +79,7 @@ public class TestController {
|
|
|
|
|
|
@Autowired
|
|
|
private IBatchService batchService;
|
|
|
- static ExecutorService executorService = Executors.newFixedThreadPool(15);
|
|
|
+ static ExecutorService executorService = Executors.newFixedThreadPool(10);
|
|
|
static ExecutorService videoService = Executors.newFixedThreadPool(5);
|
|
|
static ExecutorService suzhaoService = Executors.newFixedThreadPool(5);
|
|
|
|
|
@@ -126,7 +126,6 @@ public class TestController {
|
|
|
list.add(7607727L);
|
|
|
list.add(7421671L);
|
|
|
list.add(7421646L);
|
|
|
- list.add(7421646L);
|
|
|
list.add(7607849L);
|
|
|
for (int i = 0; i < list.size(); i++) {
|
|
|
Long accountId = list.get(i);
|
|
@@ -143,7 +142,7 @@ public class TestController {
|
|
|
}
|
|
|
});
|
|
|
try {
|
|
|
- Thread.sleep(500L);
|
|
|
+ Thread.sleep(1000L);
|
|
|
} catch (InterruptedException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -297,21 +296,21 @@ public class TestController {
|
|
|
QueryWrapper<KuaiShouCreative> creativeQueryWrapper = new QueryWrapper<>();
|
|
|
creativeQueryWrapper.eq("account_id", accountId);
|
|
|
creativeQueryWrapper.eq("campaign_id", campaign.getCampaignId());
|
|
|
- // creativeQueryWrapper.notLike("click_track_url", "&ua=__UA__&oaid=__OAID__");
|
|
|
+ creativeQueryWrapper.like("click_track_url", "&csite=__CSITE__&csite=__CSITE__");
|
|
|
List<KuaiShouCreative> creativeList = creativeService.list(creativeQueryWrapper);
|
|
|
for (KuaiShouCreative creative : creativeList) {
|
|
|
executorService.submit(new Runnable() {
|
|
|
@Override
|
|
|
public void run() {
|
|
|
- try {
|
|
|
- JSONObject json = new JSONObject();
|
|
|
- json.put("creativeId", creative.getCreativeId());
|
|
|
- String a = "";
|
|
|
- String b = "";
|
|
|
+ try {
|
|
|
+ JSONObject json = new JSONObject();
|
|
|
+ json.put("creativeId", creative.getCreativeId());
|
|
|
+ String a = "";
|
|
|
+ String b = "";
|
|
|
|
|
|
|
|
|
- String clickTrackUrl = creative.getClickTrackUrl();
|
|
|
- if (!Check.isNull(clickTrackUrl)) {
|
|
|
+ String clickTrackUrl = creative.getClickTrackUrl();
|
|
|
+ /* if (!Check.isNull(clickTrackUrl)) {
|
|
|
b = clickTrackUrl;
|
|
|
} else {
|
|
|
b = creative.getImpressionUrl();
|
|
@@ -322,19 +321,21 @@ public class TestController {
|
|
|
|
|
|
} else {
|
|
|
a = b + "&csite=__CSITE__";
|
|
|
- }
|
|
|
- if (creative.getCreativeMaterialType() == 1) {
|
|
|
- json.put("clickTrackUrl", a);
|
|
|
- } else if (creative.getCreativeMaterialType() == 4) {
|
|
|
- json.put("impressionUrl", a);
|
|
|
- json.put("clickTrackUrl", a);
|
|
|
- }
|
|
|
+ }*/
|
|
|
+ a = clickTrackUrl.replace("&csite=__CSITE__&csite=__CSITE__", "&csite=__CSITE__");
|
|
|
+
|
|
|
+ if (creative.getCreativeMaterialType() == 1) {
|
|
|
+ json.put("clickTrackUrl", a);
|
|
|
+ } else if (creative.getCreativeMaterialType() == 4) {
|
|
|
+ json.put("impressionUrl", a);
|
|
|
+ json.put("clickTrackUrl", a);
|
|
|
+ }
|
|
|
|
|
|
- batchService.updateCreative(json, oauthToken);
|
|
|
- Thread.sleep(1000);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
+ batchService.updateCreative(json, oauthToken);
|
|
|
+ Thread.sleep(1000);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
}
|