欺骗ip配置新增,发送给配置转换层时补上classify、attribute等信息

This commit is contained in:
chenjinsong
2018-04-02 11:10:57 +08:00
parent b7ceae5594
commit de83169636
2 changed files with 10 additions and 3 deletions

View File

@@ -20,7 +20,7 @@ public class ToMaatDnsIpBean implements Serializable {
@Expose @Expose
private String lable; private String lable;
@Expose @Expose
private Integer requestId; private Long requestId;
public List<MaatDnsIpCfg> getServiceCfg() { public List<MaatDnsIpCfg> getServiceCfg() {
return serviceCfg; return serviceCfg;
@@ -52,10 +52,10 @@ public class ToMaatDnsIpBean implements Serializable {
public void setLable(String lable) { public void setLable(String lable) {
this.lable = lable; this.lable = lable;
} }
public Integer getRequestId() { public Long getRequestId() {
return requestId; return requestId;
} }
public void setRequestId(Integer requestId) { public void setRequestId(Long requestId) {
this.requestId = requestId; this.requestId = requestId;
} }

View File

@@ -40,7 +40,14 @@ public class DnsIpCfgService extends CrudService<DnsIpCfgDao, DnsIpCfg>{
ipCfg.setIpCfg(d1); ipCfg.setIpCfg(d1);
ipCfgList.add(ipCfg); ipCfgList.add(ipCfg);
toMaatBean.setServiceCfg(ipCfgList); toMaatBean.setServiceCfg(ipCfgList);
toMaatBean.setAttribute(dnsIpCfg.getAttribute());
toMaatBean.setClassify(dnsIpCfg.getClassify());
toMaatBean.setLable(dnsIpCfg.getLable());
toMaatBean.setIsValid(1);
toMaatBean.setRequestId(dnsIpCfg.getRequest().getId());
String sendJson = gson.toJson(toMaatBean); String sendJson = gson.toJson(toMaatBean);
logger.info("准备下发配置:" + sendJson); logger.info("准备下发配置:" + sendJson);
//下发配置、接收结果 //下发配置、接收结果
String recvJson = ""; String recvJson = "";