|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package com.ruoyi.tc.service.impl;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
|
|
import com.alibaba.fastjson2.JSONArray;
|
|
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
@ -91,9 +92,22 @@ public class AssetCurrentServiceImpl extends ServiceImpl<AssetCurrentMapper, Ass
|
|
|
|
|
for (Object o : JSONArray.parseArray(byId.getGlIp())) {
|
|
|
|
|
Acomma acomma = new Acomma();
|
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(o.toString());
|
|
|
|
|
acomma.setKey(jsonObject.get("key").toString());
|
|
|
|
|
acomma.setIpType(jsonObject.get("ipType").toString());
|
|
|
|
|
acomma.setPort(jsonObject.get("port").toString());
|
|
|
|
|
if (BeanUtil.isNotEmpty(jsonObject.get("key"))) {
|
|
|
|
|
acomma.setKey(jsonObject.get("key").toString());
|
|
|
|
|
} else {
|
|
|
|
|
acomma.setKey("");
|
|
|
|
|
}
|
|
|
|
|
if (BeanUtil.isNotEmpty(jsonObject.get("ipType"))) {
|
|
|
|
|
acomma.setIpType(jsonObject.get("ipType").toString());
|
|
|
|
|
} else {
|
|
|
|
|
acomma.setIpType("");
|
|
|
|
|
}
|
|
|
|
|
Object portValue = jsonObject.get("port");
|
|
|
|
|
if (portValue != null && !portValue.toString().isEmpty()) {
|
|
|
|
|
acomma.setPort(portValue.toString());
|
|
|
|
|
}else{
|
|
|
|
|
acomma.setPort("");
|
|
|
|
|
}
|
|
|
|
|
a2.add(acomma);
|
|
|
|
|
}
|
|
|
|
|
byId.setGlIpList(a2);
|
|
|
|
|