| | |
| | | |
| | | private final ICodeButtonService codeButtonService; |
| | | |
| | | CodeButtonMapper codeButtonMapper; |
| | | |
| | | /** |
| | | * 模板扩展池 详情 |
| | | */ |
| | | @GetMapping("/detail") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "详情", notes = "传入codebutton") |
| | | public R<CodeButtonVO> detail(CodeButton codebutton) { |
| | | CodeButton detail = codeButtonMapper.selectOne(Condition.getQueryWrapper(codebutton)); |
| | | return R.data(CodeButtonWrapper.build().entityVO(detail)); |
| | | } |
| | | /** |
| | | * 模板扩展池 分页 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "分页", notes = "传入codebutton") |
| | | public R<IPage<CodeButtonVO>> list(CodeButton codebutton, Query query) { |
| | | IPage<CodeButton> pages = codeButtonMapper.selectPage(Condition.getPage(query), Condition.getQueryWrapper(codebutton)); |
| | | return R.data(CodeButtonWrapper.build().pageVO(pages)); |
| | | } |
| | | |
| | | /** |
| | | * 模板扩展池 自定义分页 |
| | | */ |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入codebutton") |
| | | public R<IPage<CodeButtonVO>> page(CodeButtonVO codebutton, Query query) { |
| | | IPage<CodeButtonVO> pages = codeButtonService.selectcodebuttonPage(Condition.getPage(query), codebutton); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 模板扩展池 新增 |
| | | */ |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入codebutton") |
| | | public R save(@Valid @RequestBody CodeButton codebutton) { |
| | | return R.status(SqlHelper.retBool(codeButtonMapper.insert(codebutton))); |
| | | } |
| | | |
| | | /** |
| | | * 模板扩展池 修改 |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入codebutton") |
| | | public R update(@Valid @RequestBody CodeButton codebutton) { |
| | | return R.status(SqlHelper.retBool(codeButtonMapper.updateById(codebutton))); |
| | | } |
| | | |
| | | /** |
| | | * 模板扩展池 新增或修改 |
| | | */ |
| | | @PostMapping("/submit") |
| | | @ApiOperationSupport(order = 6) |
| | | @ApiOperation(value = "新增或修改", notes = "传入codebutton") |
| | | public R submit(@Valid @RequestBody CodeButton codebutton) { |
| | | if(codebutton.getOid() != null){ |
| | | return R.status(SqlHelper.retBool(codeButtonMapper.updateById(codebutton))); |
| | | } |
| | | return R.status(SqlHelper.retBool(codeButtonMapper.insert(codebutton))); |
| | | } |
| | | |
| | | /** |
| | | * 模板扩展池 删除 |
| | | */ |
| | | @PostMapping("/remove") |
| | | @ApiOperationSupport(order = 7) |
| | | @ApiOperation(value = "逻辑删除", notes = "传入ids") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | // return codebuttonService.deleteCodeButton(ids); |
| | | return R.status(SqlHelper.retBool(codeButtonMapper.deleteBatchIds(Func.toStrList(ids)))); |
| | | } |
| | | |
| | | /** |
| | | * 主数据中的按钮扩展列表 |
| | | * @param baseQueryObject 基础查询对象,包含查询条件,分页,排序等 |