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

提交

上级 a501e6a3
...@@ -1155,7 +1155,7 @@ public class JdbcDatabaseSnapshot extends DatabaseSnapshot { ...@@ -1155,7 +1155,7 @@ public class JdbcDatabaseSnapshot extends DatabaseSnapshot {
if (viewName != null) { if (viewName != null) {
sql += " AND a.VIEW_NAME='" + database.correctObjectName(viewName, View.class) + "'"; sql += " AND a.VIEW_NAME='" + database.correctObjectName(viewName, View.class) + "'";
} }
sql += " AND a.VIEW_NAME not in (select mv.name from all_registered_mviews mv where mv.owner=a.owner)"; //sql += " AND a.VIEW_NAME not in (select mv.name from all_registered_mviews mv where mv.owner=a.owner)";
return executeAndExtract(sql, database); return executeAndExtract(sql, database);
} }
......
...@@ -176,17 +176,21 @@ public class DstCoreResource { ...@@ -176,17 +176,21 @@ public class DstCoreResource {
@Lazy @Lazy
private IMetaFieldService fieldService; private IMetaFieldService fieldService;
@RequestMapping(method = RequestMethod.GET, value = {"/dst/{system}/entitys","/lite/{system}/entitys"}) @RequestMapping(method = RequestMethod.GET, value = {
"/dst/{system}/entities","/lite/{system}/entities",
"/dst/{system}/entitys","/lite/{system}/entitys"})
public ResponseEntity<List<EntityModel>> getEntityModel(@PathVariable("system") String system) { public ResponseEntity<List<EntityModel>> getEntityModel(@PathVariable("system") String system) {
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") @RequestMapping(method = RequestMethod.GET, value = {
public ResponseEntity<List<MetaEntity>> getMetaEntitys(@PathVariable("system") String system) { "/dst/{system}/metaentities","/lite/{system}/metaentities",
"/dst/{system}/metaentitys","/lite/{system}/metaentitys"})
public ResponseEntity<List<MetaEntity>> getMetaEntities(@PathVariable("system") String system) {
return ResponseEntity.status(HttpStatus.OK).body(metaEntityService.list(Wrappers.<MetaEntity>lambdaQuery().eq(MetaEntity::getSystemId,system))); return ResponseEntity.status(HttpStatus.OK).body(metaEntityService.list(Wrappers.<MetaEntity>lambdaQuery().eq(MetaEntity::getSystemId,system)));
} }
@RequestMapping(method = RequestMethod.GET, value = "/lite/{system}/metafieles") @RequestMapping(method = RequestMethod.GET, value = {"/dst/{system}/metafields","/lite/{system}/metafields"})
public ResponseEntity<List<MetaField>> getFields(@PathVariable("system") String system) { public ResponseEntity<List<MetaField>> getFields(@PathVariable("system") String system) {
MetaFieldSearchContext context=new MetaFieldSearchContext(); MetaFieldSearchContext context=new MetaFieldSearchContext();
context.setSize(Integer.MAX_VALUE); context.setSize(Integer.MAX_VALUE);
...@@ -194,27 +198,37 @@ public class DstCoreResource { ...@@ -194,27 +198,37 @@ public class DstCoreResource {
return ResponseEntity.status(HttpStatus.OK).body(fieldService.searchDefault(context).getContent()); return ResponseEntity.status(HttpStatus.OK).body(fieldService.searchDefault(context).getContent());
} }
@RequestMapping(method = RequestMethod.GET, value = {"/dst/{system}/entitys/{entity}","/lite/{system}/entitys/{entity}"}) @RequestMapping(method = RequestMethod.GET, value = {
"/dst/{system}/entities/{entity}","/lite/{system}/entities/{entity}",
"/dst/{system}/entitys/{entity}","/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));
} }
@RequestMapping(method = RequestMethod.GET, value = {"/dst/{system}/entitys/{entity}/fields","/lite/{system}/entitys/{entity}/fields"}) @RequestMapping(method = RequestMethod.GET, value = {
"/dst/{system}/entities/{entity}/fields","/lite/{system}/entities/{entity}/fields",
"/dst/{system}/entitys/{entity}/fields","/lite/{system}/entitys/{entity}/fields"})
public ResponseEntity<List<FieldModel>> getEntityModelFields(@PathVariable("system") String system, @PathVariable("entity") String entity) { public ResponseEntity<List<FieldModel>> getEntityModelFields(@PathVariable("system") String system, @PathVariable("entity") String entity) {
return ResponseEntity.status(HttpStatus.OK).body(liteModelService.getEntityModel(system,entity).getFields()); return ResponseEntity.status(HttpStatus.OK).body(liteModelService.getEntityModel(system,entity).getFields());
} }
@RequestMapping(method = RequestMethod.GET, value = {"/dst/{system}/entitys/{entity}/references","/lite/{system}/entitys/{entity}/references"}) @RequestMapping(method = RequestMethod.GET, value = {
"/dst/{system}/entities/{entity}/references","/lite/{system}/entities/{entity}/references",
"/dst/{system}/entitys/{entity}/references","/lite/{system}/entitys/{entity}/references"})
public ResponseEntity<List<RelationshipModel>> getEntityModelReferences(@PathVariable("system") String system, @PathVariable("entity") String entity) { public ResponseEntity<List<RelationshipModel>> getEntityModelReferences(@PathVariable("system") String system, @PathVariable("entity") String entity) {
return ResponseEntity.status(HttpStatus.OK).body(liteModelService.getEntityModel(system,entity).getReferences()); return ResponseEntity.status(HttpStatus.OK).body(liteModelService.getEntityModel(system,entity).getReferences());
} }
@RequestMapping(method = RequestMethod.GET, value = {"/dst/{system}/entitys/{entity}/nesteds","/lite/{system}/entitys/{entity}/nesteds"}) @RequestMapping(method = RequestMethod.GET, value = {
"/dst/{system}/entities/{entity}/nesteds","/lite/{system}/entities/{entity}/nesteds",
"/dst/{system}/entitys/{entity}/nesteds","/lite/{system}/entitys/{entity}/nesteds"})
public ResponseEntity<List<RelationshipModel>> getEntityModelNesteds(@PathVariable("system") String system, @PathVariable("entity") String entity) { public ResponseEntity<List<RelationshipModel>> getEntityModelNesteds(@PathVariable("system") String system, @PathVariable("entity") String entity) {
return ResponseEntity.status(HttpStatus.OK).body(liteModelService.getEntityModel(system,entity).getNesteds()); return ResponseEntity.status(HttpStatus.OK).body(liteModelService.getEntityModel(system,entity).getNesteds());
} }
@RequestMapping(method = {RequestMethod.POST,RequestMethod.GET}, value = {"/dst/{system}/entitys/{entity}/get","/lite/{system}/entitys/{entity}/get"}) @RequestMapping(method = {RequestMethod.POST,RequestMethod.GET}, value = {
"/dst/{system}/entities/{entity}/get","/lite/{system}/entities/{entity}/get",
"/dst/{system}/entitys/{entity}/get","/lite/{system}/entitys/{entity}/get"})
public ResponseEntity<EntityObj> getEntity(@PathVariable("system") String system, @PathVariable("entity") String entity, HttpServletRequest request,@RequestBody(required = false) Map map) { public ResponseEntity<EntityObj> getEntity(@PathVariable("system") String system, @PathVariable("entity") String entity, HttpServletRequest request,@RequestBody(required = false) Map map) {
Map<String, String[]> params = request.getParameterMap(); Map<String, String[]> params = request.getParameterMap();
EntityObj entityObj = new EntityObj(); EntityObj entityObj = new EntityObj();
...@@ -226,19 +240,25 @@ public class DstCoreResource { ...@@ -226,19 +240,25 @@ public class DstCoreResource {
return ResponseEntity.status(HttpStatus.OK).body(liteDataService.get(system,entity,entityObj.getStringValue("link"),entityObj)); return ResponseEntity.status(HttpStatus.OK).body(liteDataService.get(system,entity,entityObj.getStringValue("link"),entityObj));
} }
@RequestMapping(method = RequestMethod.POST, value = {"/dst/{system}/entitys/{entity}/search{dataset}","/lite/{system}/entitys/{entity}/search{dataset}"}) @RequestMapping(method = RequestMethod.POST, value = {
"/dst/{system}/entities/{entity}/search{dataset}","/lite/{system}/entities/{entity}/search{dataset}",
"/dst/{system}/entitys/{entity}/search{dataset}","/lite/{system}/entitys/{entity}/search{dataset}"})
public ResponseEntity<List<EntityObj>> searchEntity(@PathVariable("system") String system, @PathVariable("entity") String entity, @PathVariable(value = "dataset",required = false) String dataset,@RequestParam(value = "link",required = false) String link,@RequestBody QueryFilter filter) { public ResponseEntity<List<EntityObj>> searchEntity(@PathVariable("system") String system, @PathVariable("entity") String entity, @PathVariable(value = "dataset",required = false) String dataset,@RequestParam(value = "link",required = false) String link,@RequestBody QueryFilter filter) {
if(StringUtils.isEmpty(dataset)) if(StringUtils.isEmpty(dataset))
dataset="BASE"; dataset="BASE";
return ResponseEntity.status(HttpStatus.OK).body(liteDataService.search(system,entity,link,filter)); return ResponseEntity.status(HttpStatus.OK).body(liteDataService.search(system,entity,link,filter));
} }
@RequestMapping(method = RequestMethod.POST, value = {"/dst/{system}/entitys/{entity}/save","/lite/{system}/entitys/{entity}/save"}) @RequestMapping(method = RequestMethod.POST, value = {
"/dst/{system}/entities/{entity}/save","/lite/{system}/entities/{entity}/save",
"/dst/{system}/entitys/{entity}/save","/lite/{system}/entitys/{entity}/save"})
public ResponseEntity<Boolean> saveEntity(@PathVariable("system") String system, @PathVariable("entity") String entity,@RequestParam(value = "link",required = false) String link,@RequestBody EntityObj entityObj) { public ResponseEntity<Boolean> saveEntity(@PathVariable("system") String system, @PathVariable("entity") String entity,@RequestParam(value = "link",required = false) String link,@RequestBody EntityObj entityObj) {
return ResponseEntity.status(HttpStatus.OK).body(liteDataService.save(system,entity,link,entityObj)); return ResponseEntity.status(HttpStatus.OK).body(liteDataService.save(system,entity,link,entityObj));
} }
@RequestMapping(method = RequestMethod.POST, value = {"/dst/{system}/entitys/{entity}/batch","/lite/{system}/entitys/{entity}/batch"}) @RequestMapping(method = RequestMethod.POST, value = {
"/dst/{system}/ententitiesitys/{entity}/batch","/lite/{system}/entities/{entity}/batch",
"/dst/{system}/entitys/{entity}/batch","/lite/{system}/entitys/{entity}/batch"})
public ResponseEntity<Boolean> saveEntity(@PathVariable("system") String system, @PathVariable("entity") String entity,@RequestBody List<EntityObj> list, @RequestParam(value = "link",required = false) String link) { public ResponseEntity<Boolean> saveEntity(@PathVariable("system") String system, @PathVariable("entity") String entity,@RequestBody List<EntityObj> list, @RequestParam(value = "link",required = false) String link) {
return ResponseEntity.status(HttpStatus.OK).body(liteDataService.saveBatch(system,entity,link,list)); return ResponseEntity.status(HttpStatus.OK).body(liteDataService.saveBatch(system,entity,link,list));
} }
...@@ -247,7 +267,7 @@ public class DstCoreResource { ...@@ -247,7 +267,7 @@ public class DstCoreResource {
private LiteCoreService liteCoreService; private LiteCoreService liteCoreService;
@ApiOperation(value = "保存系统", tags = {"系统" }, notes = "保存系统") @ApiOperation(value = "保存系统", tags = {"系统" }, notes = "保存系统")
@RequestMapping(method = RequestMethod.POST, value = "/lite/syncsysmodel") @RequestMapping(method = RequestMethod.POST, value = {"/dst/syncsysmodel","/lite/syncsysmodel"})
public ResponseEntity<Boolean> syncSysModel(@RequestBody SysModel sysModel) { public ResponseEntity<Boolean> syncSysModel(@RequestBody SysModel sysModel) {
return ResponseEntity.status(HttpStatus.OK).body(liteCoreService.syncSysModel(sysModel)); return ResponseEntity.status(HttpStatus.OK).body(liteCoreService.syncSysModel(sysModel));
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册