|
@@ -201,6 +201,8 @@ public class KuaishouChannelServiceImpl extends ServiceImpl<KuaishouChannelMappe
|
|
|
}
|
|
|
try {
|
|
|
boolean save = channelCreateStrategyService.save(strategy);
|
|
|
+ //下载链接
|
|
|
+ String url = strategy.getUrl();
|
|
|
/**==========================范围是 项目==========================*/
|
|
|
if (usageRange == 2) {
|
|
|
String usageLevel = strategy.getUsageLevel();
|
|
@@ -305,11 +307,23 @@ public class KuaishouChannelServiceImpl extends ServiceImpl<KuaishouChannelMappe
|
|
|
List<KuaiShouAppList> oldAppList = kuaiShouAppListService.getAppListByAccountId(accountId);
|
|
|
strategy.setImageToken(tokenJson.getString("imageToken"));
|
|
|
strategy.setAccountId(accountId);
|
|
|
- for (int i = numberMin; i <= numberMax; i++) {
|
|
|
+ if (url.contains(CHANNEL_STR)) {
|
|
|
+ for (int i = numberMin; i <= numberMax; i++) {
|
|
|
+ try {
|
|
|
+ KuaishouChannelCreateStrategy replaceData = replaceWildcard(strategy, i);
|
|
|
+ createApp(replaceData, token, oldAppList);
|
|
|
+ createChannel(replaceData, i, 1);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
try {
|
|
|
- KuaishouChannelCreateStrategy replaceData = replaceWildcard(strategy, i);
|
|
|
- createApp(replaceData, token, oldAppList);
|
|
|
- createChannel(replaceData, i, 1);
|
|
|
+ createApp(strategy, token, oldAppList);
|
|
|
+ for (int i = numberMin; i <= numberMax; i++) {
|
|
|
+ KuaishouChannelCreateStrategy replaceData = replaceWildcard(strategy, i);
|
|
|
+ createChannel(replaceData, i, 1);
|
|
|
+ }
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -325,15 +339,27 @@ public class KuaishouChannelServiceImpl extends ServiceImpl<KuaishouChannelMappe
|
|
|
//使用范围是账户时,查询旧app来做匹配
|
|
|
List<KuaiShouAppList> oldAppList = kuaiShouAppListService.getAppListByAccountId(strategy.getAccountId());
|
|
|
strategy.setImageToken(tokenJson.getString("imageToken"));
|
|
|
- ilist.forEach(i -> executorService.submit(() -> {
|
|
|
- try {
|
|
|
- KuaishouChannelCreateStrategy replaceData = replaceWildcard(strategy, i);
|
|
|
- createApp(replaceData, token, oldAppList);
|
|
|
- createChannel(replaceData, i, 1);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- }));
|
|
|
+ if (url.contains(CHANNEL_STR)) {
|
|
|
+ ilist.forEach(i -> executorService.submit(() -> {
|
|
|
+ try {
|
|
|
+ KuaishouChannelCreateStrategy replaceData = replaceWildcard(strategy, i);
|
|
|
+ createApp(replaceData, token, oldAppList);
|
|
|
+ createChannel(replaceData, i, 1);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }));
|
|
|
+ } else {
|
|
|
+ createApp(strategy, token, oldAppList);
|
|
|
+ ilist.forEach(i -> executorService.submit(() -> {
|
|
|
+ try {
|
|
|
+ KuaishouChannelCreateStrategy replaceData = replaceWildcard(strategy, i);
|
|
|
+ createChannel(replaceData, i, 1);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }));
|
|
|
+ }
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|