修复pppoe配置界面异常bug
This commit is contained in:
+9
-4
@@ -55,6 +55,9 @@ public class RmPppoeConfigMainServiceImpl implements IRmPppoeConfigMainService
|
|||||||
RmPppoeConfigSub rmPppoeConfigSub = new RmPppoeConfigSub();
|
RmPppoeConfigSub rmPppoeConfigSub = new RmPppoeConfigSub();
|
||||||
rmPppoeConfigSub.setClientId(rmPppoeConfigMain.getClientId());
|
rmPppoeConfigSub.setClientId(rmPppoeConfigMain.getClientId());
|
||||||
List<RmPppoeConfigSub> subList = rmPppoeConfigSubMapper.selectRmPppoeConfigSubList(rmPppoeConfigSub);
|
List<RmPppoeConfigSub> subList = rmPppoeConfigSubMapper.selectRmPppoeConfigSubList(rmPppoeConfigSub);
|
||||||
|
if(subList == null){
|
||||||
|
subList = new ArrayList<>();
|
||||||
|
}
|
||||||
if("1".equals(pppoeConfigMain.getPppoeConfigMode())){
|
if("1".equals(pppoeConfigMain.getPppoeConfigMode())){
|
||||||
for (RmPppoeConfigSub pppoeConfigSub : subList) {
|
for (RmPppoeConfigSub pppoeConfigSub : subList) {
|
||||||
// 查询流量信息
|
// 查询流量信息
|
||||||
@@ -129,7 +132,7 @@ public class RmPppoeConfigMainServiceImpl implements IRmPppoeConfigMainService
|
|||||||
*/
|
*/
|
||||||
public String convert(String bitStr, String toUnit) {
|
public String convert(String bitStr, String toUnit) {
|
||||||
if (bitStr == null || bitStr.trim().isEmpty()) {
|
if (bitStr == null || bitStr.trim().isEmpty()) {
|
||||||
throw new IllegalArgumentException("bit值不能为空");
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
double bits = Double.parseDouble(bitStr.trim());
|
double bits = Double.parseDouble(bitStr.trim());
|
||||||
@@ -185,9 +188,6 @@ public class RmPppoeConfigMainServiceImpl implements IRmPppoeConfigMainService
|
|||||||
.map(RmPppoeConfigSub::toVo)
|
.map(RmPppoeConfigSub::toVo)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
}else if("2".equals(rmPppoeConfigMain.getPppoeConfigMode())) {
|
|
||||||
processBandwidthResult(subList);
|
|
||||||
}
|
|
||||||
// 构建pppoe策略
|
// 构建pppoe策略
|
||||||
PppoeVo pppoeVo = new PppoeVo();
|
PppoeVo pppoeVo = new PppoeVo();
|
||||||
BeanUtils.copyProperties(rmPppoeConfigMain, pppoeVo);
|
BeanUtils.copyProperties(rmPppoeConfigMain, pppoeVo);
|
||||||
@@ -208,12 +208,16 @@ public class RmPppoeConfigMainServiceImpl implements IRmPppoeConfigMainService
|
|||||||
"",
|
"",
|
||||||
JSONObject.toJSONString(message)
|
JSONObject.toJSONString(message)
|
||||||
);
|
);
|
||||||
|
}else if("2".equals(rmPppoeConfigMain.getPppoeConfigMode())) {
|
||||||
|
processBandwidthResult(subList);
|
||||||
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void processBandwidthResult(List<RmPppoeConfigSub> subList){
|
public void processBandwidthResult(List<RmPppoeConfigSub> subList){
|
||||||
if(subList != null && !subList.isEmpty()){
|
if(subList != null && !subList.isEmpty()){
|
||||||
for (RmPppoeConfigSub rmPppoeConfigSub : subList) {
|
for (RmPppoeConfigSub rmPppoeConfigSub : subList) {
|
||||||
|
if(rmPppoeConfigSub.getClientId() != null){
|
||||||
RmNetworkInterfaceChild insertData = new RmNetworkInterfaceChild();
|
RmNetworkInterfaceChild insertData = new RmNetworkInterfaceChild();
|
||||||
insertData.setBandwidthResult(rmPppoeConfigSub.getBandwidthResult());
|
insertData.setBandwidthResult(rmPppoeConfigSub.getBandwidthResult());
|
||||||
insertData.setMacAddress(rmPppoeConfigSub.getMacAddress());
|
insertData.setMacAddress(rmPppoeConfigSub.getMacAddress());
|
||||||
@@ -224,6 +228,7 @@ public class RmPppoeConfigMainServiceImpl implements IRmPppoeConfigMainService
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改PPPoE配置主表
|
* 修改PPPoE配置主表
|
||||||
|
|||||||
Reference in New Issue
Block a user