(1)白名单审核调整在controller层遍历
(2)jquert validate插件调整 (3)IP白名单show more调整调用样式
This commit is contained in:
@@ -89,6 +89,38 @@ public class StringCfgService extends CrudService<StringCfgDao,BaseStringCfg> {
|
||||
}
|
||||
return stringCfgDao.update(baseStringCfg);
|
||||
}
|
||||
public void auditWhiteDomain(BaseStringCfg cfg) throws Exception{
|
||||
List<BaseStringCfg> beans=new ArrayList<>();
|
||||
beans.add(cfg);
|
||||
this.auditBatch(beans, StringCfgDao.class);
|
||||
if(cfg.getIsAudit()==1){
|
||||
//调用服务接口下发配置数据
|
||||
String json=gsonToJson(beans);
|
||||
logger.info("文件样例下发配置参数:"+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 auditWhiteDomain(String ids,HttpUrlCfg cfg) throws Exception{
|
||||
for(String id:ids.split(",")){
|
||||
Long.parseLong(id);
|
||||
@@ -241,4 +273,18 @@ public class StringCfgService extends CrudService<StringCfgDao,BaseStringCfg> {
|
||||
// TODO Auto-generated method stub
|
||||
return stringCfgDao.getListByCompileId(tableName,ids);
|
||||
}
|
||||
/**
|
||||
* getListByCfgId(这里用一句话描述这个方法的作用)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @param tablename
|
||||
* @param ids
|
||||
* @return
|
||||
*List<BaseStringCfg>
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public List<BaseStringCfg> getListByCfgId(String tableName, String ids) {
|
||||
// TODO Auto-generated method stub
|
||||
return stringCfgDao.getListByCfgId(tableName, ids);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user