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

lite

上级 432b3281
......@@ -38,7 +38,7 @@ public class DstCoreResource {
private LiteDataService liteDataService;
@RequestMapping(method = RequestMethod.GET, value = "/dst/datamodels/{modelid}/data/{key}")
@RequestMapping(method = RequestMethod.GET, value = {"/dst/datamodels/{modelid}/data/{key}","/lite/datamodels/{modelid}/data/{key}"})
public ResponseEntity<ModelObj> getModelObj(@PathVariable(name="modelid",required = false) String modelid,@PathVariable(name="key",required = false) String key)
{
......@@ -47,14 +47,16 @@ public class DstCoreResource {
return ResponseEntity.ok(liteDataService.getModelObjs(modelid, null,key));
}
@RequestMapping(method = RequestMethod.GET, value = {"/dst/datamodels/{modelid}","/dst/datamodels/{modelid}/name/{modelname}"})
@RequestMapping(method = RequestMethod.GET, value = {"/dst/datamodels/{modelid}","/dst/datamodels/{modelid}/name/{modelname}",
"/lite/datamodels/{modelid}","/lite/datamodels/{modelid}/name/{modelname}"})
public ResponseEntity<DataModel> getDataModel(@PathVariable(name="modelid",required = false) String modelid,
@PathVariable(name="modelname",required = false) String modelname)
{
return ResponseEntity.ok(liteModelService.getDataModel(modelid,modelname));
}
@RequestMapping(method = RequestMethod.GET, value = {"/dst/datamodels/{modelid}/submodels","/dst/datamodels/{modelid}/name/{modelname}/submodels"})
@RequestMapping(method = RequestMethod.GET, value = {"/dst/datamodels/{modelid}/submodels","/dst/datamodels/{modelid}/name/{modelname}/submodels",
"/lite/datamodels/{modelid}/submodels","/lite/datamodels/{modelid}/name/{modelname}/submodels"})
public ResponseEntity<List<Option>> getDataModelSubModels(@PathVariable(name="modelid",required = false) String modelid,
@PathVariable(name="modelname",required = false) String modelname)
{
......@@ -63,7 +65,8 @@ public class DstCoreResource {
return ResponseEntity.ok(list);
}
@RequestMapping(method = RequestMethod.GET, value = {"/dst/datamodels/{modelid}/propertys","/dst/datamodels/{modelid}/name/{modelname}/propertys"})
@RequestMapping(method = RequestMethod.GET, value = {"/dst/datamodels/{modelid}/propertys","/dst/datamodels/{modelid}/name/{modelname}/propertys",
"/lite/datamodels/{modelid}/propertys","/lite/datamodels/{modelid}/name/{modelname}/propertys"})
public ResponseEntity<List<Option>> getDataModelParentProperty(@PathVariable(name="modelid",required = false) String modelid,
@PathVariable(name="modelname",required = false) String modelname)
{
......@@ -77,7 +80,8 @@ public class DstCoreResource {
@RequestMapping(method = RequestMethod.GET, value = {"/dst/datamodels/{modelid}/propertys/{propertyname}/fields","/dst/datamodels/{modelid}/name/{modelname}/propertys/{propertyname}/fields"})
@RequestMapping(method = RequestMethod.GET, value = {"/dst/datamodels/{modelid}/propertys/{propertyname}/fields","/dst/datamodels/{modelid}/name/{modelname}/propertys/{propertyname}/fields",
"/lite/datamodels/{modelid}/propertys/{propertyname}/fields","/lite/datamodels/{modelid}/name/{modelname}/propertys/{propertyname}/fields"})
public ResponseEntity<List<Option>> getDataModelParentField(@PathVariable(name="modelid",required = false) String modelid,
@PathVariable(name="modelname",required = false) String modelname,
@PathVariable(name="propertyname",required = false) String propertyname)
......@@ -102,7 +106,7 @@ public class DstCoreResource {
});
return ResponseEntity.ok(list);
}
@RequestMapping(method = RequestMethod.GET, value = {"/dst/datamodels/{modelid}/allpropertys/{propertyname}/fields"})
@RequestMapping(method = RequestMethod.GET, value = {"/dst/datamodels/{modelid}/allpropertys/{propertyname}/fields","/lite/datamodels/{modelid}/allpropertys/{propertyname}/fields"})
public ResponseEntity<List<Option>> getDataModelField(@PathVariable(name="modelid",required = false) String modelid,
@PathVariable(name="propertyname",required = false) String propertyname,
@PathVariable(name="fieldname",required = false) String fieldname)
......@@ -119,7 +123,7 @@ public class DstCoreResource {
@Autowired
private DictDstService dictDstService;
@RequestMapping(method = RequestMethod.GET, value = {"/dst/datamodels/{modelid}/{propertyname}.{fieldname}/dict"})
@RequestMapping(method = RequestMethod.GET, value = {"/dst/datamodels/{modelid}/{propertyname}.{fieldname}/dict","/lite/datamodels/{modelid}/{propertyname}.{fieldname}/dict"})
public ResponseEntity<List<CodeItem>> getDataModelFieldDict(@PathVariable(name="modelid",required = false) String modelid,
@PathVariable(name="propertyname",required = false) String propertyname,
@PathVariable(name="fieldname",required = false) String fieldname)
......@@ -146,32 +150,32 @@ public class DstCoreResource {
return ResponseEntity.ok(list);
}
@RequestMapping(method = RequestMethod.GET, value = "/dst/{system}/entitys")
@RequestMapping(method = RequestMethod.GET, value = {"/dst/{system}/entitys","/lite/{system}/entitys"})
public ResponseEntity<List<EntityModel>> getEntityModel(@PathVariable("system") String system) {
return ResponseEntity.status(HttpStatus.OK).body(liteModelService.getEntityModel(system));
}
@RequestMapping(method = RequestMethod.GET, value = "/dst/{system}/entitys/{entity}")
@RequestMapping(method = RequestMethod.GET, value = {"/dst/{system}/entitys/{entity}","/lite/{system}/entitys/{entity}"})
public ResponseEntity<EntityModel> getEntityModel(@PathVariable("system") String system, @PathVariable("entity") String entity) {
return ResponseEntity.status(HttpStatus.OK).body(liteModelService.getEntityModel(system,entity));
}
@RequestMapping(method = RequestMethod.GET, value = "/dst/{system}/entitys/{entity}/fields")
@RequestMapping(method = RequestMethod.GET, value = {"/dst/{system}/entitys/{entity}/fields","/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 = "/dst/{system}/entitys/{entity}/references")
@RequestMapping(method = RequestMethod.GET, value = {"/dst/{system}/entitys/{entity}/references","/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 = "/dst/{system}/entitys/{entity}/nesteds")
@RequestMapping(method = RequestMethod.GET, value = {"/dst/{system}/entitys/{entity}/nesteds","/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.POST,RequestMethod.GET}, value = "/dst/{system}/entitys/{entity}/get")
@RequestMapping(method = {RequestMethod.POST,RequestMethod.GET}, value = {"/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) {
Map<String, String[]> params = request.getParameterMap();
EntityObj entityObj = new EntityObj();
......@@ -183,24 +187,24 @@ public class DstCoreResource {
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}")
@RequestMapping(method = RequestMethod.POST, value = {"/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) {
if(StringUtils.isEmpty(dataset))
dataset="BASE";
return ResponseEntity.status(HttpStatus.OK).body(liteDataService.search(system,entity,link,filter));
}
@RequestMapping(method = RequestMethod.POST, value = "/dst/{system}/entitys/{entity}/save")
@RequestMapping(method = RequestMethod.POST, value = {"/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) {
return ResponseEntity.status(HttpStatus.OK).body(liteDataService.save(system,entity,link,entityObj));
}
@RequestMapping(method = RequestMethod.POST, value = "/dst/{system}/entitys/{entity}/batch")
@RequestMapping(method = RequestMethod.POST, value = {"/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) {
return ResponseEntity.status(HttpStatus.OK).body(liteDataService.saveBatch(system,entity,link,list));
}
@RequestMapping(method = RequestMethod.GET, value = "/dst/sysapps")
@RequestMapping(method = RequestMethod.GET, value = {"/dst/sysapps","/lite/sysapps"})
public ResponseEntity<List<DstSystem>> getSysApps() {
return ResponseEntity.status(HttpStatus.OK).body(liteModelService.getSysApp());
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册