| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 设备类型 |
| | | * 设备类型及通用参数 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("deviceType") |
| | | @Api(tags = "设备类型") |
| | | @Api(tags = "设备类型及通用参数") |
| | | public class DeviceTypeController { |
| | | |
| | | @Autowired |
| | |
| | | return service.getAll(); |
| | | } |
| | | |
| | | @GetMapping |
| | | @ApiOperation(value = "查询设备类型的通用参数") |
| | | public Response<DeviceType> get(@RequestParam Integer deviceTypeId){ |
| | | return service.get(deviceTypeId); |
| | | } |
| | | |
| | | @PutMapping |
| | | @ApiOperation(value = "修改设备类型参数") |
| | | public Response update(@RequestBody DeviceType deviceType){ |
| | | return service.update(deviceType); |
| | | } |
| | | |
| | | } |