package com.whyc.controller;
|
|
import com.whyc.dto.Response;
|
import com.whyc.pojo.DeviceType;
|
import com.whyc.service.DeviceTypeService;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.*;
|
|
import java.util.List;
|
|
/**
|
* 设备类型及通用参数
|
*/
|
@RestController
|
@RequestMapping("deviceType")
|
@Api(tags = "设备类型及通用参数")
|
public class DeviceTypeController {
|
|
@Autowired
|
private DeviceTypeService service;
|
|
@GetMapping("all")
|
@ApiOperation(value = "查询所有设备类型")
|
public Response<List<DeviceType>> getAll(){
|
return service.getAll();
|
}
|
|
@PutMapping
|
@ApiOperation(value = "修改设备类型参数")
|
public Response update(@RequestBody DeviceType deviceType){
|
return service.update(deviceType);
|
}
|
|
}
|