②列表展示时采用遍历分类性质标签的方法展示,减少数据库查询时的压力 ③取掉了一些不需要展示的列 ④新增Maat转换的bean ⑤采用gson的方式对在bean上做注解做转换,禁止了htmlescape
117 lines
2.8 KiB
Java
117 lines
2.8 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.NumBoundaryCfg;
|
|
import com.nis.web.dao.configuration.NumCfgDao;
|
|
import com.nis.web.service.CrudService;
|
|
|
|
/**
|
|
* Num相关配置事务类
|
|
* @author dell
|
|
*
|
|
*/
|
|
@Service
|
|
public class NumCfgService extends CrudService<NumCfgDao,NumBoundaryCfg> {
|
|
@Autowired
|
|
protected NumCfgDao numCfgDao;
|
|
/**
|
|
*
|
|
* addNumCfg(新增IP类配置)
|
|
* (继承NumBoundaryCfg这个类方可使用)
|
|
* @param cfg
|
|
* @return
|
|
*int
|
|
* @exception
|
|
* @since 1.0.0
|
|
*/
|
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
|
public int addNumCfg(NumBoundaryCfg cfg){
|
|
return numCfgDao.insert(cfg);
|
|
}
|
|
/**
|
|
*
|
|
* updateNumCfg(更新IP类配置)
|
|
* (继承NumBoundaryCfg这个类方可使用)
|
|
* @param cfg
|
|
* @return
|
|
*int
|
|
* @exception
|
|
* @since 1.0.0
|
|
*/
|
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
|
public int updateNumCfg(NumBoundaryCfg cfg){
|
|
return numCfgDao.updateByPrimaryKeySelective(cfg);
|
|
}
|
|
/**
|
|
*
|
|
* auditNumCfg(审核IP类配置)
|
|
* (继承NumBoundaryCfg这个类方可使用)
|
|
* @param cfg
|
|
* @return
|
|
*int
|
|
* @exception
|
|
* @since 1.0.0
|
|
*/
|
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
|
public int auditNumCfg(NumBoundaryCfg cfg){
|
|
return numCfgDao.audit(cfg);
|
|
}
|
|
/**
|
|
*
|
|
* deleteNumCfg(删除IP类配置)
|
|
* (继承NumBoundaryCfg这个类方可使用)
|
|
* @param cfg
|
|
* @return
|
|
*int
|
|
* @exception
|
|
* @since 1.0.0
|
|
*/
|
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
|
public int deleteNumCfg(NumBoundaryCfg cfg){
|
|
return numCfgDao.updateValid(cfg);
|
|
}
|
|
/**
|
|
*
|
|
* getNumCfg(根据IP与类名获取IP配置)
|
|
* (继承NumBoundaryCfg这个类方可使用)
|
|
* @param clazz
|
|
* @param id
|
|
* @return
|
|
*NumBoundaryCfg
|
|
* @exception
|
|
* @since 1.0.0
|
|
*/
|
|
public NumBoundaryCfg getNumCfgById(long id){
|
|
return numCfgDao.getById(id);
|
|
}
|
|
/**
|
|
*
|
|
* getNumCfg(根据IP与类名获取IP配置)
|
|
* (继承NumBoundaryCfg这个类方可使用)
|
|
* @param clazz
|
|
* @param id
|
|
* @return
|
|
*NumBoundaryCfg
|
|
* @exception
|
|
* @since 1.0.0
|
|
*/
|
|
public NumBoundaryCfg getNumCfgById(NumBoundaryCfg cfg){
|
|
return numCfgDao.get(cfg);
|
|
}
|
|
public Integer getIsValid(NumBoundaryCfg cfg){
|
|
return numCfgDao.getIsValid(cfg);
|
|
}
|
|
public Integer getIsValid(long id){
|
|
return numCfgDao.getIsValid(id);
|
|
}
|
|
public Integer getIsAudit(NumBoundaryCfg cfg){
|
|
return numCfgDao.getIsAudit(cfg);
|
|
}
|
|
public Integer getIsAudit(long id){
|
|
return numCfgDao.getIsAudit(id);
|
|
}
|
|
}
|