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

dict路径

上级 291c25aa
......@@ -121,6 +121,7 @@ public class webSecurityConfig extends WebSecurityConfigurerAdapter {
.antMatchers("/"+uploadpath).permitAll()
.antMatchers("/"+previewpath+"/**").permitAll()
.antMatchers("/ibizutil/**").permitAll()
.antMatchers("/dictionaries/**").permitAll()
.antMatchers("/dictionarys/**").permitAll()
.antMatchers("/lite/**").permitAll()
.antMatchers("/dst/**").permitAll();
......
......@@ -119,6 +119,7 @@ public class DevBootSecurityConfig extends WebSecurityConfigurerAdapter {
.antMatchers("/dst/**").permitAll()
.antMatchers("/lite/**").permitAll()
.antMatchers("/ibizutil/**").permitAll()
.antMatchers("/dictionaries/**").permitAll()
.antMatchers("/dictionarys/**").permitAll()
.antMatchers("/"+previewpath+"/**").permitAll();
......
......@@ -124,6 +124,7 @@ public class apiSecurityConfig extends WebSecurityConfigurerAdapter {
.antMatchers("/"+previewpath+"/**").permitAll()
.antMatchers("/dst/**").permitAll()
.antMatchers("/ibizutil/**").permitAll()
.antMatchers("/dictionaries/**").permitAll()
.antMatchers("/dictionarys/**").permitAll()
.antMatchers("/lite/**").permitAll();
......
......@@ -41,7 +41,7 @@ public class DictCoreResource {
@Lazy
private DictDstService dictCoreService;
@RequestMapping(method = {RequestMethod.GET}, value = "/dictionarys/catalogs/{code}")
@RequestMapping(method = {RequestMethod.GET}, value = {"/dictionaries/catalogs/{code}","/dictionarys/catalogs/{code}"})
public ResponseEntity<Catalog> getCatalogs(@PathVariable("code") String code,DictOptionSearchContext context) {
Catalog catalog = null;
if(context==null||StringUtils.isEmpty(context.getSelectCond().getSqlSegment()))
......@@ -51,7 +51,7 @@ public class DictCoreResource {
return ResponseEntity.status(HttpStatus.OK).body(catalog);
}
@RequestMapping(method = {RequestMethod.GET}, value = "/dictionarys/catalogs/{code}/options")
@RequestMapping(method = {RequestMethod.GET}, value = {"/dictionaries/catalogs/{code}/options","/dictionarys/catalogs/{code}/options"})
public ResponseEntity<List<Option>> getOptions(@PathVariable("code") String code, DictOptionSearchContext context) {
Catalog catalog = null;
if(context==null||StringUtils.isEmpty(context.getSelectCond().getSqlSegment()))
......@@ -63,7 +63,7 @@ public class DictCoreResource {
@RequestMapping(method = {RequestMethod.GET}, value = "/dictionarys/codelist/{code}")
@RequestMapping(method = {RequestMethod.GET}, value = {"/dictionaries/codelist/{code}","/dictionarys/codelist/{code}"})
public ResponseEntity<CodeList> getCodeList(@PathVariable("code") String code,DictOptionSearchContext context) {
CodeList catalog = null;
if(context==null||StringUtils.isEmpty(context.getSelectCond().getSqlSegment()))
......@@ -74,7 +74,7 @@ public class DictCoreResource {
}
@RequestMapping(method = {RequestMethod.GET}, value = "/dictionarys/codelist/{code}/items")
@RequestMapping(method = {RequestMethod.GET}, value = {"/dictionaries/codelist/{code}/items","/dictionarys/codelist/{code}/items"})
public ResponseEntity<List<CodeItem>> getCodeItems(@PathVariable("code") String code, DictOptionSearchContext context) {
CodeList catalog = null;
if(context==null||StringUtils.isEmpty(context.getSelectCond().getSqlSegment()))
......@@ -85,7 +85,7 @@ public class DictCoreResource {
}
@RequestMapping(method = {RequestMethod.POST}, value = "/dictionarys/catalogs/{code}")
@RequestMapping(method = {RequestMethod.POST}, value = {"/dictionaries/catalogs/{code}","/dictionarys/catalogs/{code}"})
public ResponseEntity<Catalog> catalogs(@PathVariable("code") String code, @RequestBody(required = false) DictOptionSearchContext context) {
Catalog catalog = null;
if(context==null||StringUtils.isEmpty(context.getSelectCond().getSqlSegment()))
......@@ -95,7 +95,7 @@ public class DictCoreResource {
return ResponseEntity.status(HttpStatus.OK).body(catalog);
}
@RequestMapping(method = {RequestMethod.POST}, value = "/dictionarys/catalogs/{code}/options")
@RequestMapping(method = {RequestMethod.POST}, value = {"/dictionaries/catalogs/{code}/options","/dictionarys/catalogs/{code}/options"})
public ResponseEntity<List<Option>> options(@PathVariable("code") String code,@RequestBody(required = false) DictOptionSearchContext context) {
Catalog catalog = null;
if(context==null||StringUtils.isEmpty(context.getSelectCond().getSqlSegment()))
......@@ -107,7 +107,7 @@ public class DictCoreResource {
@RequestMapping(method = {RequestMethod.POST}, value = "/dictionarys/codelist/{code}")
@RequestMapping(method = {RequestMethod.POST}, value = {"/dictionaries/codelist/{code}","/dictionarys/codelist/{code}"})
public ResponseEntity<CodeList> codeList(@PathVariable("code") String code,@RequestBody(required = false) DictOptionSearchContext context) {
CodeList catalog = null;
if(context==null||StringUtils.isEmpty(context.getSelectCond().getSqlSegment()))
......@@ -118,7 +118,7 @@ public class DictCoreResource {
}
@RequestMapping(method = {RequestMethod.POST}, value = "/dictionarys/codelist/{code}/items")
@RequestMapping(method = {RequestMethod.POST}, value = {"/dictionaries/codelist/{code}/items","/dictionarys/codelist/{code}/items"})
public ResponseEntity<List<CodeItem>> codeItems(@PathVariable("code") String code, @RequestBody(required = false) DictOptionSearchContext context) {
CodeList catalog = null;
if(context==null||StringUtils.isEmpty(context.getSelectCond().getSqlSegment()))
......@@ -129,18 +129,18 @@ public class DictCoreResource {
}
@RequestMapping(method = RequestMethod.POST, value = "/dictionarys/catalogs")
@RequestMapping(method = RequestMethod.POST, value = {"/dictionaries/catalogs","/dictionarys/catalogs"})
public ResponseEntity<Boolean> save(@RequestBody DictCatalogDTO dictcatalogdto) {
return ResponseEntity.status(HttpStatus.OK).body(dictcatalogService.save(dictcatalogMapping.toDomain(dictcatalogdto)));
}
@RequestMapping(method = RequestMethod.POST, value = "/dictionarys/catalogs/savebatch")
@RequestMapping(method = RequestMethod.POST, value = {"/dictionaries/catalogs/savebatch","/dictionarys/catalogs/savebatch"})
public ResponseEntity<Boolean> saveBatch(@RequestBody List<DictCatalogDTO> dictcatalogdtos) {
dictcatalogService.saveBatch(dictcatalogMapping.toDomain(dictcatalogdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@RequestMapping(method = RequestMethod.POST, value = "/dictionarys/catalogs/sync")
@RequestMapping(method = RequestMethod.POST, value = {"/dictionaries/catalogs/sync","/dictionarys/catalogs/sync"})
public ResponseEntity<Boolean> syncRuntimeDict(@RequestBody List<DictCatalog> catalogs){
dictCoreService.syncRuntimeDict(catalogs);
return ResponseEntity.status(HttpStatus.OK).body(true);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册