huliguo
3 天以前 e7c5c8c6768e018b17a766d7481f13300b7cd5a8
src/main/java/com/linghu/controller/TypeController.java
@@ -44,23 +44,17 @@
    @DeleteMapping("/{typeId}")
    @ApiOperation(value = "删除类型")
    public ResponseResult<Void> delete(@PathVariable Integer typeId) {
        Type type = new Type();
        type.setType_id(typeId);
        boolean success = typeService.updateById(type);
        if (success) {
            return ResponseResult.success();
        }
        return ResponseResult.error("删除类型失败");
        typeService.removeById(typeId);
        return ResponseResult.success();
    }
    @PutMapping
    @ApiOperation(value = "更新类型")
    public ResponseResult<Void> update(@RequestBody Type type) {
        boolean success = typeService.updateById(type);
        if (success) {
            return ResponseResult.success();
        }
        return ResponseResult.error("更新类型失败");
        typeService.updateById(type);
        return ResponseResult.success();
    }
    @PutMapping("/batch")