32 lines
752 B
Java
32 lines
752 B
Java
|
|
package com.nis.web.service.configuration;
|
||
|
|
|
||
|
|
import org.springframework.stereotype.Service;
|
||
|
|
|
||
|
|
import com.nis.domain.configuration.DnsIpCfg;
|
||
|
|
import com.nis.web.dao.configuration.DnsIpCfgDao;
|
||
|
|
import com.nis.web.service.CrudService;
|
||
|
|
|
||
|
|
@Service
|
||
|
|
public class DnsIpCfgService extends CrudService<DnsIpCfgDao, DnsIpCfg>{
|
||
|
|
|
||
|
|
@Override
|
||
|
|
public void save(DnsIpCfg dnsIpCfg) {
|
||
|
|
if (dnsIpCfg.getCfgId() == null) {
|
||
|
|
dao.insert(dnsIpCfg);
|
||
|
|
} else {
|
||
|
|
dao.update(dnsIpCfg);
|
||
|
|
}
|
||
|
|
//TODO 下发流程
|
||
|
|
}
|
||
|
|
|
||
|
|
public void delete(String cfgIds) {
|
||
|
|
String[] cfgIdsArr = cfgIds.split(",");
|
||
|
|
for (String cfgId : cfgIdsArr) {
|
||
|
|
DnsIpCfg d = new DnsIpCfg();
|
||
|
|
d.setCfgId(Long.valueOf(cfgId));
|
||
|
|
dao.delete(d);
|
||
|
|
}
|
||
|
|
//TODO 下发流程
|
||
|
|
}
|
||
|
|
}
|