Browse Source

渠道号——修改

zhaoxian 3 years ago
parent
commit
c3f9a540b6

+ 9 - 11
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/impl/AiKuaishouAccountAutoDoServiceImpl.java

@@ -272,7 +272,7 @@ public class AiKuaishouAccountAutoDoServiceImpl implements IAiKuaishouAccountAut
                 KuaishouChannel channel = null;
                 //0不使用,1使用
                 Integer useChannel = Check.isNull(strategy.getUseChannel()) ? 0 : strategy.getUseChannel();
-                if (useChannel == 1) {
+                if (useChannel == 1 && !"group".equals(level)) {
                     /*获取渠道号*/
                     channel = getChannel(level, accountId, appName);
                     if (Check.isNull(channel)) {
@@ -1513,18 +1513,16 @@ public class AiKuaishouAccountAutoDoServiceImpl implements IAiKuaishouAccountAut
         KuaishouChannel channel = null;
         try {
             channel = null;
-            if (("account".equals(level) || "plan".equals(level))) {
-                Result<Object> result = channelService.queryChannel(accountId, level, appName, null);
-                if (result.getCode() == 200) {
-                    channel = (KuaishouChannel) result.getResult();
-                    if (Check.isNull(channel)) {
-                        log.error("****** 账户({})未获取到渠道号,{}", accountId, result.getMessage());
-                    } else {
-                        log.info("------获取渠道号:{}", channel.getChannelCode());
-                    }
+            Result<Object> result = channelService.queryChannel(accountId, level, appName, null);
+            if (result.getCode() == 200) {
+                channel = (KuaishouChannel) result.getResult();
+                if (Check.isNull(channel)) {
+                    log.error("****** 账户({})未获取到渠道号,{}", accountId, result.getMessage());
                 } else {
-                    log.error("******  账户({})根据应用名:{},未查询渠道号!{}", accountId, appName, result.getMessage());
+                    log.info("------获取渠道号:{}", channel.getChannelCode());
                 }
+            } else {
+                log.error("******  账户({})根据应用名:{},未查询渠道号!{}", accountId, appName, result.getMessage());
             }
         } catch (Exception e) {
             e.printStackTrace();

+ 1 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouInterfaceServiceImpl.java

@@ -3375,6 +3375,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
                             appList.setImageToken(dataJson.getString("image_token"));
                             appList.setPackageName(dataJson.getString("package_name"));
                             appList.setReturnTime(DateUtils.timeStamp2Date(dataJson.getTimestamp("update_time")));
+                            appList.setAppPrivacyUrl(dataJson.getString("app_privacy_url"));
                             addList.add(appList);
                         }
                     }