csw 6 달 전
부모
커밋
71fa5d4f3b
2개의 변경된 파일26개의 추가작업 그리고 2개의 파일을 삭제
  1. 19 2
      sql/db.sql
  2. 7 0
      src/main/java/com/ecnu/platform/service/AlgDefinitionService.groovy

+ 19 - 2
sql/db.sql

@@ -19,12 +19,26 @@ CREATE TABLE ALG_DEFINITION (
     PRIMARY KEY (GKEY)
 );
 
+-- 第三方
+CREATE TABLE ALG_THIRD (
+     GKEY                 VARCHAR(50) NOT NULL                            COMMENT '主键',
+     ID                   VARCHAR(100)                                    COMMENT '第三方ID',
+     NAME                 VARCHAR(200)                                    COMMENT '第三方名称',
+     DESCRIPTION          VARCHAR(500)                                    COMMENT '描述',
+     CREATED              DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL     COMMENT '创建时间',
+     CREATOR              VARCHAR(100) DEFAULT 'sys' NOT NULL             COMMENT '创建人',
+     CHANGED              DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL     COMMENT '修改时间',
+     CHANGER              VARCHAR(100) DEFAULT 'sys' NOT NULL             COMMENT '修改人',
+     IS_DELETED           INT(1) DEFAULT 0 NOT NULL                       COMMENT '是否删除(0/否1/是)',
+     PRIMARY KEY (GKEY)
+);
+
 -- 算法版本管理
-CREATE TABLE ALG_VERSION_MGT (
+CREATE TABLE ALG_VERSION (
      GKEY                 VARCHAR(50) NOT NULL                            COMMENT '主键',
      THIRD_GKEY           VARCHAR(50) NOT NULL                            COMMENT '第三方主键',
      ALG_GKEY             VARCHAR(50) NOT NULL                            COMMENT '算法主键',
-     ALG_VERSION          VARCHAR(100)                                    COMMENT '算法版本',
+     VERSION              VARCHAR(100)                                    COMMENT '算法版本',
      IS_CALL              tinyint(1)                                      COMMENT '是否调用',
      IS_ONLINE            tinyint(1)                                      COMMENT '是否在线',
      SERVICE_ID           VARCHAR(100)                                    COMMENT '算法服务ID',
@@ -44,12 +58,15 @@ CREATE TABLE ALG_VERSION_MGT (
 -- 执行日志
 CREATE TABLE ALG_EXECUTION_LOG (
      GKEY                 VARCHAR(50) NOT NULL                            COMMENT '主键',
+     VERSION_GKEY         VARCHAR(50) NOT NULL                            COMMENT '算法版本主键',
      SHIP_ID              VARCHAR(100)                                    COMMENT '船舶ID',
      SHIP_NAME            VARCHAR(200)                                    COMMENT '船舶名称',
      FACILITY_ID          VARCHAR(100)                                    COMMENT '设备ID',
      EXE_STATE            VARCHAR(100)                                    COMMENT '执行状态',
      RUN_VERSION          VARCHAR(100)                                    COMMENT '运行版本',
      COST_TIME            INT                                             COMMENT '计算耗时',
+     IN_DATA              longtext                                        COMMENT '输入数据',
+     OUT_DATA             longtext                                        COMMENT '输出数据',
      EXE_LOG              text                                            COMMENT '执行日志',
      ERROR_LOG            text                                            COMMENT '错误日志',
      CALL_RESOURCE        VARCHAR(100)                                    COMMENT '调用来源',

+ 7 - 0
src/main/java/com/ecnu/platform/service/AlgDefinitionService.groovy

@@ -2,6 +2,8 @@ package com.ecnu.platform.service
 
 import com.three.common.vo.SelectOption
 import com.three.data_api.dm.annos.BizApiMethod
+import com.three.data_api.dm.annos.Doc4MethodPara
+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.data_api.service.impl.BaseEntityServiceImpl
@@ -18,6 +20,7 @@ class AlgDefinitionService extends BaseEntityServiceImpl {
 
     @Override
     @BizApiMethod(matchedApis = ThreeConstant.BIZ_API_NAME, desc = "查询算法定义")
+    @Doc4MethodRes(key = "result", desc = "算法定义", refClassName = EN_AlgDefinition)
     AuqResult query(Map<String, Object> map) throws Exception {
         return super.query(map)
     }
@@ -30,24 +33,28 @@ class AlgDefinitionService extends BaseEntityServiceImpl {
 
     @Override
     @BizApiMethod(matchedApis = ThreeConstant.BIZ_API_NAME, desc = "新增算法定义")
+    @Doc4MethodPara(key = "body", desc = "算法定义", refClassName = EN_AlgDefinition)
     void create(Map<String, Object> map) throws Exception {
         super.create(map)
     }
 
     @Override
     @BizApiMethod(matchedApis = ThreeConstant.BIZ_API_NAME, desc = "修改算法定义")
+    @Doc4MethodPara(key = "body", desc = "算法定义", refClassName = EN_AlgDefinition)
     void update(Map<String, Object> map) throws Exception {
         super.update(map)
     }
 
     @Override
     @BizApiMethod(matchedApis = ThreeConstant.BIZ_API_NAME, desc = "删除算法定义")
+    @Doc4MethodPara(key = "body.gkey", desc = "算法定义主键")
     void delete(Map<String, Object> map) throws Exception {
         super.delete(map)
     }
 
     @Override
     @BizApiMethod(matchedApis = ThreeConstant.BIZ_API_NAME, desc = "恢复算法定义")
+    @Doc4MethodPara(key = "body.gkey", desc = "算法定义主键")
     void recover(Map<String, Object> map) throws Exception {
         super.recover(map)
     }