Pārlūkot izejas kodu

iot server 服务代码提交

jingyuanchao 1 gadu atpakaļ
vecāks
revīzija
50757359ce

+ 2 - 2
soc-modules/soc-modules-iot/src/main/java/com/xunmei/iot/service/impl/IotServerInfoServiceImpl.java

@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.xunmei.common.core.constant.SecurityConstants;
 import com.xunmei.common.core.domain.iot.domain.IotServerInfo;
+import com.xunmei.common.core.enums.iot.IotServerConnectStatus;
 import com.xunmei.common.core.exception.SystemException;
 import com.xunmei.common.core.web.page.TableDataInfo;
 import com.xunmei.common.security.utils.SecurityUtils;
@@ -61,7 +62,7 @@ public class IotServerInfoServiceImpl extends ServiceImpl<IotServerInfoMapper, I
         val serverInfo = new IotServerInfo();
         serverInfo.setIotCode(UUID.fastUUID().toString());//分配后不可变更
         serverInfo.setIotName(req.getIotName());
-        serverInfo.setIotStatus(0);
+        serverInfo.setIotStatus(IotServerConnectStatus.UNKNOWN.getIdx());
         serverInfo.setOrgPath(sysOrg.getPath());
         serverInfo.setOrgName(sysOrg.getShortName());
         serverInfo.setOrgId(sysOrg.getId());
@@ -104,7 +105,6 @@ public class IotServerInfoServiceImpl extends ServiceImpl<IotServerInfoMapper, I
             EasyExcel.write(response.getOutputStream(), IotServerInfoPageVo.class)
                     .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).sheet("Iot服务").doWrite(list);
         } catch (Exception e) {
-            e.printStackTrace();
             // 重置response
             response.reset();
             response.setContentType("application/json");