|
|
|
|
@ -3,6 +3,7 @@ package com.zhehekeji.web.service;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
import com.zhehekeji.web.entity.LightSource;
|
|
|
|
|
import com.zhehekeji.web.mapper.LightSourceMapper;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
@ -15,6 +16,7 @@ import java.nio.charset.StandardCharsets;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
@Slf4j
|
|
|
|
|
@Service
|
|
|
|
|
public class LightSourceService {
|
|
|
|
|
|
|
|
|
|
@ -53,6 +55,7 @@ public class LightSourceService {
|
|
|
|
|
String startCmd = "<1,"+stat+",post>";
|
|
|
|
|
byte[]bytes = startCmd.getBytes(StandardCharsets.UTF_8);
|
|
|
|
|
os.write(bytes);
|
|
|
|
|
log.info("发送:{},ip:{}",startCmd, ip);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (IOException e) {
|
|
|
|
|
|