|
@@ -66,7 +66,7 @@ public class AdAccountCDC {
|
|
|
props.load(AdAccountCDC.class.getResourceAsStream(Env.isTest ? "/application.test.properties" : "/application.properties"));
|
|
|
|
|
|
|
|
|
- env.setParallelism(1);
|
|
|
+ env.setParallelism(3);
|
|
|
|
|
|
|
|
|
|
|
@@ -104,6 +104,8 @@ public class AdAccountCDC {
|
|
|
.tableList((StringUtils.join(new String[]{
|
|
|
"zx-advertising-oceanengine.t_clue_wechat_game",
|
|
|
"zx-advertising-oceanengine.t_ad_account",
|
|
|
+ "zx-advertising-tencent.t_ad_account",
|
|
|
+ "zx-advertising-tencent.t_adcreative",
|
|
|
}, ",")))
|
|
|
.deserializer(new MapDebeziumDeserializationSchema())
|
|
|
.startupOptions(StartupOptions.initial())
|
|
@@ -156,8 +158,6 @@ public class AdAccountCDC {
|
|
|
|
|
|
@Override
|
|
|
public void flatMap(TransportMap transportMap, Collector<Tuple3<String, String, TransportMap>> out) throws Exception {
|
|
|
-
|
|
|
- System.out.println(transportMap);
|
|
|
String dbName = transportMap.getDbName();
|
|
|
String tableName = transportMap.getTableName();
|
|
|
List<String> primaryKeys = transportMap.getPrimaryKeys();
|
|
@@ -170,136 +170,281 @@ public class AdAccountCDC {
|
|
|
}
|
|
|
if (dbName.equals("zx-advertising-oceanengine")) {
|
|
|
if (tableName.equals("t_clue_wechat_game")) {
|
|
|
- Long accountId = ObjectUtil.objToLong(data.get("account_id"));
|
|
|
- String path = ObjectUtil.objToString(data.get("path"));
|
|
|
- if (StringUtils.isBlank(path)) {
|
|
|
- return;
|
|
|
- }
|
|
|
- String agentKey = path.replace("?state=", "");
|
|
|
- try (SqlSession session = odsSqlSessionFactory.openSession(true)) {
|
|
|
- BaseMapper mapper = session.getMapper(BaseMapper.class);
|
|
|
-
|
|
|
- Map<String, Object> queryParam = new HashMap<>(3);
|
|
|
- queryParam.put("agent_key", agentKey);
|
|
|
- Map<String, Object> agentInfo = mapper.queryOne("t_pitcher_agent", queryParam);
|
|
|
- queryParam.clear();
|
|
|
- if (agentInfo == null) {
|
|
|
- Map<String, Object> temp = new HashMap<>();
|
|
|
- temp.put("create_time", data.get("create_time"));
|
|
|
- temp.put("user_name", data.get("user_name"));
|
|
|
- temp.put("path", data.get("path"));
|
|
|
- temp.put("account_id", data.get("account_id"));
|
|
|
- temp.put("instance_id", data.get("instance_id"));
|
|
|
- temp.put("name", data.get("name"));
|
|
|
- System.out.println(JsonUtil.toString(temp));
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- String sourceSystem = ObjectUtil.objToString(agentInfo.get("source_system"));
|
|
|
- if (sourceSystem.contains("ZX")) {
|
|
|
- return;
|
|
|
- }
|
|
|
- Long zxPutUserId = ObjectUtil.objToLong(agentInfo.get("pitcher_id"));
|
|
|
- Long gameId = ObjectUtil.objToLong(agentInfo.get("game_id"));
|
|
|
- Map<String, Object> putUserMap = null;
|
|
|
- if (zxPutUserId != null) {
|
|
|
- queryParam.put("source_system", sourceSystem);
|
|
|
- queryParam.put("zx_pitcher_id", zxPutUserId);
|
|
|
- putUserMap = mapper.queryOne("t_pitcher_map", queryParam);
|
|
|
- queryParam.clear();
|
|
|
- }
|
|
|
- Map<String, Object> gameInfo = null;
|
|
|
- if (gameId != null) {
|
|
|
- queryParam.put("source_system", sourceSystem);
|
|
|
- queryParam.put("id", gameId);
|
|
|
- gameInfo = mapper.queryOne("t_game", queryParam);
|
|
|
- queryParam.clear();
|
|
|
- }
|
|
|
- Map<String, Object> result = new HashMap<>(16);
|
|
|
- result.put("advertiser_conf_id", agentInfo.get("account_id"));
|
|
|
- result.put("agent_id", agentInfo.get("id"));
|
|
|
- result.put("sys_put_user_id", zxPutUserId);
|
|
|
- result.put("app_id", gameId);
|
|
|
- result.put("agent_name", agentInfo.get("agent_name"));
|
|
|
- result.put("create_time", DateUtil.localDateTimeToSecond(ObjectUtil.objToLocalDateTime(agentInfo.get("create_time"))));
|
|
|
- result.put("update_time", DateUtil.localDateTimeToSecond(ObjectUtil.objToLocalDateTime(agentInfo.get("create_time"))));
|
|
|
- if (putUserMap != null) {
|
|
|
- result.put("bugu_put_user_id", putUserMap.get("bugu_pitcher_id"));
|
|
|
- result.put("bugu_put_user_name", putUserMap.get("bugu_pitcher_name"));
|
|
|
- result.put("sys_put_user_name", putUserMap.get("zx_pitcher_name"));
|
|
|
- }
|
|
|
- if (gameInfo != null) {
|
|
|
- result.put("app_name", gameInfo.get("game_name"));
|
|
|
- }
|
|
|
-
|
|
|
- out.collect(new Tuple3<>("mp_conf_agent", sourceSystem, TransportMap.builder()
|
|
|
- .tableName("mp_conf_agent")
|
|
|
- .primaryKeys(Arrays.asList("advertiser_conf_id", "agent_id"))
|
|
|
- .operation(operation)
|
|
|
- .after(result)
|
|
|
- .build()));
|
|
|
- }
|
|
|
+ oceanenginePitcherAgent(operation, data, out);
|
|
|
+ } else if (tableName.equals("t_ad_account")) {
|
|
|
+ oceanengineAccount(operation, data, out);
|
|
|
+ }
|
|
|
+ } else if ("zx-advertising-tencent".equals(dbName)) {
|
|
|
+ if (tableName.equals("t_adcreative")) {
|
|
|
+ tencentPitcherAgent(operation, data, out);
|
|
|
+ } else if (tableName.equals("t_ad_account")) {
|
|
|
+ tencentAccount(operation, data, out);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private void oceanenginePitcherAgent(Envelope.Operation operation, Map<String, Object> data, Collector<Tuple3<String, String, TransportMap>> out) {
|
|
|
+ Long accountId = ObjectUtil.objToLong(data.get("account_id"));
|
|
|
+ String path = ObjectUtil.objToString(data.get("path"));
|
|
|
+ if (StringUtils.isBlank(path)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ String agentKey = path.replace("?state=", "");
|
|
|
+ try (SqlSession session = odsSqlSessionFactory.openSession(true)) {
|
|
|
+ BaseMapper mapper = session.getMapper(BaseMapper.class);
|
|
|
+
|
|
|
+ Map<String, Object> queryParam = new HashMap<>(3);
|
|
|
+ queryParam.put("agent_key", agentKey);
|
|
|
+ Map<String, Object> agentInfo = mapper.queryOne("t_pitcher_agent", queryParam);
|
|
|
+ queryParam.clear();
|
|
|
+ if (agentInfo == null || ObjectUtil.objToLong(agentInfo.get("account_id")) == null
|
|
|
+ || ObjectUtil.objToLong(agentInfo.get("account_id")) == 0) {
|
|
|
+ Map<String, Object> temp = new HashMap<>();
|
|
|
+ temp.put("create_time", data.get("create_time"));
|
|
|
+ temp.put("user_name", data.get("user_name"));
|
|
|
+ temp.put("path", data.get("path"));
|
|
|
+ temp.put("account_id", data.get("account_id"));
|
|
|
+ temp.put("instance_id", data.get("instance_id"));
|
|
|
+ temp.put("name", data.get("name"));
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ String sourceSystem = ObjectUtil.objToString(agentInfo.get("source_system"));
|
|
|
+ if (sourceSystem.contains("ZX")) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ Long zxPutUserId = ObjectUtil.objToLong(agentInfo.get("pitcher_id"));
|
|
|
+ Long gameId = ObjectUtil.objToLong(agentInfo.get("game_id"));
|
|
|
+ Map<String, Object> putUserMap = null;
|
|
|
+ if (zxPutUserId != null) {
|
|
|
+ queryParam.put("source_system", sourceSystem);
|
|
|
+ queryParam.put("zx_pitcher_id", zxPutUserId);
|
|
|
+ putUserMap = mapper.queryOne("t_pitcher_map", queryParam);
|
|
|
+ queryParam.clear();
|
|
|
+ }
|
|
|
+ Map<String, Object> gameInfo = null;
|
|
|
+ if (gameId != null) {
|
|
|
+ queryParam.put("source_system", sourceSystem);
|
|
|
+ queryParam.put("id", gameId);
|
|
|
+ gameInfo = mapper.queryOne("t_game", queryParam);
|
|
|
+ queryParam.clear();
|
|
|
+ }
|
|
|
+ Map<String, Object> result = new HashMap<>(16);
|
|
|
+ result.put("advertiser_conf_id", agentInfo.get("account_id"));
|
|
|
+ result.put("agent_id", agentInfo.get("id"));
|
|
|
+ result.put("sys_put_user_id", zxPutUserId);
|
|
|
+ result.put("app_id", gameId);
|
|
|
+ result.put("agent_name", agentInfo.get("agent_name"));
|
|
|
+ result.put("create_time", DateUtil.localDateTimeToSecond(ObjectUtil.objToLocalDateTime(agentInfo.get("create_time"))));
|
|
|
+ result.put("update_time", DateUtil.localDateTimeToSecond(ObjectUtil.objToLocalDateTime(agentInfo.get("create_time"))));
|
|
|
+ if (putUserMap != null) {
|
|
|
+ result.put("bugu_put_user_id", putUserMap.get("bugu_pitcher_id"));
|
|
|
+ result.put("bugu_put_user_name", putUserMap.get("bugu_pitcher_name"));
|
|
|
+ result.put("sys_put_user_name", putUserMap.get("zx_pitcher_name"));
|
|
|
+ }
|
|
|
+ if (gameInfo != null) {
|
|
|
+ result.put("app_name", gameInfo.get("game_name"));
|
|
|
+ }
|
|
|
+
|
|
|
+ out.collect(new Tuple3<>("mp_conf_agent", sourceSystem, TransportMap.builder()
|
|
|
+ .tableName("mp_conf_agent")
|
|
|
+ .primaryKeys(Arrays.asList("advertiser_conf_id", "agent_id"))
|
|
|
+ .operation(operation)
|
|
|
+ .after(result)
|
|
|
+ .build()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private void oceanengineAccount(Envelope.Operation operation, Map<String, Object> data, Collector<Tuple3<String, String, TransportMap>> out) {
|
|
|
+ Long accountId = ObjectUtil.objToLong(data.get("account_id"));
|
|
|
+
|
|
|
+ try (SqlSession session = odsSqlSessionFactory.openSession(true)) {
|
|
|
+ BaseMapper mapper = session.getMapper(BaseMapper.class);
|
|
|
+
|
|
|
+ Map<String, Object> queryParams = new HashMap<>(6);
|
|
|
+ queryParams.put("account_id", accountId);
|
|
|
+ List<Map<String, Object>> agentList = mapper.queryList("t_pitcher_agent", queryParams);
|
|
|
+ queryParams.clear();
|
|
|
+ if (agentList != null) {
|
|
|
+ agentList = agentList.stream().filter(map -> StringUtils.isNotBlank(ObjectUtil.objToString(map.get("agent_key")))).collect(Collectors.toList());
|
|
|
+ }
|
|
|
+ if (agentList == null || agentList.isEmpty()) {
|
|
|
return;
|
|
|
}
|
|
|
- if (tableName.equals("t_ad_account")) {
|
|
|
- Long accountId = ObjectUtil.objToLong(data.get("account_id"));
|
|
|
-
|
|
|
- try (SqlSession session = odsSqlSessionFactory.openSession(true)) {
|
|
|
- BaseMapper mapper = session.getMapper(BaseMapper.class);
|
|
|
-
|
|
|
- Map<String, Object> queryParams = new HashMap<>(6);
|
|
|
- queryParams.put("account_id", accountId);
|
|
|
- List<Map<String, Object>> agentList = mapper.queryList("t_pitcher_agent", queryParams);
|
|
|
- queryParams.clear();
|
|
|
- if(agentList != null) {
|
|
|
- agentList = agentList.stream().filter(map -> StringUtils.isNotBlank(ObjectUtil.objToString(map.get("agent_key")))).collect(Collectors.toList());
|
|
|
- }
|
|
|
- if (agentList == null || agentList.isEmpty()) {
|
|
|
- return;
|
|
|
- }
|
|
|
- String sourceSystem = ObjectUtil.objToString(agentList.get(0).get("source_system"));
|
|
|
- Long putUserId = ObjectUtil.objToLong(agentList.get(0).get("pitcher_id"));
|
|
|
- Long gameId = ObjectUtil.objToLong(agentList.get(0).get("game_id"));
|
|
|
- LocalDateTime createTime = ObjectUtil.objToLocalDateTime(agentList.get(0).get("create_time"));
|
|
|
-
|
|
|
- Map<String, Object> putUserMap = null;
|
|
|
- if (putUserId != null) {
|
|
|
- queryParams.put("source_system", sourceSystem);
|
|
|
- queryParams.put("zx_pitcher_id", putUserId);
|
|
|
- putUserMap = mapper.queryOne("t_pitcher_map", queryParams);
|
|
|
- queryParams.clear();
|
|
|
- }
|
|
|
- Map<String, Object> gameInfo = null;
|
|
|
- if (gameId != null) {
|
|
|
- queryParams.put("source_system", sourceSystem);
|
|
|
- queryParams.put("id", gameId);
|
|
|
- gameInfo = mapper.queryOne("t_game", queryParams);
|
|
|
- queryParams.clear();
|
|
|
- }
|
|
|
- Map<String, Object> result = new HashMap<>();
|
|
|
- result.put("account_id", accountId);
|
|
|
- result.put("type", "BYTE");
|
|
|
- result.put("create_time", createTime);
|
|
|
- result.put("update_time", createTime);
|
|
|
- result.put("start_date", createTime.toLocalDate());
|
|
|
- result.put("end_date", null);
|
|
|
- if (putUserMap != null) {
|
|
|
- result.put("sys_put_user_name", putUserMap.get("zx_pitcher_name"));
|
|
|
- }
|
|
|
- if (gameInfo != null) {
|
|
|
- result.put("app_name", gameInfo.get("game_name"));
|
|
|
- }
|
|
|
- out.collect(new Tuple3<>("ad_account", sourceSystem, TransportMap.builder()
|
|
|
- .tableName("ad_account")
|
|
|
- .primaryKeys(Collections.singletonList("account_id"))
|
|
|
- .operation(operation)
|
|
|
- .after(result)
|
|
|
- .build()));
|
|
|
+ String sourceSystem = ObjectUtil.objToString(agentList.get(0).get("source_system"));
|
|
|
+ Long putUserId = ObjectUtil.objToLong(agentList.get(0).get("pitcher_id"));
|
|
|
+ Long gameId = ObjectUtil.objToLong(agentList.get(0).get("game_id"));
|
|
|
+ LocalDateTime createTime = ObjectUtil.objToLocalDateTime(agentList.get(0).get("create_time"));
|
|
|
+
|
|
|
+ Map<String, Object> putUserMap = null;
|
|
|
+ if (putUserId != null) {
|
|
|
+ queryParams.put("source_system", sourceSystem);
|
|
|
+ queryParams.put("zx_pitcher_id", putUserId);
|
|
|
+ putUserMap = mapper.queryOne("t_pitcher_map", queryParams);
|
|
|
+ queryParams.clear();
|
|
|
+ }
|
|
|
+ Map<String, Object> gameInfo = null;
|
|
|
+ if (gameId != null) {
|
|
|
+ queryParams.put("source_system", sourceSystem);
|
|
|
+ queryParams.put("id", gameId);
|
|
|
+ gameInfo = mapper.queryOne("t_game", queryParams);
|
|
|
+ queryParams.clear();
|
|
|
+ }
|
|
|
+ Map<String, Object> result = new HashMap<>();
|
|
|
+ result.put("account_id", accountId);
|
|
|
+ result.put("type", "BYTE");
|
|
|
+ result.put("create_time", createTime);
|
|
|
+ result.put("update_time", createTime);
|
|
|
+ result.put("start_date", createTime.toLocalDate());
|
|
|
+ result.put("end_date", null);
|
|
|
+ if (putUserMap != null) {
|
|
|
+ result.put("sys_put_user_name", putUserMap.get("zx_pitcher_name"));
|
|
|
+ }
|
|
|
+ if (gameInfo != null) {
|
|
|
+ result.put("app_name", gameInfo.get("game_name"));
|
|
|
+ }
|
|
|
+ out.collect(new Tuple3<>("ad_account", sourceSystem, TransportMap.builder()
|
|
|
+ .tableName("ad_account")
|
|
|
+ .primaryKeys(Collections.singletonList("account_id"))
|
|
|
+ .operation(operation)
|
|
|
+ .after(result)
|
|
|
+ .build()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private void tencentPitcherAgent(Envelope.Operation operation, Map<String, Object> data, Collector<Tuple3<String, String, TransportMap>> out) {
|
|
|
+ Long accountId = ObjectUtil.objToLong(data.get("account_id"));
|
|
|
+ String pageSpecJson = ObjectUtil.objToString(data.get("page_spec_json"));
|
|
|
+ String path = null;
|
|
|
+ if (StringUtils.isBlank(pageSpecJson)) {
|
|
|
+ return;
|
|
|
+ } else {
|
|
|
+ try {
|
|
|
+ Map<String, Object> map = JsonUtil.toObj(pageSpecJson, Map.class);
|
|
|
+ Map temp = (Map) map.get("mini_game_spec");
|
|
|
+ if (temp != null) {
|
|
|
+ path = (String) temp.get("mini_game_tracking_parameter");
|
|
|
}
|
|
|
+ } catch (Exception e) {
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (StringUtils.isBlank(path)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ String agentKey = path.replace("?state\\u003d", "");
|
|
|
+ try (SqlSession session = odsSqlSessionFactory.openSession(true)) {
|
|
|
+ BaseMapper mapper = session.getMapper(BaseMapper.class);
|
|
|
+
|
|
|
+ Map<String, Object> queryParam = new HashMap<>(3);
|
|
|
+ queryParam.put("agent_key", agentKey);
|
|
|
+ Map<String, Object> agentInfo = mapper.queryOne("t_pitcher_agent", queryParam);
|
|
|
+ queryParam.clear();
|
|
|
+ if (agentInfo == null || ObjectUtil.objToLong(agentInfo.get("account_id")) == null
|
|
|
+ || ObjectUtil.objToLong(agentInfo.get("account_id")) == 0) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ String sourceSystem = ObjectUtil.objToString(agentInfo.get("source_system"));
|
|
|
+ if (sourceSystem.contains("ZX")) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ Long zxPutUserId = ObjectUtil.objToLong(agentInfo.get("pitcher_id"));
|
|
|
+ Long gameId = ObjectUtil.objToLong(agentInfo.get("game_id"));
|
|
|
+ Map<String, Object> putUserMap = null;
|
|
|
+ if (zxPutUserId != null) {
|
|
|
+ queryParam.put("source_system", sourceSystem);
|
|
|
+ queryParam.put("zx_pitcher_id", zxPutUserId);
|
|
|
+ putUserMap = mapper.queryOne("t_pitcher_map", queryParam);
|
|
|
+ queryParam.clear();
|
|
|
+ }
|
|
|
+ Map<String, Object> gameInfo = null;
|
|
|
+ if (gameId != null) {
|
|
|
+ queryParam.put("source_system", sourceSystem);
|
|
|
+ queryParam.put("id", gameId);
|
|
|
+ gameInfo = mapper.queryOne("t_game", queryParam);
|
|
|
+ queryParam.clear();
|
|
|
+ }
|
|
|
+ Map<String, Object> result = new HashMap<>(16);
|
|
|
+ result.put("advertiser_conf_id", agentInfo.get("account_id"));
|
|
|
+ result.put("agent_id", agentInfo.get("id"));
|
|
|
+ result.put("sys_put_user_id", zxPutUserId);
|
|
|
+ result.put("app_id", gameId);
|
|
|
+ result.put("agent_name", agentInfo.get("agent_name"));
|
|
|
+ result.put("create_time", DateUtil.localDateTimeToSecond(ObjectUtil.objToLocalDateTime(agentInfo.get("create_time"))));
|
|
|
+ result.put("update_time", DateUtil.localDateTimeToSecond(ObjectUtil.objToLocalDateTime(agentInfo.get("create_time"))));
|
|
|
+ if (putUserMap != null) {
|
|
|
+ result.put("bugu_put_user_id", putUserMap.get("bugu_pitcher_id"));
|
|
|
+ result.put("bugu_put_user_name", putUserMap.get("bugu_pitcher_name"));
|
|
|
+ result.put("sys_put_user_name", putUserMap.get("zx_pitcher_name"));
|
|
|
+ }
|
|
|
+ if (gameInfo != null) {
|
|
|
+ result.put("app_name", gameInfo.get("game_name"));
|
|
|
+ }
|
|
|
+
|
|
|
+ out.collect(new Tuple3<>("mp_conf_agent", sourceSystem, TransportMap.builder()
|
|
|
+ .tableName("mp_conf_agent")
|
|
|
+ .primaryKeys(Arrays.asList("advertiser_conf_id", "agent_id"))
|
|
|
+ .operation(operation)
|
|
|
+ .after(result)
|
|
|
+ .build()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private void tencentAccount(Envelope.Operation operation, Map<String, Object> data, Collector<Tuple3<String, String, TransportMap>> out) {
|
|
|
+ Long accountId = ObjectUtil.objToLong(data.get("account_id"));
|
|
|
+
|
|
|
+ try (SqlSession session = odsSqlSessionFactory.openSession(true)) {
|
|
|
+ BaseMapper mapper = session.getMapper(BaseMapper.class);
|
|
|
+
|
|
|
+ Map<String, Object> queryParams = new HashMap<>(6);
|
|
|
+ queryParams.put("account_id", accountId);
|
|
|
+ List<Map<String, Object>> agentList = mapper.queryList("t_pitcher_agent", queryParams);
|
|
|
+ queryParams.clear();
|
|
|
+ if (agentList != null) {
|
|
|
+ agentList = agentList.stream().filter(map -> StringUtils.isNotBlank(ObjectUtil.objToString(map.get("agent_key")))).collect(Collectors.toList());
|
|
|
+ }
|
|
|
+ if (agentList == null || agentList.isEmpty()) {
|
|
|
return;
|
|
|
}
|
|
|
+ String sourceSystem = ObjectUtil.objToString(agentList.get(0).get("source_system"));
|
|
|
+ Long putUserId = ObjectUtil.objToLong(agentList.get(0).get("pitcher_id"));
|
|
|
+ Long gameId = ObjectUtil.objToLong(agentList.get(0).get("game_id"));
|
|
|
+ LocalDateTime createTime = ObjectUtil.objToLocalDateTime(agentList.get(0).get("create_time"));
|
|
|
+
|
|
|
+ Map<String, Object> putUserMap = null;
|
|
|
+ if (putUserId != null) {
|
|
|
+ queryParams.put("source_system", sourceSystem);
|
|
|
+ queryParams.put("zx_pitcher_id", putUserId);
|
|
|
+ putUserMap = mapper.queryOne("t_pitcher_map", queryParams);
|
|
|
+ queryParams.clear();
|
|
|
+ }
|
|
|
+ Map<String, Object> gameInfo = null;
|
|
|
+ if (gameId != null) {
|
|
|
+ queryParams.put("source_system", sourceSystem);
|
|
|
+ queryParams.put("id", gameId);
|
|
|
+ gameInfo = mapper.queryOne("t_game", queryParams);
|
|
|
+ queryParams.clear();
|
|
|
+ }
|
|
|
+ Map<String, Object> result = new HashMap<>();
|
|
|
+ result.put("account_id", accountId);
|
|
|
+ result.put("type", "BYTE");
|
|
|
+ result.put("create_time", createTime);
|
|
|
+ result.put("update_time", createTime);
|
|
|
+ result.put("start_date", createTime.toLocalDate());
|
|
|
+ result.put("end_date", null);
|
|
|
+ if (putUserMap != null) {
|
|
|
+ result.put("sys_put_user_name", putUserMap.get("zx_pitcher_name"));
|
|
|
+ }
|
|
|
+ if (gameInfo != null) {
|
|
|
+ result.put("app_name", gameInfo.get("game_name"));
|
|
|
+ }
|
|
|
+ out.collect(new Tuple3<>("ad_account", sourceSystem, TransportMap.builder()
|
|
|
+ .tableName("ad_account")
|
|
|
+ .primaryKeys(Collections.singletonList("account_id"))
|
|
|
+ .operation(operation)
|
|
|
+ .after(result)
|
|
|
+ .build()));
|
|
|
}
|
|
|
- System.out.println("未知的数据--->" + JsonUtil.toString(transportMap));
|
|
|
}
|
|
|
|
|
|
private SqlSessionFactory adsSqlSessionFactory(MysqlConfigParam mysqlConfig) {
|