459242451@qq.com 2 years ago
parent
commit
71af46ea80

+ 2 - 3
ruoyi-admin/src/main/java/com/ruoyi/web/controller/gas/BlackGasController.java

@@ -14,7 +14,6 @@ import com.ruoyi.common.core.page.PageDomain;
 import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.core.page.TableSupport;
 import com.ruoyi.common.enums.AggsType;
-import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.framework.config.ElasticSearchClient;
 import com.ruoyi.system.domain.ShipRecognition;
@@ -57,7 +56,7 @@ public class BlackGasController extends BaseController {
 
     @GetMapping("/list")
     @ApiOperation("列表数据")
-    @Log(title = "黑烟列表查询")
+//    @Log(title = "黑烟列表查询")
     public TableDataInfo list(ShipRecognition shipRecognition) {
         // 传来的参数
         Map<String, Object> params = shipRecognition.getParams();
@@ -106,7 +105,7 @@ public class BlackGasController extends BaseController {
     }
 
     @SneakyThrows
-    @Log(title = "黑烟记录导出", businessType = BusinessType.EXPORT)
+//    @Log(title = "黑烟记录导出", businessType = BusinessType.EXPORT)
 //    @PreAuthorize("@ss.hasPermi('system:black:export')")
     @GetMapping("/export")
     public void export(ShipRecognition shipRecognition, HttpServletRequest request, HttpServletResponse response) {

+ 2 - 3
ruoyi-admin/src/main/java/com/ruoyi/web/controller/gas/GasCommonController.java

@@ -145,7 +145,7 @@ public class GasCommonController {
 
     @GetMapping("/queryDeviceList")
     @ApiOperation("获取所有设备数据")
-    @Log(title = "获取所有设备数据")
+//    @Log(title = "获取所有设备数据")
     public AjaxResult queryDeviceList(@RequestParam(required = false) String monitor) {
         if (redisCache.hasKey(CacheConstants.DEVICE_LIST_STATIC)) {
             Map<String, Object> cacheMap = redisCache.getCacheMap(CacheConstants.DEVICE_LIST_STATIC);
@@ -333,7 +333,7 @@ public class GasCommonController {
 
     @GetMapping("/queryRdsShipList")
     @ApiOperation("获取redis中所有正常船舶数据-用于地图展示船舶")
-    @Log(title = "获取redis中所有正常船舶数据-用于地图展示船舶")
+//    @Log(title = "获取redis中所有正常船舶数据-用于地图展示船舶")
     public AjaxResult queryRedisShipList(@RequestParam(required = false) Double areaLatitude1,
                                          @RequestParam(required = false) Double areaLatitude2,
                                          @RequestParam(required = false) Double areaLongitude1,
@@ -474,7 +474,6 @@ public class GasCommonController {
 
     @GetMapping("/queryData")
     @ApiOperation("查询ES数据")
-    @Log(title = "查询ES数据")
     public Object queryData(@RequestParam(required = false) String id, @RequestParam(required = false) Integer size, @RequestParam(required = false) String orderKey, @RequestParam String... index) {
         if (size == null) {
             size = 200;

+ 20 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/job/CanalScheduling.java

@@ -145,6 +145,17 @@ public class CanalScheduling implements Runnable, ApplicationContextAware {
         // 操作类型
         CanalEntry.EventType eventType = entry.getHeader().getEventType();
 
+        if (!StrUtil.equalsAnyIgnoreCase(tableName,
+                "ship_recognition",
+                "ship_snap_address",
+                "common_record",
+                "monitor_point",
+//                "device",
+                "illegal_ship",
+                "sem_instrument")) {
+            return;
+        }
+
         log.info(String.format("========> binlog[%s:%s] , name[%s,%s] , eventType[%s]",
                 entry.getHeader().getLogfileName(), entry.getHeader().getLogfileOffset(),
                 database, tableName,
@@ -199,7 +210,7 @@ public class CanalScheduling implements Runnable, ApplicationContextAware {
                 "ship_snap_address",
                 "common_record",
                 "monitor_point",
-                "device",
+//                "device",
                 "illegal_ship",
                 "sem_instrument")) {
             return;
@@ -524,4 +535,12 @@ public class CanalScheduling implements Runnable, ApplicationContextAware {
         this.applicationContext = applicationContext;
     }
 
+    public static void main(String[] args) {
+        StringBuilder a = new StringBuilder();
+        for (int i = 55000; i < 75000; i++) {
+            a.append(i).append(",");
+        }
+        System.out.println(a);
+    }
+
 }