石墨消解仪后端服务
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.

30 lines
896 B

package com.iflytop.gd.app.cmd;
import com.iflytop.gd.app.core.BaseCommandHandler;
import com.iflytop.gd.app.model.dto.CmdDTO;
import com.iflytop.gd.app.service.DeviceCommandUtilService;
import com.iflytop.gd.common.annotation.CommandMapping;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import java.util.concurrent.CompletableFuture;
/**
* 开始摇匀
*/
@Slf4j
@Component
@RequiredArgsConstructor
@CommandMapping("shake_start")//业务指令注解
public class ShakeStartCommand extends BaseCommandHandler {
private final DeviceCommandUtilService deviceCommandUtilService;
@Override
public CompletableFuture<Void> handle(CmdDTO cmdDTO) {
return runAsync(() -> {
deviceCommandUtilService.shakeStart(cmdDTO.getCommandId(), cmdDTO.getCommand());//开始摇匀
});
}
}