From 11ec7ac8f4832c4274cf61a19cc35cda3de9e0e5 Mon Sep 17 00:00:00 2001 From: huliguo <2023611923@qq.com> Date: 星期三, 09 七月 2025 16:04:41 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/main/java/com/linghu/controller/TypeController.java | 8 +------- 1 files changed, 1 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/linghu/controller/TypeController.java b/src/main/java/com/linghu/controller/TypeController.java index 7980ad9..f3c99e9 100644 --- a/src/main/java/com/linghu/controller/TypeController.java +++ b/src/main/java/com/linghu/controller/TypeController.java @@ -24,7 +24,6 @@ @PostMapping @ApiOperation(value = "添加类型") public ResponseResult<Type> add(@RequestBody Type type) { - type.setDel_flag(0); boolean success = typeService.save(type); if (success) { return ResponseResult.success(type); @@ -35,8 +34,6 @@ @PostMapping("/batch") @ApiOperation(value = "批量添加类型") public ResponseResult<Void> batchAdd(@RequestBody List<Type> types) { - types.forEach(type -> type.setDel_flag(0)); - boolean success = typeService.saveBatch(types); if (success) { return ResponseResult.success(); @@ -49,7 +46,6 @@ public ResponseResult<Void> delete(@PathVariable Integer typeId) { Type type = new Type(); type.setType_id(typeId); - type.setDel_flag(1); boolean success = typeService.updateById(type); if (success) { return ResponseResult.success(); @@ -81,7 +77,7 @@ @ApiOperation(value = "根据ID查询类型") public ResponseResult<Type> getById(@PathVariable Integer typeId) { Type type = typeService.getById(typeId); - if (type != null && type.getDel_flag() != 1) { + if (type != null ) { return ResponseResult.success(type); } return ResponseResult.error("类型不存在"); @@ -93,7 +89,6 @@ List<Type> types = typeIds.stream().map(id -> { Type type = new Type(); type.setType_id(id); - type.setDel_flag(1); return type; }).collect(java.util.stream.Collectors.toList()); boolean success = typeService.updateBatchById(types); @@ -109,7 +104,6 @@ @RequestParam(required = false) Integer page, @RequestParam(required = false) Integer pageSize) { LambdaQueryWrapper<Type> queryWrapper = new LambdaQueryWrapper<>(); - queryWrapper.eq(Type::getDel_flag, 0); if (page != null && pageSize != null) { Page<Type> pageInfo = new Page<>(page, pageSize); -- Gitblit v1.7.1