(1)白名单审核调整在controller层遍历

(2)jquert validate插件调整
(3)IP白名单show more调整调用样式
This commit is contained in:
wangxin
2018-05-28 10:18:03 +08:00
parent ffe3c1ffc3
commit 86cf73fee4
7 changed files with 153 additions and 16 deletions

View File

@@ -90,10 +90,42 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
}
return ipCfgDao.update(baseIpCfg);
}
public void auditWhiteIp(String ids,IpPortCfg cfg) throws Exception{
for(String id:ids.split(",")){
Long.parseLong(id);
public void auditWhiteIp(BaseIpCfg cfg) throws Exception{
List<BaseIpCfg> beans=new ArrayList<>();
beans.add(cfg);
this.auditBatch(beans, IpCfgDao.class);
if(cfg.getIsAudit()==1){
//待调整
//调用服务接口下发配置数据
String json=gsonToJson(beans);
logger.info("IP白名单下发配置参数"+json);
//调用服务接口下发配置
try {
ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
logger.info("IP白名单配置下发响应信息"+result.getMsg());
} catch (Exception e) {
e.printStackTrace();
logger.info("IP白名单配置下发失败");
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
}
}else if(cfg.getIsAudit()==3){
//调用服务接口取消配置
String json=gsonToJson(beans);
logger.info("IP白名单配置参数"+json);
//调用服务接口取消配置
try {
ToMaatResult result = ConfigServiceUtil.put(json, 2);
logger.info("IP白名单取消配置响应信息"+result.getMsg());
} catch (Exception e) {
e.printStackTrace();
logger.info("IP白名单取消配置失败");
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
}
}
}
public void auditWhiteIp(String ids,IpPortCfg cfg) throws Exception{
List<BaseIpCfg> beans=this.getListByCfgId(IpPortCfg.getTablename(),ids);
Date date=new Date();
for(BaseIpCfg bean:beans){
@@ -105,6 +137,8 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
}
this.auditBatch(beans, IpCfgDao.class);
if(cfg.getIsAudit()==1){
//待调整
//调用服务接口下发配置数据
String json=gsonToJson(beans);
logger.info("IP白名单下发配置参数"+json);