Ver código fonte

优化data-transfer服务中门禁控制代码逻辑,增加下发命令请求超时后的下发命令记录状态变更

james 4 meses atrás
pai
commit
f37f540213

+ 2 - 0
data-transfer/data-transfer-biz/src/main/java/com/usky/transfer/service/impl/QueryInfluxdbDataServiceImpl.java

@@ -106,6 +106,8 @@ public class QueryInfluxdbDataServiceImpl extends AbstractCrudService<QueryInflu
             if((endTimeStamp - startTimeStamp) >= 3){ //请求超时3秒,返回失败
                 rec_map.put("code",-1);
                 rec_map.put("message","下发命令失败");
+
+                dmpDeviceCommandService.lambdaUpdate().set(DmpDeviceCommand::getCommandStatus,2).eq(DmpDeviceCommand::getId,commandId).update();
                 break;
             }
         }