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

  1. package com.iflytop.gd.app.cmd;
  2. import com.iflytop.gd.app.core.BaseCommandHandler;
  3. import com.iflytop.gd.app.model.dto.CmdDTO;
  4. import com.iflytop.gd.app.service.DeviceCommandUtilService;
  5. import com.iflytop.gd.common.annotation.CommandMapping;
  6. import lombok.RequiredArgsConstructor;
  7. import lombok.extern.slf4j.Slf4j;
  8. import org.springframework.stereotype.Component;
  9. import java.util.concurrent.CompletableFuture;
  10. /**
  11. * 开始摇匀
  12. */
  13. @Slf4j
  14. @Component
  15. @RequiredArgsConstructor
  16. @CommandMapping("shake_start")//业务指令注解
  17. public class ShakeStartCommand extends BaseCommandHandler {
  18. private final DeviceCommandUtilService deviceCommandUtilService;
  19. @Override
  20. public CompletableFuture<Void> handle(CmdDTO cmdDTO) {
  21. return runAsync(() -> {
  22. deviceCommandUtilService.shakeStart(cmdDTO.getCommandId(), cmdDTO.getCommand());//开始摇匀
  23. });
  24. }
  25. }