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

提交

上级 35ebcbe1
package cn.ibizlab.api.rest.extensions; package cn.ibizlab.api.rest.extensions;
import cn.ibizlab.core.lite.domain.DstComponent; import cn.ibizlab.core.lite.domain.*;
import cn.ibizlab.core.lite.domain.DstConfig;
import cn.ibizlab.core.lite.domain.DstSystem;
import cn.ibizlab.core.lite.domain.MetaField;
import cn.ibizlab.core.lite.extensions.domain.*; import cn.ibizlab.core.lite.extensions.domain.*;
import cn.ibizlab.core.lite.extensions.model.DataModel; import cn.ibizlab.core.lite.extensions.model.DataModel;
import cn.ibizlab.core.lite.extensions.model.Property; import cn.ibizlab.core.lite.extensions.model.Property;
...@@ -14,6 +11,7 @@ import cn.ibizlab.core.lite.extensions.service.LiteModelService; ...@@ -14,6 +11,7 @@ import cn.ibizlab.core.lite.extensions.service.LiteModelService;
import cn.ibizlab.core.lite.filter.MetaFieldSearchContext; import cn.ibizlab.core.lite.filter.MetaFieldSearchContext;
import cn.ibizlab.core.lite.service.IDstComponentService; import cn.ibizlab.core.lite.service.IDstComponentService;
import cn.ibizlab.core.lite.service.IDstConfigService; import cn.ibizlab.core.lite.service.IDstConfigService;
import cn.ibizlab.core.lite.service.IMetaEntityService;
import cn.ibizlab.core.lite.service.IMetaFieldService; import cn.ibizlab.core.lite.service.IMetaFieldService;
import cn.ibizlab.util.client.IBZDictFeignClient; import cn.ibizlab.util.client.IBZDictFeignClient;
import cn.ibizlab.util.dict.CodeItem; import cn.ibizlab.util.dict.CodeItem;
...@@ -60,6 +58,9 @@ public class LiteCoreResource { ...@@ -60,6 +58,9 @@ public class LiteCoreResource {
@Lazy @Lazy
LiteCoreService liteCoreService; LiteCoreService liteCoreService;
@Autowired
IMetaEntityService metaEntityService;
@Autowired @Autowired
private LiteDataService liteDataService; private LiteDataService liteDataService;
...@@ -228,6 +229,21 @@ public class LiteCoreResource { ...@@ -228,6 +229,21 @@ public class LiteCoreResource {
return ResponseEntity.status(HttpStatus.OK).body(liteModelService.getEntityModel(system)); return ResponseEntity.status(HttpStatus.OK).body(liteModelService.getEntityModel(system));
} }
@RequestMapping(method = RequestMethod.GET, value = "/lite/{system}/metaentitys")
public ResponseEntity<List<MetaEntity>> getMetaEntitys(@PathVariable("system") String system) {
return ResponseEntity.status(HttpStatus.OK).body(metaEntityService.list());
}
@RequestMapping(method = RequestMethod.GET, value = "/lite/{system}/metafieles")
public ResponseEntity<List<MetaField>> getFields(@PathVariable("system") String system) {
MetaFieldSearchContext context=new MetaFieldSearchContext();
context.setSize(Integer.MAX_VALUE);
context.setN_systemid_eq(system);
return ResponseEntity.status(HttpStatus.OK).body(fieldService.searchDefault(context).getContent());
}
@RequestMapping(method = RequestMethod.GET, value = "/lite/{system}/entitys/{entity}") @RequestMapping(method = RequestMethod.GET, value = "/lite/{system}/entitys/{entity}")
public ResponseEntity<EntityModel> getEntityModel(@PathVariable("system") String system, @PathVariable("entity") String entity) { public ResponseEntity<EntityModel> getEntityModel(@PathVariable("system") String system, @PathVariable("entity") String entity) {
return ResponseEntity.status(HttpStatus.OK).body(liteModelService.getEntityModel(system,entity)); return ResponseEntity.status(HttpStatus.OK).body(liteModelService.getEntityModel(system,entity));
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册