(1)增强字符串多选修改
(2)增强字符串权限增加
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.nis.web.service.configuration;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -7,9 +8,12 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.nis.domain.configuration.AreaIpCfg;
|
||||
import com.nis.domain.configuration.BaseCfg;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.web.dao.configuration.ComplexStringCfgDao;
|
||||
import com.nis.web.dao.configuration.IpCfgDao;
|
||||
import com.nis.web.service.CrudService;
|
||||
|
||||
/**
|
||||
@@ -73,16 +77,27 @@ public class ComplexStringCfgService extends CrudService<ComplexStringCfgDao,Com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public int auditStringCfg(ComplexkeywordCfg sendCfg,ComplexkeywordCfg cfg) throws Exception{
|
||||
if(Constants.AUDIT_NOT_YES==cfg.getIsAudit().intValue()||
|
||||
Constants.AUDIT_YES==cfg.getIsAudit().intValue()){//审核通过,取消审核通过需要发到maat
|
||||
if(sendToMaatConvertor(cfg.getIsAudit(),null,sendCfg)){
|
||||
return complexStringCfgDao.audit(cfg);
|
||||
public void auditStringCfg(int isAduit,List<ComplexkeywordCfg> auditCfg,List<AreaIpCfg> areaCfg,List<ComplexkeywordCfg> sendCfg) throws Exception{
|
||||
List<BaseCfg[]> sendCfgs=new ArrayList<BaseCfg[]>();
|
||||
for(ComplexkeywordCfg c:sendCfg){
|
||||
BaseCfg[] cArr=new BaseCfg[1];
|
||||
cArr[0]=c;
|
||||
sendCfgs.add(cArr);
|
||||
}
|
||||
if(Constants.AUDIT_NOT_YES==isAduit||
|
||||
Constants.AUDIT_YES==isAduit){//审核通过,取消审核通过需要发到maat
|
||||
if(sendToMaatConvertorBatch(isAduit,sendCfgs)){
|
||||
if(areaCfg!=null&&areaCfg.size()>0){
|
||||
this.auditIpBatch(areaCfg);
|
||||
}
|
||||
this.auditBatch(auditCfg, IpCfgDao.class);
|
||||
}
|
||||
}else{
|
||||
return complexStringCfgDao.audit(cfg);
|
||||
if(areaCfg!=null&&areaCfg.size()>0){
|
||||
this.auditIpBatch(areaCfg);
|
||||
}
|
||||
this.auditBatch(auditCfg, ComplexStringCfgDao.class);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
/**
|
||||
*
|
||||
@@ -95,11 +110,11 @@ public class ComplexStringCfgService extends CrudService<ComplexStringCfgDao,Com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public int deleteStringCfg(ComplexkeywordCfg cfg,List<AreaIpCfg> areaCfg){
|
||||
public void deleteStringCfg(List<ComplexkeywordCfg> cfgs,List<AreaIpCfg> areaCfg){
|
||||
if(areaCfg!=null&&areaCfg.size()>0){
|
||||
this.deleteIpBatch(areaCfg);
|
||||
}
|
||||
return complexStringCfgDao.updateValid(cfg);
|
||||
this.deleteBatch(cfgs, ComplexStringCfgDao.class);
|
||||
}
|
||||
/**
|
||||
*
|
||||
@@ -127,4 +142,18 @@ public class ComplexStringCfgService extends CrudService<ComplexStringCfgDao,Com
|
||||
public Integer getIsAudit(String tableName, long id){
|
||||
return complexStringCfgDao.getIsAudit(tableName,id);
|
||||
}
|
||||
/**
|
||||
* getList(这里用一句话描述这个方法的作用)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @param tableName
|
||||
* @param ids
|
||||
* @return
|
||||
*List<BaseIpCfg>
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public List<ComplexkeywordCfg> getList(String tableName, String ids) {
|
||||
// TODO Auto-generated method stub
|
||||
return complexStringCfgDao.getList(tableName, ids);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user