missMyLove 3 роки тому
батько
коміт
921eb3132f

+ 3 - 0
src/main/java/com/comtika/safe/dao/equip/terminal/EquipTerminalDao.java

@@ -59,4 +59,7 @@ public interface EquipTerminalDao extends BaseMapper<CtkEquipTerminal> {
 
 	// 查询设备列表
     PageQuery<Map<String, Object>> fadFindTerminalList(PageQuery<Map<String, Object>> pageQuery);
+
+    @Sql(value = "select count(1) from ctk_equip_socket s where s.equip_terminal_id = ?")
+	int findSocketCount(Long terminalId);
 }

+ 2 - 0
src/main/java/com/comtika/safe/service/equip/terminal/impl/EquipTerminalServiceImpl.java

@@ -161,6 +161,8 @@ public class EquipTerminalServiceImpl implements EquipTerminalService {
 				return RespWrapper.makeFailResp("参数有误,请检查!");
 			}
 			Map<String,Object> map = equipTerminalDao.queryEquipTerminalById(terminalId);
+			int count = equipTerminalDao.findSocketCount(terminalId);
+			map.put("loopCount",count);
 			return RespWrapper.makeSuccessResp(map);
 		} catch (Exception e) {
 			e.printStackTrace();