提交 fe402b87 编写于 作者: sq3536's avatar sq3536

接口

上级 19bcb6c3
...@@ -3,6 +3,8 @@ package cn.ibizlab.api.rest.extensions; ...@@ -3,6 +3,8 @@ package cn.ibizlab.api.rest.extensions;
import cn.ibizlab.core.lite.domain.DstComponent; import cn.ibizlab.core.lite.domain.DstComponent;
import cn.ibizlab.core.lite.domain.DstSystem; import cn.ibizlab.core.lite.domain.DstSystem;
import cn.ibizlab.core.lite.extensions.domain.EntityModel; import cn.ibizlab.core.lite.extensions.domain.EntityModel;
import cn.ibizlab.core.lite.extensions.domain.FieldModel;
import cn.ibizlab.core.lite.extensions.domain.RelationshipModel;
import cn.ibizlab.core.lite.extensions.domain.SysModel; import cn.ibizlab.core.lite.extensions.domain.SysModel;
import cn.ibizlab.core.lite.extensions.service.LiteCoreService; import cn.ibizlab.core.lite.extensions.service.LiteCoreService;
import cn.ibizlab.core.lite.extensions.service.LiteModelService; import cn.ibizlab.core.lite.extensions.service.LiteModelService;
...@@ -43,6 +45,21 @@ public class LiteCoreResource { ...@@ -43,6 +45,21 @@ public class LiteCoreResource {
return ResponseEntity.status(HttpStatus.OK).body(liteModelService.getEntityModel(system,entity)); return ResponseEntity.status(HttpStatus.OK).body(liteModelService.getEntityModel(system,entity));
} }
@RequestMapping(method = RequestMethod.GET, value = "/lite/{system}/entitys/{entity}/fields")
public ResponseEntity<List<FieldModel>> getEntityModelFields(@PathVariable("system") String system, @PathVariable("entity") String entity) {
return ResponseEntity.status(HttpStatus.OK).body(liteModelService.getEntityModel(system,entity).getFields());
}
@RequestMapping(method = RequestMethod.GET, value = "/lite/{system}/entitys/{entity}/references")
public ResponseEntity<List<RelationshipModel>> getEntityModelReferences(@PathVariable("system") String system, @PathVariable("entity") String entity) {
return ResponseEntity.status(HttpStatus.OK).body(liteModelService.getEntityModel(system,entity).getReferences());
}
@RequestMapping(method = RequestMethod.GET, value = "/lite/{system}/entitys/{entity}/nesteds")
public ResponseEntity<List<RelationshipModel>> getEntityModelNesteds(@PathVariable("system") String system, @PathVariable("entity") String entity) {
return ResponseEntity.status(HttpStatus.OK).body(liteModelService.getEntityModel(system,entity).getNesteds());
}
@RequestMapping(method = RequestMethod.GET, value = "/lite/{app}/components/{component}") @RequestMapping(method = RequestMethod.GET, value = "/lite/{app}/components/{component}")
public ResponseEntity<JSON> getComponent(@PathVariable("app") String app, @PathVariable("component") String component) { public ResponseEntity<JSON> getComponent(@PathVariable("app") String app, @PathVariable("component") String component) {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册