| | |
| | | @SysLog() |
| | | @ApiOperation(value = "插入一条") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "实体类", dataType = "com.lf.server.entity.data.DirEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "entity", value = "实体类", dataType = "DirEntity", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertDir", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertDir(@RequestBody DirEntity entity, HttpServletRequest req) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "插入多条") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "list", value = "实体类集合", dataType = "com.lf.server.entity.data.DirEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "list", value = "实体类集合", dataType = "DirEntity", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertDirs", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertDirs(@RequestBody List<DirEntity> list, HttpServletRequest req) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "删除多条") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "ids", value = "ID数组", dataType = "com.lf.server.entity.data.DirEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "ids", value = "ID数组", dataType = "DirEntity", paramType = "body", example = "") |
| | | }) |
| | | @GetMapping(value = "/deleteDirs") |
| | | public ResponseMsg<Integer> deleteDirs(@RequestParam List<Integer> ids) { |
| | |
| | | log.error(ex.getMessage(), ex); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "查询项目") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "name", value = "名称", dataType = "String", paramType = "query", example = "西") |
| | | }) |
| | | @GetMapping(value = "/selectProject") |
| | | public ResponseMsg<List<DirEntity>> selectProject(String name) { |
| | | try { |
| | | List<DirEntity> list = dirService.selectProject(name); |
| | | |
| | | return success(list); |
| | | } catch (Exception ex) { |
| | | return fail(ex, null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "递归查询") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "pid", value = "父ID", dataType = "Integer", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/selectByPid") |
| | | public ResponseMsg<List<DirEntity>> selectByPid(int pid) { |
| | | try { |
| | | List<DirEntity> list = dirService.selectByPid(pid); |
| | | |
| | | return success(list); |
| | | } catch (Exception ex) { |
| | | return fail(ex, null); |
| | | } |
| | | } |
| | | } |