Преглед изворни кода

自动替换的高消耗素材的小程序 自动获取服务号

wangyunpeng пре 13 часа
родитељ
комит
241d25dade

+ 11 - 5
api-module/src/main/java/com/tzld/piaoquan/api/job/GzhReplyVideoRefreshJob.java

@@ -80,12 +80,18 @@ public class GzhReplyVideoRefreshJob {
                 String accountName = record.getString(1);
                 accountMap.put(accountId, accountName);
             }
-            // todo 服务号临时处理,后续读取大数据表
-            accountMap.put("wxcd30ad28e2b7ebc3", "票圈精彩");
-            accountMap.put("wx3ec82b6a91dd0954", "美好时光记叙图书");
-            accountMap.put("wx154baf080cea7044", "银发暖伴生活志");
-            accountMap.put("wxea09c7c291c63c28", "美好时光记叙书籍");
         }
+        // 服务号投流账号
+        String fwhAccountMapSql = "SELECT account_id, account_name from loghubods.feishu_wechat_fwh_account_base;";
+        List<Record> fwhAccountList = OdpsUtil.getOdpsData(fwhAccountMapSql);
+        if (CollectionUtils.isNotEmpty(fwhAccountList)) {
+            for (Record record : fwhAccountList) {
+                String accountId = record.getString(0);
+                String accountName = record.getString(1);
+                accountMap.put(accountId, accountName);
+            }
+        }
+
         // 获取公众号信息
         List<String> nameList = new ArrayList<>(accountMap.values());
         List<GhDetail> ghDetailList = ghDetailService.getGhdetailByNames(nameList);