1、配置列表增加日志总数一列;2、相关业务配置审核时处理用户自定义域信息;3、APP类配置增加behavCode字段,appCode字段由字符串改为Integer
Signed-off-by: zhangwei <zhangwei@intranet.com>
This commit is contained in:
@@ -28,6 +28,7 @@ import com.nis.domain.maat.MaatCfg.StringCfg;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.dao.configuration.AppCfgDao;
|
||||
import com.nis.web.dao.configuration.AreaIpCfgDao;
|
||||
@@ -126,7 +127,7 @@ public class AppCfgService extends BaseService {
|
||||
}catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("获取编译ID出错");
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
|
||||
throw new MaatConvertException(e.getMessage());
|
||||
}
|
||||
}else{
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
@@ -185,7 +186,7 @@ public class AppCfgService extends BaseService {
|
||||
}catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("获取编译ID出错");
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
|
||||
throw new MaatConvertException(e.getMessage());
|
||||
}
|
||||
}else{
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
@@ -242,7 +243,7 @@ public class AppCfgService extends BaseService {
|
||||
}catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("获取编译ID出错");
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
|
||||
throw new MaatConvertException(e.getMessage());
|
||||
}
|
||||
}else{
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
@@ -299,7 +300,7 @@ public class AppCfgService extends BaseService {
|
||||
}catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("获取编译ID出错");
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
|
||||
throw new MaatConvertException(e.getMessage());
|
||||
}
|
||||
}else{
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
@@ -352,7 +353,7 @@ public class AppCfgService extends BaseService {
|
||||
}catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("获取编译ID出错");
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
|
||||
throw new MaatConvertException(e.getMessage());
|
||||
}
|
||||
}else{
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
@@ -390,7 +391,12 @@ public class AppCfgService extends BaseService {
|
||||
entity.setTableName(AppPolicyCfg.getTablename());
|
||||
appCfgDao.auditCfg(entity);
|
||||
if(isAudit==1){
|
||||
entity.setCfgKeywords(entity.getAppCode());
|
||||
if(entity.getBehavCode()!=null){
|
||||
entity.setCfgKeywords(entity.getAppCode()+"&"+entity.getBehavCode());
|
||||
}else{
|
||||
entity.setCfgKeywords(entity.getAppCode()+"");
|
||||
}
|
||||
|
||||
List<AppPolicyCfg> list = new ArrayList();
|
||||
list.add(entity);
|
||||
Map<String,List> map = cfgConvert(strRegionList,list,2,entity,groupRelationList);
|
||||
@@ -424,18 +430,17 @@ public class AppCfgService extends BaseService {
|
||||
maatCfg.setGroupNum(groupRelationList.size());
|
||||
maatCfg.setAreaIpRegionList(areaIpRegionList);
|
||||
maatCfg.setIsValid(entity.getIsValid());
|
||||
//设置用户自定义域
|
||||
String userRegion = "";
|
||||
if(!StringUtil.isEmpty(entity.getAppCode())){
|
||||
userRegion = userRegion+entity.getAppCode()+Constants.USER_REGION_SPLIT;
|
||||
}else{
|
||||
userRegion = userRegion+Constants.USER_REGION_SPLIT;
|
||||
}
|
||||
if(entity.getRatelimit()!=null){
|
||||
userRegion = userRegion+entity.getRatelimit()+Constants.USER_REGION_SPLIT;
|
||||
}else{
|
||||
userRegion = userRegion+Constants.USER_REGION_SPLIT;
|
||||
|
||||
//设置APP自定义域
|
||||
String userRegion = "APP_ID="+entity.getAppCode();
|
||||
//限速业务需要设置
|
||||
String actionCode = DictUtils.getDictCode("SERVICE_ACTION", "action_ratelimit");
|
||||
if(!actionCode.equals("默认")){
|
||||
if(entity.getAction().equals(Integer.parseInt(actionCode))){
|
||||
userRegion += Constants.USER_REGION_SPLIT+"RATE_LIMIT="+entity.getRatelimit();
|
||||
}
|
||||
}
|
||||
|
||||
maatCfg.setUserRegion(userRegion);
|
||||
configCompileList.add(maatCfg);
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
@@ -514,18 +519,8 @@ public class AppCfgService extends BaseService {
|
||||
maatCfg.setGroupNum(groupRelationList.size());
|
||||
maatCfg.setAreaIpRegionList(areaIpRegionList);
|
||||
maatCfg.setIsValid(entity.getIsValid());
|
||||
//设置用户自定义域
|
||||
String userRegion = "";
|
||||
if(!StringUtil.isEmpty(entity.getAppCode())){
|
||||
userRegion = userRegion+entity.getAppCode()+Constants.USER_REGION_SPLIT;
|
||||
}else{
|
||||
userRegion = userRegion+Constants.USER_REGION_SPLIT;
|
||||
}
|
||||
if(entity.getRatelimit()!=null){
|
||||
userRegion = userRegion+entity.getRatelimit()+Constants.USER_REGION_SPLIT;
|
||||
}else{
|
||||
userRegion = userRegion+Constants.USER_REGION_SPLIT;
|
||||
}
|
||||
//设置APP自定义域
|
||||
String userRegion = "APP_ID="+entity.getAppCode();
|
||||
maatCfg.setUserRegion(userRegion);
|
||||
configCompileList.add(maatCfg);
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
@@ -605,18 +600,8 @@ public class AppCfgService extends BaseService {
|
||||
maatCfg.setGroupNum(groupRelationList.size());
|
||||
maatCfg.setAreaIpRegionList(areaIpRegionList);
|
||||
maatCfg.setIsValid(entity.getIsValid());
|
||||
//设置用户自定义域
|
||||
String userRegion = "";
|
||||
if(!StringUtil.isEmpty(entity.getAppCode())){
|
||||
userRegion = userRegion+entity.getAppCode()+Constants.USER_REGION_SPLIT;
|
||||
}else{
|
||||
userRegion = userRegion+Constants.USER_REGION_SPLIT;
|
||||
}
|
||||
if(entity.getRatelimit()!=null){
|
||||
userRegion = userRegion+entity.getRatelimit()+Constants.USER_REGION_SPLIT;
|
||||
}else{
|
||||
userRegion = userRegion+Constants.USER_REGION_SPLIT;
|
||||
}
|
||||
//设置APP自定义域
|
||||
String userRegion = "APP_ID="+entity.getAppCode();
|
||||
maatCfg.setUserRegion(userRegion);
|
||||
configCompileList.add(maatCfg);
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
@@ -696,18 +681,10 @@ public class AppCfgService extends BaseService {
|
||||
maatCfg.setGroupNum(groupRelationList.size());
|
||||
maatCfg.setAreaIpRegionList(areaIpRegionList);
|
||||
maatCfg.setIsValid(entity.getIsValid());
|
||||
//设置用户自定义域
|
||||
String userRegion = "";
|
||||
if(!StringUtil.isEmpty(entity.getAppCode())){
|
||||
userRegion = userRegion+entity.getAppCode()+Constants.USER_REGION_SPLIT;
|
||||
}else{
|
||||
userRegion = userRegion+Constants.USER_REGION_SPLIT;
|
||||
}
|
||||
if(entity.getRatelimit()!=null){
|
||||
userRegion = userRegion+entity.getRatelimit()+Constants.USER_REGION_SPLIT;
|
||||
}else{
|
||||
userRegion = userRegion+Constants.USER_REGION_SPLIT;
|
||||
}
|
||||
//设置APP自定义域
|
||||
String userRegion = "APP_ID="+entity.getAppCode()+Constants.USER_REGION_SPLIT+
|
||||
"DOMAIN_ID="+entity.getCompileId()+Constants.USER_REGION_SPLIT+
|
||||
"DOMAIN_STR="+entity.getDomain();
|
||||
maatCfg.setUserRegion(userRegion);
|
||||
configCompileList.add(maatCfg);
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
@@ -789,17 +766,7 @@ public class AppCfgService extends BaseService {
|
||||
maatCfg.setAreaIpRegionList(areaIpRegionList);
|
||||
maatCfg.setIsValid(entity.getIsValid());
|
||||
//设置用户自定义域
|
||||
String userRegion = "";
|
||||
if(!StringUtil.isEmpty(entity.getAppCode())){
|
||||
userRegion = userRegion+entity.getAppCode()+Constants.USER_REGION_SPLIT;
|
||||
}else{
|
||||
userRegion = userRegion+Constants.USER_REGION_SPLIT;
|
||||
}
|
||||
if(entity.getRatelimit()!=null){
|
||||
userRegion = userRegion+entity.getRatelimit()+Constants.USER_REGION_SPLIT;
|
||||
}else{
|
||||
userRegion = userRegion+Constants.USER_REGION_SPLIT;
|
||||
}
|
||||
String userRegion = "APP_ID="+entity.getAppCode();
|
||||
maatCfg.setUserRegion(userRegion);
|
||||
configCompileList.add(maatCfg);
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
|
||||
Reference in New Issue
Block a user