|
@@ -224,6 +224,9 @@ public class CanalScheduling implements Runnable, ApplicationContextAware {
|
|
case INSERT:
|
|
case INSERT:
|
|
// 黑烟船舶数据入库
|
|
// 黑烟船舶数据入库
|
|
if (StrUtil.equalsIgnoreCase(database, "smoke_api") && StrUtil.equalsIgnoreCase(table, "ship_recognition")) {
|
|
if (StrUtil.equalsIgnoreCase(database, "smoke_api") && StrUtil.equalsIgnoreCase(table, "ship_recognition")) {
|
|
|
|
+ if (DateUtil.compare(DateUtil.parseDateTime(afterDataMap.get("snapTimeFmt").toString()), DateUtil.lastWeek()) < 0) {
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
afterDataMap.put("mmsi", afterDataMap.get("aisMmsi"));
|
|
afterDataMap.put("mmsi", afterDataMap.get("aisMmsi"));
|
|
afterDataMap.put("illegalType", "heiyan");
|
|
afterDataMap.put("illegalType", "heiyan");
|
|
afterDataMap.put("createTime", afterDataMap.get("snapTimeFmt"));
|
|
afterDataMap.put("createTime", afterDataMap.get("snapTimeFmt"));
|
|
@@ -315,6 +318,9 @@ public class CanalScheduling implements Runnable, ApplicationContextAware {
|
|
CacheConstants.DEVICE_TYPE_STATIC,
|
|
CacheConstants.DEVICE_TYPE_STATIC,
|
|
CacheConstants.DEVICE_LIST_STATIC));
|
|
CacheConstants.DEVICE_LIST_STATIC));
|
|
} else if (StrUtil.equalsIgnoreCase(database, "ais_database") && StrUtil.equalsIgnoreCase(table, "illegal_ship")) {
|
|
} else if (StrUtil.equalsIgnoreCase(database, "ais_database") && StrUtil.equalsIgnoreCase(table, "illegal_ship")) {
|
|
|
|
+ if (DateUtil.compare(DateUtil.parseDateTime(afterDataMap.get("peakTime").toString()), DateUtil.lastWeek()) < 0) {
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
// 嗅探系统-违规船舶
|
|
// 嗅探系统-违规船舶
|
|
afterDataMap.put("mmsi", afterDataMap.get("shipMmsi"));
|
|
afterDataMap.put("mmsi", afterDataMap.get("shipMmsi"));
|
|
afterDataMap.put("createTime", afterDataMap.get("peakTime"));
|
|
afterDataMap.put("createTime", afterDataMap.get("peakTime"));
|