连通检测

master
chengqf 2 years ago
parent b028c2ec6c
commit e40037b632

@ -6,6 +6,7 @@ import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
@ -53,14 +54,16 @@ public class ConnectServiceImpl implements ConnectService {
}
String msg = "UDI管理系统";
for(int i=1;i<level;i++) {
for(int i=1;i<level+1;i++) {
msg+="→中继服务"+NUM_STRS.substring(i,i+1)+"正常";
}
if(config!=null&&config.get("paramValue")!=null) {
logger.info("next host:"+config.get("paramValue"));
String result = IDCUtils.post(config.get("paramValue") + "/spssync/common/connect", map);
if (IDCUtils.isJson(result)) {
logger.info("result:"+result);
if (!StringUtils.isEmpty(result)&&IDCUtils.isJson(result)) {
BaseResponse object = JSON.parseObject(result, BaseResponse.class);
if(object.getCode()!=2000) {
if(object.getCode()!=20000) {
map.replace("level", level +1);
msg+="→中继服务"+NUM_STRS.substring(level+1,level+2)+"正常";
map.put("msg", msg);

Loading…
Cancel
Save