diff --git a/src/main/java/neatlogic/module/tenant/api/matrix/MatrixAttributeSearchApi.java b/src/main/java/neatlogic/module/tenant/api/matrix/MatrixAttributeSearchApi.java index 82a457b2ee640e38bd9d9dfa487eccf035f44947..962cdf427f75a88a7de7dcc8d8f46211ea62d91a 100644 --- a/src/main/java/neatlogic/module/tenant/api/matrix/MatrixAttributeSearchApi.java +++ b/src/main/java/neatlogic/module/tenant/api/matrix/MatrixAttributeSearchApi.java @@ -60,7 +60,7 @@ public class MatrixAttributeSearchApi extends PrivateApiComponentBase { @Override public String getName() { - return "矩阵属性检索接口"; + return "nmtam.matrixattributesearchapi.getname"; } @Override @@ -73,15 +73,15 @@ public class MatrixAttributeSearchApi extends PrivateApiComponentBase { return true; } @Input({ - @Param(name = "matrixUuid", desc = "矩阵uuid", type = ApiParamType.STRING), - @Param(name = "type", desc = "类型", type = ApiParamType.ENUM, rule = "custom,external,view,cmdbci,private"), - @Param(name = "ciId", type = ApiParamType.LONG, desc = "ci模型id") + @Param(name = "matrixUuid", desc = "term.framework.matrixuuid", type = ApiParamType.STRING), + @Param(name = "type", desc = "common.type", type = ApiParamType.ENUM, rule = "custom,external,view,cmdbci,private,cmdbcustomview"), + @Param(name = "ciId", type = ApiParamType.LONG, desc = "term.cmdb.ciid") }) @Output({ - @Param(name = "tbodyList", desc = "矩阵属性集合", explode = MatrixAttributeVo[].class), - @Param(name = "type", desc = "类型", type = ApiParamType.ENUM, rule = "custom,external,view,cmdbci,private") + @Param(name = "tbodyList", desc = "common.tbodylist", explode = MatrixAttributeVo[].class), + @Param(name = "type", desc = "common.type", type = ApiParamType.ENUM, rule = "custom,external,view,cmdbci,private,cmdbcustomview") }) - @Description(desc = "矩阵属性检索接口") + @Description(desc = "nmtam.matrixattributesearchapi.getname") @Override public Object myDoService(JSONObject jsonObj) throws Exception { JSONObject resultObj = new JSONObject(); diff --git a/src/main/java/neatlogic/module/tenant/api/matrix/MatrixSaveApi.java b/src/main/java/neatlogic/module/tenant/api/matrix/MatrixSaveApi.java index c997b7760c00a2eb4a4cd49071b6dbefd9c0827e..dffa4e674f89847219335d8a428711d377292579 100644 --- a/src/main/java/neatlogic/module/tenant/api/matrix/MatrixSaveApi.java +++ b/src/main/java/neatlogic/module/tenant/api/matrix/MatrixSaveApi.java @@ -24,10 +24,7 @@ import neatlogic.framework.matrix.core.MatrixDataSourceHandlerFactory; import neatlogic.framework.matrix.dao.mapper.MatrixMapper; import neatlogic.framework.matrix.dto.*; import neatlogic.framework.matrix.exception.*; -import neatlogic.framework.restful.annotation.Input; -import neatlogic.framework.restful.annotation.OperationType; -import neatlogic.framework.restful.annotation.Output; -import neatlogic.framework.restful.annotation.Param; +import neatlogic.framework.restful.annotation.*; import neatlogic.framework.restful.constvalue.OperationTypeEnum; import neatlogic.framework.restful.core.IValid; import neatlogic.framework.restful.core.privateapi.PrivateApiComponentBase; @@ -62,7 +59,7 @@ public class MatrixSaveApi extends PrivateApiComponentBase { @Override public String getName() { - return "数据源矩阵保存"; + return "nmtam.matrixsaveapi.getname"; } @Override @@ -71,18 +68,19 @@ public class MatrixSaveApi extends PrivateApiComponentBase { } @Input({ - @Param(name = "name", type = ApiParamType.STRING, desc = "矩阵名称", xss = true), - @Param(name = "label", type = ApiParamType.REGEX, rule = RegexUtils.ENGLISH_NAME, desc = "矩阵唯一标识", xss = true), - @Param(name = "type", type = ApiParamType.ENUM, rule = "custom,external,view,cmdbci", desc = "矩阵类型"), - @Param(name = "uuid", type = ApiParamType.STRING, desc = "矩阵uuid"), - @Param(name = "integrationUuid", type = ApiParamType.STRING, desc = "集成设置uuid"), - @Param(name = "fileId", type = ApiParamType.LONG, desc = "视图配置文件id"), - @Param(name = "ciId", type = ApiParamType.LONG, desc = "ci模型id"), - @Param(name = "config", type = ApiParamType.JSONOBJECT, desc = "配置信息") + @Param(name = "name", type = ApiParamType.STRING, desc = "common.name", xss = true), + @Param(name = "label", type = ApiParamType.REGEX, rule = RegexUtils.ENGLISH_NAME, desc = "common.uniquename", xss = true), + @Param(name = "type", type = ApiParamType.ENUM, rule = "custom,external,view,cmdbci,cmdbcustomview", desc = "common.type"), + @Param(name = "uuid", type = ApiParamType.STRING, desc = "common.uuid"), + @Param(name = "integrationUuid", type = ApiParamType.STRING, desc = "term.framework.integrationuuid"), + @Param(name = "fileId", type = ApiParamType.LONG, desc = "common.fileid"), + @Param(name = "ciId", type = ApiParamType.LONG, desc = "term.cmdb.ciid"), + @Param(name = "config", type = ApiParamType.JSONOBJECT, desc = "common.config") }) @Output({ - @Param(name = "matrix", explode = MatrixVo.class, desc = "矩阵数据源") + @Param(name = "matrix", explode = MatrixVo.class, desc = "common.matrix") }) + @Description(desc = "nmtam.matrixsaveapi.getname") @Override public Object myDoService(JSONObject jsonObj) throws Exception { JSONObject returnObj = new JSONObject(); diff --git a/src/main/java/neatlogic/module/tenant/api/matrix/MatrixSearchApi.java b/src/main/java/neatlogic/module/tenant/api/matrix/MatrixSearchApi.java index 16dcefd5178fa7e28b8431beae752f25f10e05a8..f3ffecba80c1eeda5d69bab4ee81c882a075532d 100644 --- a/src/main/java/neatlogic/module/tenant/api/matrix/MatrixSearchApi.java +++ b/src/main/java/neatlogic/module/tenant/api/matrix/MatrixSearchApi.java @@ -55,7 +55,7 @@ public class MatrixSearchApi extends PrivateApiComponentBase { @Override public String getName() { - return "数据源矩阵检索"; + return "nmtam.matrixsearchapi.getname"; } @Override @@ -64,18 +64,18 @@ public class MatrixSearchApi extends PrivateApiComponentBase { } @Input({ - @Param(name = "keyword", desc = "关键字", type = ApiParamType.STRING), - @Param(name = "type", desc = "类型", type = ApiParamType.ENUM, rule = "custom,external,view,cmdbci,private"), - @Param(name = "currentPage", desc = "当前页码", type = ApiParamType.INTEGER), - @Param(name = "needPage", desc = "是否分页", type = ApiParamType.BOOLEAN), - @Param(name = "pageSize", desc = "页面展示数", type = ApiParamType.INTEGER), - @Param(name = "defaultValue", desc = "精确匹配回显数据参数", type = ApiParamType.JSONARRAY) + @Param(name = "keyword", desc = "common.keyword", type = ApiParamType.STRING), + @Param(name = "type", desc = "common.type", type = ApiParamType.ENUM, rule = "custom,external,view,cmdbci,private,cmdbcustomview"), + @Param(name = "currentPage", desc = "common.currentpage", type = ApiParamType.INTEGER), + @Param(name = "needPage", desc = "common.needpage", type = ApiParamType.BOOLEAN), + @Param(name = "pageSize", desc = "common.pagesize", type = ApiParamType.INTEGER), + @Param(name = "defaultValue", desc = "common.defaultvalue", type = ApiParamType.JSONARRAY) }) @Output({ - @Param(name = "tbodyList", desc = "矩阵数据源列表", explode = MatrixVo[].class), + @Param(name = "tbodyList", desc = "common.tbodylist", explode = MatrixVo[].class), @Param(explode = BasePageVo.class) }) - @Description(desc = "数据源矩阵检索") + @Description(desc = "nmtam.matrixsearchapi.getname") @Override public Object myDoService(JSONObject jsonObj) throws Exception { MatrixVo searchVo = JSONObject.toJavaObject(jsonObj, MatrixVo.class);