(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

@@ -36,7 +36,7 @@ public class ComplexStringCfgService extends CrudService<ComplexStringCfgDao,Com
* @since 1.0.0
*/
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
public int addStringCfg(ComplexkeywordCfg cfg,List<AreaIpCfg> areaIpCfgs){
public int addStringCfg(ComplexkeywordCfg cfg,List<BaseIpCfg> areaIpCfgs){
if(areaIpCfgs!=null&&areaIpCfgs.size()>0){
this.saveIpBatch(areaIpCfgs);
}
@@ -53,7 +53,7 @@ public class ComplexStringCfgService extends CrudService<ComplexStringCfgDao,Com
* @since 1.0.0
*/
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
public int updateStringCfg(ComplexkeywordCfg cfg,List<AreaIpCfg> addAreaCfg,List<AreaIpCfg> updateAreaCfg,List<AreaIpCfg> deleteAreaCfgs){
public int updateStringCfg(ComplexkeywordCfg cfg,List<BaseIpCfg> addAreaCfg,List<BaseIpCfg> updateAreaCfg,List<BaseIpCfg> deleteAreaCfgs){
if(addAreaCfg!=null&&addAreaCfg.size()>0){
this.saveIpBatch(addAreaCfg);
}
@@ -63,7 +63,7 @@ public class ComplexStringCfgService extends CrudService<ComplexStringCfgDao,Com
if(deleteAreaCfgs!=null&&deleteAreaCfgs.size()>0){
this.deleteIpBatch(deleteAreaCfgs);
}
return complexStringCfgDao.updateByPrimaryKeySelective(cfg);
return complexStringCfgDao.update(cfg);
}
/**
*
@@ -77,11 +77,11 @@ public class ComplexStringCfgService extends CrudService<ComplexStringCfgDao,Com
* @since 1.0.0
*/
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
public void auditStringCfg(int isAduit,List<ComplexkeywordCfg> auditCfg,List<AreaIpCfg> areaCfg,List<ComplexkeywordCfg> sendCfg) throws Exception{
List<BaseCfg[]> sendCfgs=new ArrayList<BaseCfg[]>();
public void auditStringCfg(int isAduit,List<ComplexkeywordCfg> auditCfg,List<BaseIpCfg> areaCfg,List<ComplexkeywordCfg> sendCfg) throws Exception{
List<List<BaseCfg>> sendCfgs=new ArrayList<List<BaseCfg>>();
for(ComplexkeywordCfg 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||
@@ -110,7 +110,7 @@ public class ComplexStringCfgService extends CrudService<ComplexStringCfgDao,Com
* @since 1.0.0
*/
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
public void deleteStringCfg(List<ComplexkeywordCfg> cfgs,List<AreaIpCfg> areaCfg){
public void deleteStringCfg(List<ComplexkeywordCfg> cfgs,List<BaseIpCfg> areaCfg){
if(areaCfg!=null&&areaCfg.size()>0){
this.deleteIpBatch(areaCfg);
}