You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.2 KiB
33 lines
1.2 KiB
package com.iflytop.sgs.app.controller;
|
|
|
|
import com.iflytop.sgs.app.model.vo.SetTargetTemperatureVO;
|
|
import com.iflytop.sgs.app.service.HeatModuleService;
|
|
import com.iflytop.sgs.common.result.Result;
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
import jakarta.validation.Valid;
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
/**
|
|
* 加热模块控制 todo wmy 需要和前端同步参数 加热 烘干 退火
|
|
*/
|
|
@Tag(name = "加热模块控制")
|
|
@RestController
|
|
@RequestMapping("/api/heat")
|
|
@RequiredArgsConstructor
|
|
@Slf4j
|
|
public class HeatModuleController {
|
|
private final HeatModuleService heatModuleService;
|
|
|
|
@Operation(summary = "加热模块设定目标温度")
|
|
@PostMapping("/target-temperature")
|
|
public Result<String> setTargetTemperature(@Valid @RequestBody SetTargetTemperatureVO setTargetTemperatureVO) {
|
|
heatModuleService.setTargetTemperature(setTargetTemperatureVO);
|
|
return Result.success();
|
|
}
|
|
}
|