| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "name", value = "名称", dataType = "String", paramType = "query", required = false, example = "sys_style"), |
| | | @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "Integer", paramType = "query", example = "10"), |
| | | @ApiImplicitParam(name = "pageIndex", value = "分页索引(从0开始)", dataType = "Integer", paramType = "query", example = "0") |
| | | @ApiImplicitParam(name = "pageIndex", value = "分页索引(从0开始)", dataType = "Integer", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/selectByPage") |
| | | public ResponseMsg<List<StyleEntity>> selectByPage(String name, Integer pageSize, Integer pageIndex) { |
| | |
| | | return fail("分页数小于1或分页索引小于0", null); |
| | | } |
| | | |
| | | List<StyleEntity> rs = styleService.selectByPage(name, pageSize, pageSize * pageIndex); |
| | | List<StyleEntity> rs = styleService.selectByPage(name, pageSize, pageSize * (pageIndex - 1)); |
| | | |
| | | return success(rs); |
| | | } catch (Exception ex) { |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "StyleEntity", value = "字典实体类", dataType = "List<StyleEntity>", paramType = "body", example = "") |
| | | }) |
| | | @RequestMapping(value = "/insertStyle", method = RequestMethod.POST, produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertStyle(StyleEntity styleEntity) { |
| | | @PostMapping(value = "/insertStyle",produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertStyle(@RequestBody StyleEntity styleEntity) { |
| | | try { |
| | | int count = styleService.insertStyle(styleEntity); |
| | | |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "StyleEntity", value = "字典实体类", dataType = "com.lf.server.entity.data.StyleEntity", paramType = "body", example = "") |
| | | }) |
| | | @RequestMapping(value = "/insertStyles", method = RequestMethod.POST, produces = "application/json; charset=UTF-8") |
| | | @PostMapping(value = "/insertStyles" ,produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertStyles(@RequestBody List<StyleEntity> styleEntity) { |
| | | try { |
| | | int count = styleService.insertStyles(styleEntity); |
| | |
| | | @ApiImplicitParam(name = "styleEntity", value = "字典ID集合", dataType = "StyleEntity", paramType = "body", example = "") |
| | | }) |
| | | @ResponseBody |
| | | @RequestMapping(value = "/updateStyle", method = RequestMethod.POST, produces = "application/json; charset=UTF-8") |
| | | @PostMapping(value = "/updateStyle", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> updateStyle(StyleEntity styleEntity) { |
| | | try { |
| | | int count = styleService.updateStyle(styleEntity); |