huliguo
2025-07-02 692d4b07bb1186b811c2d895e5ad782c08441913
src/main/java/com/linghu/controller/TypeController.java
@@ -5,6 +5,8 @@
import com.linghu.model.common.ResponseResult;
import com.linghu.model.entity.Type;
import com.linghu.service.TypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -12,12 +14,14 @@
@RestController
@RequestMapping("/type")
@Api(value = "类型相关接口", tags = "设置-类型")
public class TypeController {
    @Autowired
    private TypeService typeService;
    @PostMapping
    @ApiOperation(value = "添加类型")
    public ResponseResult<Type> add(@RequestBody Type type) {
        type.setDelFlag(0);
        boolean success = typeService.save(type);