| | |
| | | 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.*; |
| | | |
| | |
| | | |
| | | @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); |