调整异常内解析json的方法,捕捉异常,并设置字段的默认值
This commit is contained in:
@@ -84,31 +84,6 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
||||
}
|
||||
|
||||
}
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void addIpCfg(BaseIpCfg baseIpCfg,List<BaseIpCfg> areaIpCfgs){
|
||||
// if(areaIpCfgs!=null&&areaIpCfgs.size()>0){
|
||||
// this.saveIpBatch(areaIpCfgs);
|
||||
// }
|
||||
// //调用服务接口获取compileId
|
||||
// Integer compileId = 0;
|
||||
// try {
|
||||
// List<Integer> compileIds = ConfigServiceUtil.getId(1,1);
|
||||
// if(!StringUtil.isEmpty(compileIds)){
|
||||
// compileId = compileIds.get(0);
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// logger.info("获取编译ID出错");
|
||||
// throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
|
||||
// }
|
||||
// if(compileId!=0){
|
||||
// baseIpCfg.setCompileId(compileId);
|
||||
// return ipCfgDao.insert(baseIpCfg);
|
||||
// }else{
|
||||
// throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
||||
// }
|
||||
|
||||
}
|
||||
/**
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user