提交 159c3449 编写于 作者: ibizdev's avatar ibizdev

ibizdev提交

上级 f679b40d
...@@ -77,7 +77,7 @@ public class IBZDictResource { ...@@ -77,7 +77,7 @@ public class IBZDictResource {
@ApiOperation(value = "CheckKey", tags = {"IBZDict" }, notes = "CheckKey") @ApiOperation(value = "CheckKey", tags = {"IBZDict" }, notes = "CheckKey")
@RequestMapping(method = RequestMethod.POST, value = "/dictapi/ibzdicts/checkkey") @RequestMapping(method = RequestMethod.POST, value = "/dictapi/ibzdicts/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody IBZDictDTO ibzdictdto) { public ResponseEntity<Boolean> checkKey(@RequestBody IBZDictDTO ibzdictdto) {
return ResponseEntity.status(HttpStatus.OK).body(ibzdictService.checkKey(ibzdictMapping.toDomain(itemCodeNameLC + "dto"))); return ResponseEntity.status(HttpStatus.OK).body(ibzdictService.checkKey(ibzdictMapping.toDomain(ibzdict + "dto")));
} }
@ApiOperation(value = "GetDraft", tags = {"IBZDict" }, notes = "GetDraft") @ApiOperation(value = "GetDraft", tags = {"IBZDict" }, notes = "GetDraft")
...@@ -104,24 +104,19 @@ public class IBZDictResource { ...@@ -104,24 +104,19 @@ public class IBZDictResource {
return ResponseEntity.status(HttpStatus.OK).body(ibzdictService.remove(ibzdict_id)); return ResponseEntity.status(HttpStatus.OK).body(ibzdictService.remove(ibzdict_id));
} }
//SAVE
@ApiOperation(value = "Save", tags = {"IBZDict" }, notes = "Save") @ApiOperation(value = "Save", tags = {"IBZDict" }, notes = "Save")
@RequestMapping(method = RequestMethod.POST, value = "/dictapi/ibzdicts/{ibzdict_id}/save") @RequestMapping(method = RequestMethod.POST, value = "/dictapi/ibzdicts/{ibzdict_id}/save")
public ResponseEntity<Boolean> save(@RequestBody IBZDictDTO ibzdictdto) { public ResponseEntity<Boolean> save(@RequestBody IBZDictDTO ibzdictdto) {
return ResponseEntity.status(HttpStatus.OK).body(ibzdictService.save(ibzdictMapping.toDomain(ibzdictdto))); return ResponseEntity.status(HttpStatus.OK).body(ibzdictService.save(ibzdictMapping.toDomain(ibzdictdto)));
} }
//9 //9
@ApiOperation(value = "获取DEFAULT", tags = {"IBZDict" } ,notes = "获取DEFAULT") @ApiOperation(value = "获取DEFAULT", tags = {"IBZDict" } ,notes = "获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/dictapi/ibzdicts/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/dictapi/ibzdicts/fetchdefault")
public ResponseEntity<List<IBZDictDTO>> fetchDefault(IBZDictSearchContext context) { public ResponseEntity<List<IBZDictDTO>> fetchDefault(IBZDictSearchContext context) {
List<IBZDictDTO> list = new ArrayList<IBZDictDTO>();
Page<IBZDict> domains = ibzdictService.searchDefault(context) ; Page<IBZDict> domains = ibzdictService.searchDefault(context) ;
for(IBZDict ibzdict : domains.getContent()){ List<IBZDictDTO> list = ibzdictMapping.toDto(domains.getContent())
IBZDictDTO dto =IBZDictMapping.MAPPER.toDto(ibzdict);
list.add(dto);
}
return ResponseEntity.status(HttpStatus.OK) return ResponseEntity.status(HttpStatus.OK)
.header("x-page", String.valueOf(context.getPageable().getPageNumber())) .header("x-page", String.valueOf(context.getPageable().getPageNumber()))
.header("x-per-page", String.valueOf(context.getPageable().getPageSize())) .header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册