| | |
| | | @Api(value = "关键属性查重规则", tags = "关键属性查重规则接口") |
| | | public class CodeKeyAttrRepeatController extends BladeController { |
| | | |
| | | private final ICodeKeyAttrRepeatService plCodeKeyattrrepeatService; |
| | | |
| | | private final ICodeKeyAttrRepeatService codeKeyattrrepeatService; |
| | | |
| | | CodeKeyAttrRepeatMapper codeKeyattrrepeatMapper; |
| | | |
| | |
| | | @GetMapping("/detail") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "详情", notes = "传入plCodeKeyattrrepeat") |
| | | public R<CodeKeyAttrRepeatVO> detail(CodeKeyAttrRepeat plCodeKeyattrrepeat) { |
| | | CodeKeyAttrRepeat detail = codeKeyattrrepeatMapper.selectOne(Condition.getQueryWrapper(plCodeKeyattrrepeat)); |
| | | public R<CodeKeyAttrRepeatVO> detail(CodeKeyAttrRepeat codeKeyattrrepeat) { |
| | | CodeKeyAttrRepeat detail = codeKeyattrrepeatMapper.selectOne(Condition.getQueryWrapper(codeKeyattrrepeat)); |
| | | return R.data(CodeKeyAttrRepeatWrapper.build().entityVO(detail)); |
| | | } |
| | | |
| | | /** |
| | | * 关键属性查重规则 分页 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "分页", notes = "传入plCodeKeyattrrepeat") |
| | | public R<IPage<CodeKeyAttrRepeatVO>> list(CodeKeyAttrRepeat plCodeKeyattrrepeat, Query query) { |
| | | IPage<CodeKeyAttrRepeat> pages = codeKeyattrrepeatMapper.selectPage(Condition.getPage(query), Condition.getQueryWrapper(plCodeKeyattrrepeat)); |
| | | public R<IPage<CodeKeyAttrRepeatVO>> list(CodeKeyAttrRepeat codeKeyAttrRepeat, Query query) { |
| | | IPage<CodeKeyAttrRepeat> pages = codeKeyattrrepeatMapper.selectPage(Condition.getPage(query), Condition.getQueryWrapper(codeKeyAttrRepeat)); |
| | | return R.data(CodeKeyAttrRepeatWrapper.build().pageVO(pages)); |
| | | } |
| | | |
| | | /** |
| | | * 关键属性查重规则 自定义分页 |
| | | */ |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入plCodeKeyattrrepeat") |
| | | public R<IPage<CodeKeyAttrRepeatVO>> page(CodeKeyAttrRepeatVO plCodeKeyattrrepeat, Query query) { |
| | | IPage<CodeKeyAttrRepeatVO> pages = plCodeKeyattrrepeatService.selectPlCodeKeyattrrepeatPage(Condition.getPage(query), plCodeKeyattrrepeat); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 关键属性查重规则 新增 |
| | | */ |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入plCodeKeyattrrepeat") |
| | | public R save(@Valid @RequestBody CodeKeyAttrRepeat plCodeKeyattrrepeat) { |
| | | return R.status(SqlHelper.retBool(codeKeyattrrepeatMapper.insert(plCodeKeyattrrepeat))); |
| | | } |
| | | |
| | | /** |
| | | * 关键属性查重规则 修改 |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入plCodeKeyattrrepeat") |
| | | public R update(@Valid @RequestBody CodeKeyAttrRepeat plCodeKeyattrrepeat) { |
| | | return R.status(SqlHelper.retBool(codeKeyattrrepeatMapper.updateById(plCodeKeyattrrepeat))); |
| | | } |
| | | |
| | | /** |
| | | * 关键属性查重规则 新增或修改 |
| | | * @param codeKeyAttrRepeat |
| | | * @return |
| | | */ |
| | | @PostMapping("/submit") |
| | | @ApiOperationSupport(order = 6) |
| | | @ApiOperation(value = "新增或修改", notes = "传入plCodeKeyattrrepeat") |
| | | public R submit(@Valid @RequestBody CodeKeyAttrRepeat plCodeKeyattrrepeat) { |
| | | if(plCodeKeyattrrepeat.getOid() != null){ |
| | | return R.status(SqlHelper.retBool(codeKeyattrrepeatMapper.updateById(plCodeKeyattrrepeat))); |
| | | @ApiOperation(value = "新增或修改", notes = "传入codeKeyattrrepeat") |
| | | public R submit(@Valid @RequestBody CodeKeyAttrRepeat codeKeyAttrRepeat) { |
| | | if(codeKeyAttrRepeat.getOid() != null){ |
| | | return R.status(codeKeyattrrepeatService.update(codeKeyAttrRepeat)); |
| | | } |
| | | return R.status(SqlHelper.retBool(codeKeyattrrepeatMapper.insert(plCodeKeyattrrepeat))); |
| | | return R.status(codeKeyattrrepeatService.addSave(codeKeyAttrRepeat)); |
| | | } |
| | | |
| | | /** |
| | | * 关键属性查重规则 删除 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @PostMapping("/remove") |
| | | @ApiOperationSupport(order = 7) |
| | | @ApiOperation(value = "逻辑删除", notes = "传入ids") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | return R.status(SqlHelper.retBool(codeKeyattrrepeatMapper.deleteBatchIds(Func.toLongList(ids)))); |
| | | return R.status(codeKeyattrrepeatService.deleteByOids(ids)); |
| | | } |
| | | |
| | | /** |
| | |
| | | public R listCodeKeyAttrRepeatRuleByOids(@ApiParam(value = "主键集合", required = true) @RequestParam String oids) { |
| | | return R.data(codeKeyattrrepeatMapper.selectBatchIds(Func.toLongList(oids))); |
| | | } |
| | | |
| | | |
| | | } |