|
@@ -14,6 +14,7 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.activemq.artemis.api.core.management.ActiveMQServerControl;
|
|
import org.apache.activemq.artemis.api.core.management.ActiveMQServerControl;
|
|
|
import org.apache.activemq.artemis.api.core.management.ObjectNameBuilder;
|
|
import org.apache.activemq.artemis.api.core.management.ObjectNameBuilder;
|
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.data.domain.Page;
|
|
import org.springframework.data.domain.Page;
|
|
|
import org.springframework.data.domain.Pageable;
|
|
import org.springframework.data.domain.Pageable;
|
|
@@ -94,7 +95,9 @@ public class GateWayInfoService {
|
|
|
addGateWayInfo(addParam);
|
|
addGateWayInfo(addParam);
|
|
|
// 网关信息
|
|
// 网关信息
|
|
|
GateWayInfo gateWayInfo = gateWayInfoDao.findTopByGateWayId(param.getGateWayId());
|
|
GateWayInfo gateWayInfo = gateWayInfoDao.findTopByGateWayId(param.getGateWayId());
|
|
|
-
|
|
|
|
|
|
|
+ if (StringUtils.isEmpty(param.getUserName())) {
|
|
|
|
|
+ param.setUserName("admin");
|
|
|
|
|
+ }
|
|
|
// 验证连接账号
|
|
// 验证连接账号
|
|
|
GateWayUserInfo gateWayUserInfo = gateWayUserInfoDao.findTopByUserName(param.getUserName());
|
|
GateWayUserInfo gateWayUserInfo = gateWayUserInfoDao.findTopByUserName(param.getUserName());
|
|
|
if (ObjectUtils.isEmpty(gateWayUserInfo)) {
|
|
if (ObjectUtils.isEmpty(gateWayUserInfo)) {
|
|
@@ -106,7 +109,7 @@ public class GateWayInfoService {
|
|
|
// 如果有绑定关系
|
|
// 如果有绑定关系
|
|
|
GateWayInfo oldGateWayInfo = gateWay2User.getGateWayInfo();
|
|
GateWayInfo oldGateWayInfo = gateWay2User.getGateWayInfo();
|
|
|
if (!oldGateWayInfo.getGateWayId().equals(gateWayInfo.getGateWayId())) {
|
|
if (!oldGateWayInfo.getGateWayId().equals(gateWayInfo.getGateWayId())) {
|
|
|
- return ResultContent.buildFail(String.format("连接账号%s已使用", gateWayUserInfo.getUserName()));
|
|
|
|
|
|
|
+// return ResultContent.buildFail(String.format("连接账号%s已使用", gateWayUserInfo.getUserName()));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|