(1)为了使用批量更新,修改了updateByPrimaryKeySelective方法的方法名为update

(2)多域类配置加入地域IP
(3)多域类配置可任选
(4)多域类配置加入批量删除,审核
This commit is contained in:
wangxin
2018-04-13 13:50:29 +08:00
parent 0dd7f79af0
commit 9a130d864d
28 changed files with 1218 additions and 1437 deletions

View File

@@ -37,7 +37,7 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
* @since 1.0.0
*/
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
public int addIpCfg(BaseIpCfg baseIpCfg,List<AreaIpCfg> areaIpCfgs){
public int addIpCfg(BaseIpCfg baseIpCfg,List<BaseIpCfg> areaIpCfgs){
if(areaIpCfgs!=null&&areaIpCfgs.size()>0){
this.saveIpBatch(areaIpCfgs);
}
@@ -54,7 +54,7 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
* @since 1.0.0
*/
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
public int updateIpCfg(BaseIpCfg baseIpCfg,List<AreaIpCfg> addAreaCfg,List<AreaIpCfg> updateAreaCfg,List<AreaIpCfg> deleteAreaCfgs){
public int updateIpCfg(BaseIpCfg baseIpCfg,List<BaseIpCfg> addAreaCfg,List<BaseIpCfg> updateAreaCfg,List<BaseIpCfg> deleteAreaCfgs){
if(addAreaCfg!=null&&addAreaCfg.size()>0){
this.saveIpBatch(addAreaCfg);
}
@@ -64,7 +64,7 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
if(deleteAreaCfgs!=null&&deleteAreaCfgs.size()>0){
this.deleteIpBatch(deleteAreaCfgs);
}
return ipCfgDao.updateByPrimaryKeySelective(baseIpCfg);
return ipCfgDao.update(baseIpCfg);
}
/**
*
@@ -78,11 +78,11 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
* @since 1.0.0
*/
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
public void auditIpCfg(int isAduit,List<BaseIpCfg> auditCfg,List<AreaIpCfg> areaCfg,List<BaseIpCfg> sendCfg) throws Exception{
List<BaseCfg[]> sendCfgs=new ArrayList<BaseCfg[]>();
public void auditIpCfg(int isAduit,List<BaseIpCfg> auditCfg,List<BaseIpCfg> areaCfg,List<BaseIpCfg> sendCfg) throws Exception{
List<List<BaseCfg>> sendCfgs=new ArrayList<List<BaseCfg>>();
for(BaseIpCfg c:sendCfg){
BaseCfg[] cArr=new BaseCfg[1];
cArr[0]=c;
List<BaseCfg> cArr=new ArrayList<>();
cArr.add(c);
sendCfgs.add(cArr);
}
if(Constants.AUDIT_NOT_YES==isAduit||