Browse Source

add:遥控鉴权接口

zhongwei
haungxing 6 months ago
parent
commit
31a420395e
  1. 3
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/AuthenticationService.java
  2. 2
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/DataVO.java

3
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/AuthenticationService.java

@ -102,6 +102,9 @@ public class AuthenticationService {
// 如限制机器发送遥控指令
if(ctrlAuth.getIsLimitMachine().intValue() == 1) {
SessionContentVO sessionContent = (SessionContentVO) redisTemplate.opsForHash().get(RedisKeyConstants.SESSION_CONTENT_KEY, sessionId);
Assert.isTrue(Func.isNotEmpty(sessionContent),() -> {
throw new ServiceException("获取问题机器码失败,校验不通过!");
});
String machineCode = sessionContent.getMachineCode();
Assert.isTrue(StringUtil.isNotBlank(machineCode) && Func.isNotEmpty(machineCode) ,() -> {
throw new ServiceException("获取问题机器码失败,校验不通过!");

2
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/DataVO.java

@ -28,4 +28,6 @@ public class DataVO implements Serializable {
/**实时数据结果集**/
private Map<String,Object> real;
private DataItemVO item;
}

Loading…
Cancel
Save