csw 4 meses atrás
pai
commit
88c39186db

+ 29 - 0
src/main/java/com/ecnu/platform/port/BollardService.groovy

@@ -0,0 +1,29 @@
+package com.ecnu.platform.port
+
+import com.ecnu.alg.pojo.port.inputs.AlgBollard
+import com.three.common.vo.PageResult
+import com.three.data_api.dm.annos.BizApiMethod
+import com.three.data_api.dm.annos.Doc4MethodRes
+import com.three.data_api.dm.constants.ThreeConstant
+import com.three.data_api.dm.entity.AuqResult
+import com.three.redis.utils.RedisUtil
+import org.springframework.beans.factory.annotation.Autowired
+
+class BollardService {
+
+    public static final String AlgBollardKey = "port:AlgBollard:"
+
+    @Autowired
+    private RedisUtil redisUtil;
+
+    @BizApiMethod(matchedApis = ThreeConstant.BIZ_API_NAME, desc = "查询缆桩信息")
+    @Doc4MethodRes(key = "result", desc = "缆桩信息", refClasses = AlgBollard.class)
+    AuqResult query(Map<String, Object> map) throws Exception {
+        List<AlgBollard> algBollardList = redisUtil.getByPrefix(AlgBollardKey + "*") as List<AlgBollard>
+        AuqResult auqResult = new AuqResult();
+        PageResult pageResult = new PageResult();
+        pageResult.setData(algBollardList)
+        auqResult.setResult(pageResult)
+        return auqResult
+    }
+}

+ 29 - 0
src/main/java/com/ecnu/platform/port/ShorelineService.groovy

@@ -0,0 +1,29 @@
+package com.ecnu.platform.port
+
+import com.ecnu.alg.pojo.port.inputs.AlgShoreline
+import com.three.common.vo.PageResult
+import com.three.data_api.dm.annos.BizApiMethod
+import com.three.data_api.dm.annos.Doc4MethodRes
+import com.three.data_api.dm.constants.ThreeConstant
+import com.three.data_api.dm.entity.AuqResult
+import com.three.redis.utils.RedisUtil
+import org.springframework.beans.factory.annotation.Autowired
+
+class ShorelineService {
+
+    public static final String AlgShorelineKey = "port:AlgShoreline:"
+
+    @Autowired
+    private RedisUtil redisUtil;
+
+    @BizApiMethod(matchedApis = ThreeConstant.BIZ_API_NAME, desc = "查询岸线信息")
+    @Doc4MethodRes(key = "result", desc = "岸线信息", refClasses = AlgShoreline.class)
+    AuqResult query(Map<String, Object> map) throws Exception {
+        List<AlgShoreline> algShorelineList = redisUtil.getByPrefix(AlgShorelineKey + "*") as List<AlgShoreline>
+        AuqResult auqResult = new AuqResult();
+        PageResult pageResult = new PageResult();
+        pageResult.setData(algShorelineList)
+        auqResult.setResult(pageResult)
+        return auqResult
+    }
+}