(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

@@ -138,7 +138,7 @@ public abstract class CrudService<D extends CrudDao<T>, T extends BaseEntity<T>>
* @exception
* @since 1.0.0
*/
public void saveIpBatch(List<AreaIpCfg> areaIpCfgs) {
public void saveIpBatch(List<BaseIpCfg> areaIpCfgs) {
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
SqlSession batchSqlSession = null;
try{
@@ -189,7 +189,7 @@ public abstract class CrudService<D extends CrudDao<T>, T extends BaseEntity<T>>
* @exception
* @since 1.0.0
*/
public void updateIpBatch(List<AreaIpCfg> areaCfg) {
public void updateIpBatch(List<BaseIpCfg> areaCfg) {
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
SqlSession batchSqlSession = null;
try{
@@ -267,7 +267,7 @@ public abstract class CrudService<D extends CrudDao<T>, T extends BaseEntity<T>>
* @exception
* @since 1.0.0
*/
public void auditIpBatch(List<AreaIpCfg> data) {
public void auditIpBatch(List<BaseIpCfg> data) {
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
SqlSession batchSqlSession = null;
try{
@@ -292,7 +292,7 @@ public abstract class CrudService<D extends CrudDao<T>, T extends BaseEntity<T>>
* @exception
* @since 1.0.0
*/
public void deleteIpBatch(List<AreaIpCfg> data) {
public void deleteIpBatch(List<BaseIpCfg> data) {
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
SqlSession batchSqlSession = null;
try{
@@ -320,7 +320,7 @@ public abstract class CrudService<D extends CrudDao<T>, T extends BaseEntity<T>>
* @exception
* @since 1.0.0
*/
public boolean sendToMaatConvertorBatch(int operation,List<BaseCfg[]> cfgs) throws Exception{
public boolean sendToMaatConvertorBatch(int operation,List<List<BaseCfg>> cfgs) throws Exception{
if(cfgs==null){
throw new RuntimeException("转换出错,配置为空");
}
@@ -330,7 +330,7 @@ public abstract class CrudService<D extends CrudDao<T>, T extends BaseEntity<T>>
.create();
if(Constants.AUDIT_NOT_YES==operation){
List<ToMaatUnAuditBean> beans=new ArrayList<ToMaatUnAuditBean>();
for(BaseCfg[] cfg:cfgs){
for(List<BaseCfg> cfg:cfgs){
ToMaatUnAuditBean toMaatUnAuditBean=new ToMaatUnAuditBean();
toMaatUnAuditBean.setServiceCfg(new ArrayList<UnAuditBean>());
for(BaseCfg c:cfg){
@@ -364,7 +364,7 @@ public abstract class CrudService<D extends CrudDao<T>, T extends BaseEntity<T>>
return new ConvertTool().setConfigInValid(json);
}else{
List<ToMaatBean> beans=new ArrayList<ToMaatBean>();
for(BaseCfg[] cfg:cfgs){
for(List<BaseCfg> cfg:cfgs){
int compileId=0;
ToMaatBean toMaatBean=new ToMaatBean();
toMaatBean.setServiceCfg(new ArrayList<MaatCfg>());
@@ -491,7 +491,7 @@ public abstract class CrudService<D extends CrudDao<T>, T extends BaseEntity<T>>
}
}
toMaatBean.getServiceCfg().add(maatCfg);
BaseCfg baseCfg=(BaseCfg)cfg[0];
BaseCfg baseCfg=cfg.get(0);
if(compileId==0){
throw new RuntimeException("转换出错,未获取到正确的compileId");
}else{