From 6881da4400dba323d6e11a810de0571a7453cfd7 Mon Sep 17 00:00:00 2001
From: liuhaonan <konodioda2333@vip.qq.com>
Date: 星期五, 25 二月 2022 15:03:18 +0800
Subject: [PATCH] 功能完善
---
ximon-admin/src/main/java/com/sandu/ximon/admin/service/VnnoxService.java | 22 ++++++++++++++++++----
1 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/ximon-admin/src/main/java/com/sandu/ximon/admin/service/VnnoxService.java b/ximon-admin/src/main/java/com/sandu/ximon/admin/service/VnnoxService.java
index bec5dee..f64b1b9 100644
--- a/ximon-admin/src/main/java/com/sandu/ximon/admin/service/VnnoxService.java
+++ b/ximon-admin/src/main/java/com/sandu/ximon/admin/service/VnnoxService.java
@@ -1,5 +1,6 @@
package com.sandu.ximon.admin.service;
+import com.sandu.common.execption.BusinessException;
import com.sandu.ximon.admin.config.VnnoxConstant;
import com.sandu.ximon.admin.utils.RedisUtils;
import com.sandu.ximon.admin.utils.VnnoxAPIUtil;
@@ -13,6 +14,7 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
+import java.net.URISyntaxException;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
@@ -42,7 +44,7 @@
* @return
*/
@Transactional(rollbackFor = Exception.class)
- public LedV2RegisterResultEntity validateSN(String sn) {
+ public LedV2RegisterResultEntity validateSN(String name,String sn) throws URISyntaxException {
LedV2RegisterResultEntity ledV2RegisterResultEntity = new LedV2RegisterResultEntity();
// 鍒ゆ柇鏁版嵁搴撴槸鍚﹀瓨鍦紝鑻ヤ笉瀛樺湪锛屽垽鏂槸鍚﹀凡缁忔敞鍐屽埌Vnnox鏈嶅姟鍣�
@@ -56,16 +58,16 @@
}
Integer page = 0;
- Integer limit = 200;
+ Integer limit = 100;
List<VnnoxPlayerResponse> playerList;
// 鑾峰彇Vnnox鏈嶅姟鍣ㄥ垪琛�
- VnnoxPlayerListResponse response = vnnoxAPIUtil.getPlayerList(limit, page);
+ VnnoxPlayerListResponse response = vnnoxAPIUtil.getPlayerList(limit, page,name);
playerList = response.getRows();
Integer total = response.getTotal() - limit;
while (total > 0) {
page = page + 1;
total = total - limit;
- response = vnnoxAPIUtil.getPlayerList(limit, page);
+ response = vnnoxAPIUtil.getPlayerList(limit, page,name);
playerList.addAll(response.getRows());
}
ledPlayerEntity = new LedPlayerEntity();
@@ -189,4 +191,16 @@
);
}
+ public boolean updateDataName(Long id, String name){
+ LedPlayerEntity byId = ledPlayerEntityService.getById(id);
+ if(byId==null){
+ throw new BusinessException("鏈壘鍒拌璁惧");
+ }
+ LedPlayerEntity led=new LedPlayerEntity();
+ led.setId(id);
+ led.setName(name);
+ return ledPlayerEntityService.updateById(led);
+ }
+
+
}
--
Gitblit v1.9.3