(2)基础类配置精简后台代码,加入了从maat转换工具获取编译ID。审核,取消审核目前不可用,等jar包修复完成继续调整。 (3)编译ID字段改为int类型 (4)多域类配置后台提交。查询采用查一张主表,根据主表中的编译ID分开查其他表的方式关联。界面功能尚在调整。
113 lines
3.2 KiB
Java
113 lines
3.2 KiB
Java
package com.nis.web.service.configuration;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
import com.nis.domain.configuration.ComplexkeywordCfg;
|
|
import com.nis.util.Constants;
|
|
import com.nis.web.dao.configuration.ComplexStringCfgDao;
|
|
import com.nis.web.service.CrudService;
|
|
|
|
/**
|
|
* String相关配置事务类
|
|
* @author dell
|
|
*
|
|
*/
|
|
@Service
|
|
public class ComplexStringCfgService extends CrudService<ComplexStringCfgDao,ComplexkeywordCfg> {
|
|
@Autowired
|
|
protected ComplexStringCfgDao complexStringCfgDao;
|
|
/**
|
|
*
|
|
* addStringCfg(新增IP类配置)
|
|
* (继承ComplexkeywordCfg这个类方可使用)
|
|
* @param cfg
|
|
* @return
|
|
*int
|
|
* @exception
|
|
* @since 1.0.0
|
|
*/
|
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
|
public int addStringCfg(ComplexkeywordCfg cfg){
|
|
return complexStringCfgDao.insert(cfg);
|
|
}
|
|
/**
|
|
*
|
|
* updateStringCfg(更新IP类配置)
|
|
* (继承ComplexkeywordCfg这个类方可使用)
|
|
* @param cfg
|
|
* @return
|
|
*int
|
|
* @exception
|
|
* @since 1.0.0
|
|
*/
|
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
|
public int updateStringCfg(ComplexkeywordCfg cfg){
|
|
return complexStringCfgDao.updateByPrimaryKeySelective(cfg);
|
|
}
|
|
/**
|
|
*
|
|
* auditStringCfg(审核IP类配置)
|
|
* (继承ComplexkeywordCfg这个类方可使用)
|
|
* @param cfg
|
|
* @return
|
|
*int
|
|
* @throws Exception
|
|
* @exception
|
|
* @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);
|
|
}
|
|
}else{
|
|
return complexStringCfgDao.audit(cfg);
|
|
}
|
|
return 0;
|
|
}
|
|
/**
|
|
*
|
|
* deleteStringCfg(删除IP类配置)
|
|
* (继承ComplexkeywordCfg这个类方可使用)
|
|
* @param cfg
|
|
* @return
|
|
*int
|
|
* @exception
|
|
* @since 1.0.0
|
|
*/
|
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
|
public int deleteStringCfg(ComplexkeywordCfg cfg){
|
|
return complexStringCfgDao.updateValid(cfg);
|
|
}
|
|
/**
|
|
*
|
|
* getStringCfg(根据IP与类名获取IP配置)
|
|
* (继承ComplexkeywordCfg这个类方可使用)
|
|
* @param clazz
|
|
* @param id
|
|
* @return
|
|
*ComplexkeywordCfg
|
|
* @exception
|
|
* @since 1.0.0
|
|
*/
|
|
public ComplexkeywordCfg getStringCfgById(ComplexkeywordCfg cfg){
|
|
return complexStringCfgDao.getById(cfg.getTableName(),cfg.getCfgId());
|
|
}
|
|
public Integer getIsValid(ComplexkeywordCfg cfg){
|
|
return complexStringCfgDao.getIsValid(cfg);
|
|
}
|
|
public Integer getIsValid(String tableName, long id){
|
|
return complexStringCfgDao.getIsValid(tableName,id);
|
|
}
|
|
public Integer getIsAudit(ComplexkeywordCfg cfg){
|
|
return complexStringCfgDao.getIsAudit(cfg);
|
|
}
|
|
public Integer getIsAudit(String tableName, long id){
|
|
return complexStringCfgDao.getIsAudit(tableName,id);
|
|
}
|
|
}
|