| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.toolkit.SqlHelper; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import com.vci.ubcs.code.entity.CodePhaseattrEntity; |
| | | import com.vci.ubcs.code.entity.CodePhaseAttr; |
| | | import com.vci.ubcs.code.mapper.CodePhaseattrMapper; |
| | | import com.vci.ubcs.code.service.ICodePhaseattrService; |
| | | import com.vci.ubcs.code.vo.CodePhaseattrVO; |
| | |
| | | @GetMapping("/detail") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "详情", notes = "传入CodePhaseattr") |
| | | public R<CodePhaseattrVO> detail(CodePhaseattrEntity codePhaseattr) { |
| | | CodePhaseattrEntity detail = CodePhaseattrService.getOne(Condition.getQueryWrapper(codePhaseattr)); |
| | | public R<CodePhaseattrVO> detail(CodePhaseAttr codePhaseattr) { |
| | | CodePhaseAttr detail = CodePhaseattrService.getOne(Condition.getQueryWrapper(codePhaseattr)); |
| | | return R.data(CodePhaseattrWrapper.build().entityVO(detail)); |
| | | } |
| | | /** |
| | |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "分页", notes = "传入CodePhaseattr") |
| | | public R<IPage<CodePhaseattrVO>> list(CodePhaseattrEntity codePhaseattr, Query query) { |
| | | IPage<CodePhaseattrEntity> pages = CodePhaseattrService.page(Condition.getPage(query), Condition.getQueryWrapper(codePhaseattr)); |
| | | public R<IPage<CodePhaseattrVO>> list(CodePhaseAttr codePhaseattr, Query query) { |
| | | IPage<CodePhaseAttr> pages = CodePhaseattrService.page(Condition.getPage(query), Condition.getQueryWrapper(codePhaseattr)); |
| | | return R.data(CodePhaseattrWrapper.build().pageVO(pages)); |
| | | } |
| | | |
| | |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入CodePhaseattr") |
| | | public R save(@Valid @RequestBody CodePhaseattrEntity codePhaseattr) { |
| | | public R save(@Valid @RequestBody CodePhaseAttr codePhaseattr) { |
| | | return R.status(CodePhaseattrService.save(codePhaseattr)); |
| | | } |
| | | |
| | |
| | | @PostMapping("/update") |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入CodePhaseattr") |
| | | public R update(@Valid @RequestBody CodePhaseattrEntity codePhaseattr) { |
| | | public R update(@Valid @RequestBody CodePhaseAttr codePhaseattr) { |
| | | return R.status(CodePhaseattrService.updateById(codePhaseattr)); |
| | | } |
| | | |
| | |
| | | @PostMapping("/submit") |
| | | @ApiOperationSupport(order = 6) |
| | | @ApiOperation(value = "新增或修改", notes = "传入CodePhaseattr") |
| | | public R submit(@Valid @RequestBody CodePhaseattrEntity codePhaseattr) { |
| | | public R submit(@Valid @RequestBody CodePhaseAttr codePhaseattr) { |
| | | return R.status(CodePhaseattrService.saveOrUpdate(codePhaseattr)); |
| | | } |
| | | |