APP相关模块统一使用appCode作为检索条件

This commit is contained in:
duandongmei
2019-05-13 19:10:21 +08:00
parent 35ca1636ef
commit d4e153533a
15 changed files with 701 additions and 60 deletions

View File

@@ -126,9 +126,9 @@ public class AppCfgController extends BaseController {
*/ */
@RequestMapping(value = "ajaxAppName", method = RequestMethod.POST) @RequestMapping(value = "ajaxAppName", method = RequestMethod.POST)
@ResponseBody @ResponseBody
public List<Map<String, String>> ajaxAppName(Model model, String ids) { public List<Map<String, String>> ajaxAppName(Model model, String ids,Integer cfgType) {
List<Map<String, String>> dataList = new ArrayList<>(); List<Map<String, String>> dataList = new ArrayList<>();
List<SpecificServiceCfg> serviceList = specificServiceCfgService.getBySpecServiceCodes(ids); List<SpecificServiceCfg> serviceList = specificServiceCfgService.getBySpecServiceCodes(ids,cfgType);
Map<String, String> appMap = new HashMap<>(); Map<String, String> appMap = new HashMap<>();
Map<String, String> behavMap = new HashMap<>(); Map<String, String> behavMap = new HashMap<>();
for (SpecificServiceCfg cfg : serviceList) { for (SpecificServiceCfg cfg : serviceList) {
@@ -192,6 +192,24 @@ public class AppCfgController extends BaseController {
public String policyCfgForm(Model model, String ids, AppPolicyCfg entity) { public String policyCfgForm(Model model, String ids, AppPolicyCfg entity) {
if (StringUtils.isNotBlank(ids)) { if (StringUtils.isNotBlank(ids)) {
entity = appCfgService.getAppPolicyCfg(Long.parseLong(ids), null); entity = appCfgService.getAppPolicyCfg(Long.parseLong(ids), null);
// 查找社交应用的所有有效一级特定服务
SpecificServiceCfg appSpec = new SpecificServiceCfg();
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
}
appSpec.setIsValid(Constants.VALID_YES);
appSpec.setIsLeaf(0);
appSpec.setSpecServiceCode(entity.getAppCode());
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
if (!StringUtil.isEmpty(appList)) {
SpecificServiceCfg app = appList.get(0);
entity.setSpecServiceId(app.getSpecServiceId());
}
initUpdateFormCondition(model, entity); initUpdateFormCondition(model, entity);
} else { } else {
initFormCondition(model, entity); initFormCondition(model, entity);
@@ -356,8 +374,20 @@ public class AppCfgController extends BaseController {
Page<AppIpCfg> searchPage = new Page<AppIpCfg>(request, response, "r"); Page<AppIpCfg> searchPage = new Page<AppIpCfg>(request, response, "r");
Page<AppIpCfg> page = appCfgService.findAppIpList(searchPage, cfg); Page<AppIpCfg> page = appCfgService.findAppIpList(searchPage, cfg);
for (AppIpCfg entity : page.getList()) { for (AppIpCfg entity : page.getList()) {
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(entity.getSpecServiceId()); // 查找社交应用的所有有效一级特定服务
if(app!=null){ SpecificServiceCfg appSpec = new SpecificServiceCfg();
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
}
appSpec.setIsValid(Constants.VALID_YES);
appSpec.setIsLeaf(0);
appSpec.setSpecServiceCode(entity.getAppCode());
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
if (!StringUtil.isEmpty(appList)) {
SpecificServiceCfg app = appList.get(0);
entity.setAppName(app.getSpecServiceName()); entity.setAppName(app.getSpecServiceName());
} }
} }
@@ -379,6 +409,24 @@ public class AppCfgController extends BaseController {
public String ipCfgForm(Model model, String ids, AppIpCfg entity) { public String ipCfgForm(Model model, String ids, AppIpCfg entity) {
if (StringUtils.isNotBlank(ids)) { if (StringUtils.isNotBlank(ids)) {
entity = appCfgService.getAppIpCfg(Long.parseLong(ids)); entity = appCfgService.getAppIpCfg(Long.parseLong(ids));
// 查找社交应用的所有有效一级特定服务
SpecificServiceCfg appSpec = new SpecificServiceCfg();
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
}
appSpec.setIsValid(Constants.VALID_YES);
appSpec.setIsLeaf(0);
appSpec.setSpecServiceCode(entity.getAppCode());
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
if (!StringUtil.isEmpty(appList)) {
SpecificServiceCfg app = appList.get(0);
entity.setSpecServiceId(app.getSpecServiceId());
}
initUpdateFormCondition(model, entity); initUpdateFormCondition(model, entity);
} else { } else {
initFormCondition(model, entity); initFormCondition(model, entity);
@@ -553,8 +601,20 @@ public class AppCfgController extends BaseController {
Page<AppHttpCfg> searchPage = new Page<AppHttpCfg>(request, response, "r"); Page<AppHttpCfg> searchPage = new Page<AppHttpCfg>(request, response, "r");
Page<AppHttpCfg> page = appCfgService.findAppHttpList(searchPage, cfg); Page<AppHttpCfg> page = appCfgService.findAppHttpList(searchPage, cfg);
for (AppHttpCfg entity : page.getList()) { for (AppHttpCfg entity : page.getList()) {
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(entity.getSpecServiceId()); // 查找社交应用的所有有效一级特定服务
if(app!=null){ SpecificServiceCfg appSpec = new SpecificServiceCfg();
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
}
appSpec.setIsValid(Constants.VALID_YES);
appSpec.setIsLeaf(0);
appSpec.setSpecServiceCode(entity.getAppCode());
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
if (!StringUtil.isEmpty(appList)) {
SpecificServiceCfg app = appList.get(0);
entity.setAppName(app.getSpecServiceName()); entity.setAppName(app.getSpecServiceName());
} }
// entity.setCfgKeywords(entity.getCfgKeywords().replace(Constants.KEYWORD_EXPR, // entity.setCfgKeywords(entity.getCfgKeywords().replace(Constants.KEYWORD_EXPR,
@@ -578,6 +638,24 @@ public class AppCfgController extends BaseController {
public String httpCfgForm(Model model, String ids, AppHttpCfg entity) { public String httpCfgForm(Model model, String ids, AppHttpCfg entity) {
if (StringUtils.isNotBlank(ids)) { if (StringUtils.isNotBlank(ids)) {
entity = appCfgService.getAppHttpCfg(Long.parseLong(ids)); entity = appCfgService.getAppHttpCfg(Long.parseLong(ids));
// 查找社交应用的所有有效一级特定服务
SpecificServiceCfg appSpec = new SpecificServiceCfg();
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
}
appSpec.setIsValid(Constants.VALID_YES);
appSpec.setIsLeaf(0);
appSpec.setSpecServiceCode(entity.getAppCode());
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
if (!StringUtil.isEmpty(appList)) {
SpecificServiceCfg app = appList.get(0);
entity.setSpecServiceId(app.getSpecServiceId());
}
initUpdateFormCondition(model, entity); initUpdateFormCondition(model, entity);
} else { } else {
initFormCondition(model, entity); initFormCondition(model, entity);
@@ -718,8 +796,20 @@ public class AppCfgController extends BaseController {
Page<AppDomainCfg> searchPage = new Page<AppDomainCfg>(request, response, "r"); Page<AppDomainCfg> searchPage = new Page<AppDomainCfg>(request, response, "r");
Page<AppDomainCfg> page = appCfgService.findAppDomainList(searchPage, cfg); Page<AppDomainCfg> page = appCfgService.findAppDomainList(searchPage, cfg);
for (AppDomainCfg entity : page.getList()) { for (AppDomainCfg entity : page.getList()) {
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(entity.getSpecServiceId()); // 查找社交应用的所有有效一级特定服务
if(app!=null){ SpecificServiceCfg appSpec = new SpecificServiceCfg();
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
}
appSpec.setIsValid(Constants.VALID_YES);
appSpec.setIsLeaf(0);
appSpec.setSpecServiceCode(entity.getAppCode());
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
if (!StringUtil.isEmpty(appList)) {
SpecificServiceCfg app = appList.get(0);
entity.setAppName(app.getSpecServiceName()); entity.setAppName(app.getSpecServiceName());
} }
} }
@@ -741,6 +831,24 @@ public class AppCfgController extends BaseController {
public String domainCfgForm(Model model, String ids, AppDomainCfg entity) { public String domainCfgForm(Model model, String ids, AppDomainCfg entity) {
if (StringUtils.isNotBlank(ids)) { if (StringUtils.isNotBlank(ids)) {
entity = appCfgService.getAppDomainCfg(Long.parseLong(ids)); entity = appCfgService.getAppDomainCfg(Long.parseLong(ids));
// 查找社交应用的所有有效一级特定服务
SpecificServiceCfg appSpec = new SpecificServiceCfg();
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
}
appSpec.setIsValid(Constants.VALID_YES);
appSpec.setIsLeaf(0);
appSpec.setSpecServiceCode(entity.getAppCode());
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
if (!StringUtil.isEmpty(appList)) {
SpecificServiceCfg app = appList.get(0);
entity.setSpecServiceId(app.getSpecServiceId());
}
initUpdateFormCondition(model, entity); initUpdateFormCondition(model, entity);
} else { } else {
initFormCondition(model, entity); initFormCondition(model, entity);
@@ -903,8 +1011,20 @@ public class AppCfgController extends BaseController {
Page<AppByteCfg> searchPage = new Page<AppByteCfg>(request, response, "r"); Page<AppByteCfg> searchPage = new Page<AppByteCfg>(request, response, "r");
Page<AppByteCfg> page = appCfgService.findAppByteList(searchPage, cfg); Page<AppByteCfg> page = appCfgService.findAppByteList(searchPage, cfg);
for (AppByteCfg entity : page.getList()) { for (AppByteCfg entity : page.getList()) {
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(entity.getSpecServiceId()); // 查找社交应用的所有有效一级特定服务
if(app!=null){ SpecificServiceCfg appSpec = new SpecificServiceCfg();
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
}
appSpec.setIsValid(Constants.VALID_YES);
appSpec.setIsLeaf(0);
appSpec.setSpecServiceCode(entity.getAppCode());
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
if (!StringUtil.isEmpty(appList)) {
SpecificServiceCfg app = appList.get(0);
entity.setAppName(app.getSpecServiceName()); entity.setAppName(app.getSpecServiceName());
} }
} }
@@ -926,6 +1046,24 @@ public class AppCfgController extends BaseController {
public String byteCfgForm(Model model, String ids, AppByteCfg entity) { public String byteCfgForm(Model model, String ids, AppByteCfg entity) {
if (StringUtils.isNotBlank(ids)) { if (StringUtils.isNotBlank(ids)) {
entity = appCfgService.getAppByteCfg(Long.parseLong(ids)); entity = appCfgService.getAppByteCfg(Long.parseLong(ids));
// 查找社交应用的所有有效一级特定服务
SpecificServiceCfg appSpec = new SpecificServiceCfg();
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
}
appSpec.setIsValid(Constants.VALID_YES);
appSpec.setIsLeaf(0);
appSpec.setSpecServiceCode(entity.getAppCode());
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
if (!StringUtil.isEmpty(appList)) {
SpecificServiceCfg app = appList.get(0);
entity.setSpecServiceId(app.getSpecServiceId());
}
initUpdateFormCondition(model, entity); initUpdateFormCondition(model, entity);
} else { } else {
initFormCondition(model, entity); initFormCondition(model, entity);
@@ -1042,8 +1180,20 @@ public class AppCfgController extends BaseController {
Page<AppSslCertCfg> searchPage = new Page<AppSslCertCfg>(request, response, "r"); Page<AppSslCertCfg> searchPage = new Page<AppSslCertCfg>(request, response, "r");
Page<AppSslCertCfg> page = appCfgService.findAppSslList(searchPage, cfg); Page<AppSslCertCfg> page = appCfgService.findAppSslList(searchPage, cfg);
for (AppSslCertCfg entity : page.getList()) { for (AppSslCertCfg entity : page.getList()) {
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(entity.getSpecServiceId()); // 查找社交应用的所有有效一级特定服务
if(app!=null){ SpecificServiceCfg appSpec = new SpecificServiceCfg();
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
}
appSpec.setIsValid(Constants.VALID_YES);
appSpec.setIsLeaf(0);
appSpec.setSpecServiceCode(entity.getAppCode());
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
if (!StringUtil.isEmpty(appList)) {
SpecificServiceCfg app = appList.get(0);
entity.setAppName(app.getSpecServiceName()); entity.setAppName(app.getSpecServiceName());
} }
} }
@@ -1065,6 +1215,24 @@ public class AppCfgController extends BaseController {
public String sslCfgForm(Model model, String ids, AppSslCertCfg entity) { public String sslCfgForm(Model model, String ids, AppSslCertCfg entity) {
if (StringUtils.isNotBlank(ids)) { if (StringUtils.isNotBlank(ids)) {
entity = appCfgService.getAppSslCfg(Long.parseLong(ids)); entity = appCfgService.getAppSslCfg(Long.parseLong(ids));
// 查找社交应用的所有有效一级特定服务
SpecificServiceCfg appSpec = new SpecificServiceCfg();
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
}
appSpec.setIsValid(Constants.VALID_YES);
appSpec.setIsLeaf(0);
appSpec.setSpecServiceCode(entity.getAppCode());
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
if (!StringUtil.isEmpty(appList)) {
SpecificServiceCfg app = appList.get(0);
entity.setSpecServiceId(app.getSpecServiceId());
}
initUpdateFormCondition(model, entity); initUpdateFormCondition(model, entity);
} else { } else {
initFormCondition(model, entity); initFormCondition(model, entity);
@@ -1228,6 +1396,24 @@ public class AppCfgController extends BaseController {
public String tcpCfgForm(Model model, String ids, AppTcpCfg entity) { public String tcpCfgForm(Model model, String ids, AppTcpCfg entity) {
if (StringUtils.isNotBlank(ids)) { if (StringUtils.isNotBlank(ids)) {
entity = appCfgService.getAppTcpCfg(Long.parseLong(ids)); entity = appCfgService.getAppTcpCfg(Long.parseLong(ids));
// 查找社交应用的所有有效一级特定服务
SpecificServiceCfg appSpec = new SpecificServiceCfg();
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
}
appSpec.setIsValid(Constants.VALID_YES);
appSpec.setIsLeaf(0);
appSpec.setSpecServiceCode(entity.getAppCode());
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
if (!StringUtil.isEmpty(appList)) {
SpecificServiceCfg app = appList.get(0);
entity.setSpecServiceId(app.getSpecServiceId());
}
initUpdateFormCondition(model, entity); initUpdateFormCondition(model, entity);
} else { } else {
initFormCondition(model, entity); initFormCondition(model, entity);
@@ -1343,8 +1529,20 @@ public class AppCfgController extends BaseController {
Page<AppHeaderCfg> searchPage = new Page<AppHeaderCfg>(request, response, "r"); Page<AppHeaderCfg> searchPage = new Page<AppHeaderCfg>(request, response, "r");
Page<AppHeaderCfg> page = appCfgService.findAppHeaderList(searchPage, cfg); Page<AppHeaderCfg> page = appCfgService.findAppHeaderList(searchPage, cfg);
for (AppHeaderCfg entity : page.getList()) { for (AppHeaderCfg entity : page.getList()) {
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(entity.getSpecServiceId()); // 查找社交应用的所有有效一级特定服务
if(app!=null){ SpecificServiceCfg appSpec = new SpecificServiceCfg();
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
}
appSpec.setIsValid(Constants.VALID_YES);
appSpec.setIsLeaf(0);
appSpec.setSpecServiceCode(entity.getAppCode());
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
if (!StringUtil.isEmpty(appList)) {
SpecificServiceCfg app = appList.get(0);
entity.setAppName(app.getSpecServiceName()); entity.setAppName(app.getSpecServiceName());
} }
} }
@@ -1366,6 +1564,24 @@ public class AppCfgController extends BaseController {
public String headerCfgForm(Model model, String ids, AppHeaderCfg entity) { public String headerCfgForm(Model model, String ids, AppHeaderCfg entity) {
if (StringUtils.isNotBlank(ids)) { if (StringUtils.isNotBlank(ids)) {
entity = appCfgService.getAppHeaderCfg(Long.parseLong(ids)); entity = appCfgService.getAppHeaderCfg(Long.parseLong(ids));
// 查找社交应用的所有有效一级特定服务
SpecificServiceCfg appSpec = new SpecificServiceCfg();
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
}
appSpec.setIsValid(Constants.VALID_YES);
appSpec.setIsLeaf(0);
appSpec.setSpecServiceCode(entity.getAppCode());
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
if (!StringUtil.isEmpty(appList)) {
SpecificServiceCfg app = appList.get(0);
entity.setSpecServiceId(app.getSpecServiceId());
}
initUpdateFormCondition(model, entity); initUpdateFormCondition(model, entity);
} else { } else {
initFormCondition(model, entity); initFormCondition(model, entity);
@@ -1862,8 +2078,20 @@ public class AppCfgController extends BaseController {
logTotal.put("sum",0L); logTotal.put("sum",0L);
logTotals.add(logTotal); logTotals.add(logTotal);
} }
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(policy.getSpecServiceId()); // 查找社交应用的所有有效一级特定服务
if (app != null) { SpecificServiceCfg appSpec = new SpecificServiceCfg();
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
}
appSpec.setIsValid(Constants.VALID_YES);
appSpec.setIsLeaf(0);
appSpec.setSpecServiceCode(policy.getAppCode());
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
if (!StringUtil.isEmpty(appList)) {
SpecificServiceCfg app = appList.get(0);
policy.setSocialName(app.getSpecServiceName()); policy.setSocialName(app.getSpecServiceName());
} }
} }
@@ -2148,8 +2376,20 @@ public class AppCfgController extends BaseController {
http.setIsCaseInsenstive(0); http.setIsCaseInsenstive(0);
} }
http.setCfgKeywords(Functions.replace(http.getCfgKeywords(), "***and***", " ")); http.setCfgKeywords(Functions.replace(http.getCfgKeywords(), "***and***", " "));
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(http.getSpecServiceId()); // 查找社交应用的所有有效一级特定服务
if(app!=null){ SpecificServiceCfg appSpec = new SpecificServiceCfg();
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
}
appSpec.setIsValid(Constants.VALID_YES);
appSpec.setIsLeaf(0);
appSpec.setSpecServiceCode(http.getAppCode());
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
if (!StringUtil.isEmpty(appList)) {
SpecificServiceCfg app = appList.get(0);
http.setAppName(app.getSpecServiceName()); http.setAppName(app.getSpecServiceName());
} }
} }
@@ -2223,8 +2463,20 @@ public class AppCfgController extends BaseController {
}else{ }else{
domain.setIsCaseInsenstive(0); domain.setIsCaseInsenstive(0);
} }
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(domain.getSpecServiceId()); // 查找社交应用的所有有效一级特定服务
if(app!=null){ SpecificServiceCfg appSpec = new SpecificServiceCfg();
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
}
appSpec.setIsValid(Constants.VALID_YES);
appSpec.setIsLeaf(0);
appSpec.setSpecServiceCode(domain.getAppCode());
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
if (!StringUtil.isEmpty(appList)) {
SpecificServiceCfg app = appList.get(0);
domain.setAppName(app.getSpecServiceName()); domain.setAppName(app.getSpecServiceName());
} }
} }
@@ -2300,8 +2552,20 @@ public class AppCfgController extends BaseController {
ssl.setIsCaseInsenstive(0); ssl.setIsCaseInsenstive(0);
} }
ssl.setCfgKeywords(Functions.replace(ssl.getCfgKeywords(), "***and***", " ")); ssl.setCfgKeywords(Functions.replace(ssl.getCfgKeywords(), "***and***", " "));
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(ssl.getSpecServiceId()); // 查找社交应用的所有有效一级特定服务
if(app!=null){ SpecificServiceCfg appSpec = new SpecificServiceCfg();
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
}
appSpec.setIsValid(Constants.VALID_YES);
appSpec.setIsLeaf(0);
appSpec.setSpecServiceCode(ssl.getAppCode());
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
if (!StringUtil.isEmpty(appList)) {
SpecificServiceCfg app = appList.get(0);
ssl.setAppName(app.getSpecServiceName()); ssl.setAppName(app.getSpecServiceName());
} }
} }

View File

@@ -87,8 +87,20 @@ public class AppFeatureCfgController extends BaseController {
Page<AppFeatureIndex> searchPage = new Page<AppFeatureIndex>(request, response, "r"); Page<AppFeatureIndex> searchPage = new Page<AppFeatureIndex>(request, response, "r");
Page<AppFeatureIndex> page = appMultiFeatureCfgService.findAppFeatureIndexList(searchPage, cfg); Page<AppFeatureIndex> page = appMultiFeatureCfgService.findAppFeatureIndexList(searchPage, cfg);
for (AppFeatureIndex entity : page.getList()) { for (AppFeatureIndex entity : page.getList()) {
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(entity.getSpecServiceId()); // 查找社交应用的所有有效一级特定服务
if(app!=null){ SpecificServiceCfg appSpec = new SpecificServiceCfg();
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
}
appSpec.setIsValid(Constants.VALID_YES);
appSpec.setIsLeaf(0);
appSpec.setSpecServiceCode(entity.getAppCode());
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
if (!StringUtil.isEmpty(appList)) {
SpecificServiceCfg app = appList.get(0);
entity.setAppName(app.getSpecServiceName()); entity.setAppName(app.getSpecServiceName());
} }
} }
@@ -117,6 +129,24 @@ public class AppFeatureCfgController extends BaseController {
entity.getFunctionId(), null)); entity.getFunctionId(), null));
entity.setNumCfgList( entity.setNumCfgList(
appMultiFeatureCfgService.getAppTcpCfg(entity.getCompileId(), entity.getFunctionId(), null)); appMultiFeatureCfgService.getAppTcpCfg(entity.getCompileId(), entity.getFunctionId(), null));
// 查找社交应用的所有有效一级特定服务
SpecificServiceCfg appSpec = new SpecificServiceCfg();
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
}
appSpec.setIsValid(Constants.VALID_YES);
appSpec.setIsLeaf(0);
appSpec.setSpecServiceCode(entity.getAppCode());
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
if (!StringUtil.isEmpty(appList)) {
SpecificServiceCfg app = appList.get(0);
entity.setSpecServiceId(app.getSpecServiceId());
}
initUpdateFormCondition(model, entity); initUpdateFormCondition(model, entity);
} else { } else {
initFormCondition(model, entity); initFormCondition(model, entity);
@@ -353,8 +383,20 @@ public class AppFeatureCfgController extends BaseController {
} }
for (AppFeatureIndex feature : ipLists) { for (AppFeatureIndex feature : ipLists) {
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(feature.getSpecServiceId()); // 查找社交应用的所有有效一级特定服务
if(app!=null){ SpecificServiceCfg appSpec = new SpecificServiceCfg();
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
}
appSpec.setIsValid(Constants.VALID_YES);
appSpec.setIsLeaf(0);
appSpec.setSpecServiceCode(feature.getAppCode());
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
if (!StringUtil.isEmpty(appList)) {
SpecificServiceCfg app = appList.get(0);
feature.setAppName(app.getSpecServiceName()); feature.setAppName(app.getSpecServiceName());
} }
} }

View File

@@ -24,6 +24,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.mvc.support.RedirectAttributes; import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import com.nis.domain.Page; import com.nis.domain.Page;
import com.nis.domain.SysDataDictionaryItem;
import com.nis.domain.configuration.AppPolicyCfg; import com.nis.domain.configuration.AppPolicyCfg;
import com.nis.domain.configuration.BaseStringCfg; import com.nis.domain.configuration.BaseStringCfg;
import com.nis.domain.configuration.CfgIndexInfo; import com.nis.domain.configuration.CfgIndexInfo;
@@ -36,6 +37,7 @@ import com.nis.exceptions.CallExternalProceduresException;
import com.nis.exceptions.MaatConvertException; import com.nis.exceptions.MaatConvertException;
import com.nis.util.ConfigServiceUtil; import com.nis.util.ConfigServiceUtil;
import com.nis.util.Constants; import com.nis.util.Constants;
import com.nis.util.DictUtils;
import com.nis.util.LogUtils; import com.nis.util.LogUtils;
import com.nis.util.StringUtil; import com.nis.util.StringUtil;
import com.nis.web.controller.BaseController; import com.nis.web.controller.BaseController;
@@ -130,6 +132,25 @@ public class BasicProtocolController extends BaseController {
public String policyCfgForm(Model model, String ids, AppPolicyCfg entity) { public String policyCfgForm(Model model, String ids, AppPolicyCfg entity) {
if (StringUtils.isNotBlank(ids)) { if (StringUtils.isNotBlank(ids)) {
entity = appCfgService.getAppPolicyCfg(Long.parseLong(ids), null); entity = appCfgService.getAppPolicyCfg(Long.parseLong(ids), null);
// 查找社交应用的所有有效一级特定服务
SpecificServiceCfg appSpec = new SpecificServiceCfg();
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_BASIC_PROTOCOL.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
}
appSpec.setIsValid(Constants.VALID_YES);
appSpec.setIsLeaf(0);
appSpec.setSpecServiceCode(entity.getAppCode());
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
if (!StringUtil.isEmpty(appList)) {
SpecificServiceCfg app = appList.get(0);
entity.setSpecServiceId(app.getSpecServiceId());
}
initUpdateFormCondition(model, entity); initUpdateFormCondition(model, entity);
} else { } else {
initFormCondition(model, entity); initFormCondition(model, entity);
@@ -323,8 +344,20 @@ public class BasicProtocolController extends BaseController {
logTotal.put("sum",0L); logTotal.put("sum",0L);
logTotals.add(logTotal); logTotals.add(logTotal);
} }
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(policy.getSpecServiceId()); // 查找社交应用的所有有效一级特定服务 TODO
if (app != null) { SpecificServiceCfg appSpec = new SpecificServiceCfg();
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_BASIC_PROTOCOL.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
}
appSpec.setIsValid(Constants.VALID_YES);
appSpec.setIsLeaf(0);
appSpec.setSpecServiceCode(policy.getAppCode());
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
if (!StringUtil.isEmpty(appList)) {
SpecificServiceCfg app = appList.get(0);
policy.setAppName(app.getSpecServiceName()); policy.setAppName(app.getSpecServiceName());
} }

View File

@@ -151,6 +151,24 @@ public class EncryptedTunnelBehaviorController extends BaseController {
public String policyCfgForm(Model model, String ids, AppPolicyCfg entity) { public String policyCfgForm(Model model, String ids, AppPolicyCfg entity) {
if (StringUtils.isNotBlank(ids)) { if (StringUtils.isNotBlank(ids)) {
entity = appCfgService.getAppPolicyCfg(Long.parseLong(ids), null); entity = appCfgService.getAppPolicyCfg(Long.parseLong(ids), null);
// 查找社交应用的所有有效一级特定服务
SpecificServiceCfg appSpec = new SpecificServiceCfg();
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_ENCRYPTED_TUNNEL_BEHAVIOR.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
}
appSpec.setIsValid(Constants.VALID_YES);
appSpec.setIsLeaf(0);
appSpec.setSpecServiceCode(entity.getAppCode());
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
if (!StringUtil.isEmpty(appList)) {
SpecificServiceCfg app = appList.get(0);
entity.setSpecServiceId(app.getSpecServiceId());
}
initUpdateFormCondition(model, entity); initUpdateFormCondition(model, entity);
} else { } else {
initFormCondition(model, entity); initFormCondition(model, entity);
@@ -347,8 +365,20 @@ public class EncryptedTunnelBehaviorController extends BaseController {
logTotal.put("sum",0L); logTotal.put("sum",0L);
logTotals.add(logTotal); logTotals.add(logTotal);
} }
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(policy.getSpecServiceId()); // 查找社交应用的所有有效一级特定服务 TODO
if (app != null) { SpecificServiceCfg appSpec = new SpecificServiceCfg();
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_ENCRYPTED_TUNNEL_BEHAVIOR.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
}
appSpec.setIsValid(Constants.VALID_YES);
appSpec.setIsLeaf(0);
appSpec.setSpecServiceCode(policy.getAppCode());
List<SpecificServiceCfg> appList = specificServiceCfgService.findAllSpecificServiceCfg(appSpec, null);
if (!StringUtil.isEmpty(appList)) {
SpecificServiceCfg app = appList.get(0);
policy.setBehaviorName(app.getSpecServiceName()); policy.setBehaviorName(app.getSpecServiceName());
} }
} }

View File

@@ -620,8 +620,13 @@
<if test="cfgDesc != null and cfgDesc != ''"> <if test="cfgDesc != null and cfgDesc != ''">
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%') AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
</if> </if>
<if test="specServiceId != null"> <if test="appCode != null">
AND r.spec_service_id=#{specServiceId,jdbcType=INTEGER} AND r.app_code=#{appCode,jdbcType=INTEGER}
</if>
<if test="appCode == null">
<if test="specServiceId != null">
AND r.spec_service_id=#{specServiceId,jdbcType=INTEGER}
</if>
</if> </if>
<if test="cfgType != null and cfgType != ''"> <if test="cfgType != null and cfgType != ''">
AND r.CFG_TYPE like concat(concat('%',#{cfgType,jdbcType=VARCHAR}),'%') AND r.CFG_TYPE like concat(concat('%',#{cfgType,jdbcType=VARCHAR}),'%')
@@ -721,8 +726,13 @@
<if test="cfgDesc != null and cfgDesc != ''"> <if test="cfgDesc != null and cfgDesc != ''">
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%') AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
</if> </if>
<if test="specServiceId != null"> <if test="appCode != null">
AND r.spec_service_id=#{specServiceId,jdbcType=INTEGER} AND r.app_code=#{appCode,jdbcType=INTEGER}
</if>
<if test="appCode == null">
<if test="specServiceId != null">
AND r.spec_service_id=#{specServiceId,jdbcType=INTEGER}
</if>
</if> </if>
<if test="action != null"> <if test="action != null">
AND r.ACTION=#{action,jdbcType=INTEGER} AND r.ACTION=#{action,jdbcType=INTEGER}
@@ -896,8 +906,13 @@
<if test="cfgDesc != null and cfgDesc != ''"> <if test="cfgDesc != null and cfgDesc != ''">
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%') AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
</if> </if>
<if test="specServiceId != null"> <if test="appCode != null">
AND r.spec_service_id=#{specServiceId,jdbcType=INTEGER} AND r.app_code=#{appCode,jdbcType=INTEGER}
</if>
<if test="appCode == null">
<if test="specServiceId != null">
AND r.spec_service_id=#{specServiceId,jdbcType=INTEGER}
</if>
</if> </if>
<if test="cfgType != null and cfgType != ''"> <if test="cfgType != null and cfgType != ''">
AND r.CFG_TYPE like concat(concat('%',#{CFG_TYPE,jdbcType=VARCHAR}),'%') AND r.CFG_TYPE like concat(concat('%',#{CFG_TYPE,jdbcType=VARCHAR}),'%')
@@ -1067,8 +1082,13 @@
<if test="cfgDesc != null and cfgDesc != ''"> <if test="cfgDesc != null and cfgDesc != ''">
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%') AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
</if> </if>
<if test="specServiceId != null"> <if test="appCode != null">
AND r.spec_service_id=#{specServiceId,jdbcType=INTEGER} AND r.app_code=#{appCode,jdbcType=INTEGER}
</if>
<if test="appCode == null">
<if test="specServiceId != null">
AND r.spec_service_id=#{specServiceId,jdbcType=INTEGER}
</if>
</if> </if>
<if test="cfgType != null and cfgType != ''"> <if test="cfgType != null and cfgType != ''">
AND r.CFG_TYPE like concat(concat('%',#{cfgType,jdbcType=VARCHAR}),'%') AND r.CFG_TYPE like concat(concat('%',#{cfgType,jdbcType=VARCHAR}),'%')
@@ -1186,8 +1206,13 @@
<if test="cfgDesc != null and cfgDesc != ''"> <if test="cfgDesc != null and cfgDesc != ''">
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%') AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
</if> </if>
<if test="specServiceId != null"> <if test="appCode != null">
AND r.spec_service_id=#{specServiceId,jdbcType=INTEGER} AND r.app_code=#{appCode,jdbcType=INTEGER}
</if>
<if test="appCode == null">
<if test="specServiceId != null">
AND r.spec_service_id=#{specServiceId,jdbcType=INTEGER}
</if>
</if> </if>
<if test="cfgType != null and cfgType != ''"> <if test="cfgType != null and cfgType != ''">
AND r.CFG_TYPE like concat(concat('%',#{cfgType,jdbcType=VARCHAR}),'%') AND r.CFG_TYPE like concat(concat('%',#{cfgType,jdbcType=VARCHAR}),'%')
@@ -1457,8 +1482,13 @@
<if test="cfgDesc != null and cfgDesc != ''"> <if test="cfgDesc != null and cfgDesc != ''">
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%') AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
</if> </if>
<if test="specServiceId != null"> <if test="appCode != null">
AND r.spec_service_id=#{specServiceId,jdbcType=INTEGER} AND r.app_code=#{appCode,jdbcType=INTEGER}
</if>
<if test="appCode == null">
<if test="specServiceId != null">
AND r.spec_service_id=#{specServiceId,jdbcType=INTEGER}
</if>
</if> </if>
<if test="cfgType != null and cfgType != ''"> <if test="cfgType != null and cfgType != ''">
AND r.CFG_TYPE like concat(concat('%',#{cfgType,jdbcType=VARCHAR}),'%') AND r.CFG_TYPE like concat(concat('%',#{cfgType,jdbcType=VARCHAR}),'%')
@@ -1652,8 +1682,13 @@
<if test="cfgDesc != null and cfgDesc != ''"> <if test="cfgDesc != null and cfgDesc != ''">
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%') AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
</if> </if>
<if test="specServiceId != null"> <if test="appCode != null">
AND r.spec_service_id=#{specServiceId,jdbcType=INTEGER} AND r.app_code=#{appCode,jdbcType=INTEGER}
</if>
<if test="appCode == null">
<if test="specServiceId != null">
AND r.spec_service_id=#{specServiceId,jdbcType=INTEGER}
</if>
</if> </if>
<if test="cfgType != null and cfgType != ''"> <if test="cfgType != null and cfgType != ''">
AND r.CFG_TYPE like concat(concat('%',#{cfgType,jdbcType=VARCHAR}),'%') AND r.CFG_TYPE like concat(concat('%',#{cfgType,jdbcType=VARCHAR}),'%')

View File

@@ -267,8 +267,13 @@
<if test="cfgDesc != null and cfgDesc != ''"> <if test="cfgDesc != null and cfgDesc != ''">
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%') AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
</if> </if>
<if test="specServiceId != null"> <if test="appCode != null">
AND r.spec_service_id=#{specServiceId,jdbcType=INTEGER} AND r.app_code=#{appCode,jdbcType=INTEGER}
</if>
<if test="appCode == null">
<if test="specServiceId != null">
AND r.spec_service_id=#{specServiceId,jdbcType=INTEGER}
</if>
</if> </if>
<if test="action != null"> <if test="action != null">
AND r.ACTION=#{action,jdbcType=INTEGER} AND r.ACTION=#{action,jdbcType=INTEGER}

View File

@@ -20,7 +20,7 @@ public interface SpecificServiceCfgDao extends CrudDao<SpecificServiceCfg> {
* @return * @return
*/ */
SpecificServiceCfg getBySpecServiceId(Integer specServiceId); SpecificServiceCfg getBySpecServiceId(Integer specServiceId);
List<SpecificServiceCfg> getBySpecServiceCodes(@Param("ids")String ids); List<SpecificServiceCfg> getBySpecServiceCodes(@Param("ids")String ids,@Param("cfgType")Integer cfgType);
/** /**
* 查询所有符合条件顶层分页列表 * 查询所有符合条件顶层分页列表
* @param specificServiceCfg * @param specificServiceCfg

View File

@@ -39,11 +39,11 @@
<!-- 根据id查出对象 --> <!-- 根据id查出对象 -->
<select id="getBySpecServiceId" resultType="com.nis.domain.specific.SpecificServiceCfg" parameterType="java.lang.Integer"> <select id="getBySpecServiceId" resultType="com.nis.domain.specific.SpecificServiceCfg" parameterType="java.lang.Integer">
select <include refid="specificServiceCfgColumns" /> select <include refid="specificServiceCfgColumns" />
from specific_service_cfg s where s.spec_service_id = #{specServiceId} from specific_service_cfg s where s.spec_service_id = #{specServiceId} and s.is_valid=1
</select> </select>
<select id="getBySpecServiceCodes" resultType="com.nis.domain.specific.SpecificServiceCfg" parameterType="java.lang.String"> <select id="getBySpecServiceCodes" resultType="com.nis.domain.specific.SpecificServiceCfg">
select <include refid="specificServiceCfgColumns" /> select <include refid="specificServiceCfgColumns" />
from specific_service_cfg s where s.spec_service_code in(${ids}) from specific_service_cfg s where s.spec_service_code in(${ids}) and s.is_valid=1 and s.cfg_type=#{cfgType}
</select> </select>
<select id="getRepeat" resultType="com.nis.domain.specific.SpecificServiceCfg" > <select id="getRepeat" resultType="com.nis.domain.specific.SpecificServiceCfg" >
select <include refid="specificServiceCfgColumns" /> select <include refid="specificServiceCfgColumns" />
@@ -54,11 +54,11 @@
</select> </select>
<select id="getParentType" resultType="java.lang.Integer" parameterType="java.lang.Integer"> <select id="getParentType" resultType="java.lang.Integer" parameterType="java.lang.Integer">
select cfg_type select cfg_type
from specific_service_cfg s where s.spec_service_id = #{specServiceId} from specific_service_cfg s where s.spec_service_id = #{specServiceId} and s.is_valid=1
</select> </select>
<select id="getParentCode" resultType="java.lang.Integer" parameterType="java.lang.Integer"> <select id="getParentCode" resultType="java.lang.Integer" parameterType="java.lang.Integer">
select spec_service_code select spec_service_code
from specific_service_cfg s where s.spec_service_id = #{specServiceId} from specific_service_cfg s where s.spec_service_id = #{specServiceId} and s.is_valid=1
</select> </select>
<!-- 查出所有符合条件的顶层数据 --> <!-- 查出所有符合条件的顶层数据 -->

View File

@@ -16,6 +16,7 @@ import org.springframework.transaction.annotation.Transactional;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.nis.domain.Page; import com.nis.domain.Page;
import com.nis.domain.SysDataDictionaryItem;
import com.nis.domain.basics.AsnIpCfg; import com.nis.domain.basics.AsnIpCfg;
import com.nis.domain.basics.Varibles; import com.nis.domain.basics.Varibles;
import com.nis.domain.configuration.AppByteCfg; import com.nis.domain.configuration.AppByteCfg;
@@ -90,6 +91,32 @@ public class AppCfgService extends BaseService {
public Page<AppPolicyCfg> findAppPolicyList(Page<AppPolicyCfg> page, AppPolicyCfg entity) { public Page<AppPolicyCfg> findAppPolicyList(Page<AppPolicyCfg> page, AppPolicyCfg entity) {
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r")); entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r"));
entity.setPage(page); entity.setPage(page);
if(!StringUtil.isEmpty(entity.getSpecServiceId())){
// 查找社交应用的所有有效一级特定服务
SpecificServiceCfg appSpec = new SpecificServiceCfg();
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
if (entity.getFunctionId() == 63 && Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
if (entity.getFunctionId() == 407 && Constants.SPECIFIC_SERVICE_CFG_TYPE_BASIC_PROTOCOL.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
if (entity.getFunctionId() == 408 && Constants.SPECIFIC_SERVICE_CFG_TYPE_ENCRYPTED_TUNNEL_BEHAVIOR.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
}
appSpec.setIsValid(Constants.VALID_YES);
appSpec.setIsLeaf(0);
appSpec.setSpecServiceId(entity.getSpecServiceId());
List<SpecificServiceCfg> appList = specificServiceCfgDao.findAllSpecificServiceCfg(appSpec, null);
if (!StringUtil.isEmpty(appList)) {
SpecificServiceCfg app = appList.get(0);
entity.setAppCode(app.getSpecServiceCode());
}
}
List<AppPolicyCfg> list = appCfgDao.findAppPolicyList(entity); List<AppPolicyCfg> list = appCfgDao.findAppPolicyList(entity);
page.setList(list); page.setList(list);
return page; return page;
@@ -104,11 +131,59 @@ public class AppCfgService extends BaseService {
public Page<AppIpCfg> findAppIpList(Page<AppIpCfg> page, AppIpCfg entity) { public Page<AppIpCfg> findAppIpList(Page<AppIpCfg> page, AppIpCfg entity) {
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r")); entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r"));
entity.setPage(page); entity.setPage(page);
if(!StringUtil.isEmpty(entity.getSpecServiceId())){
// 查找社交应用的所有有效一级特定服务
SpecificServiceCfg appSpec = new SpecificServiceCfg();
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
}
appSpec.setIsValid(Constants.VALID_YES);
appSpec.setIsLeaf(0);
appSpec.setSpecServiceId(entity.getSpecServiceId());
List<SpecificServiceCfg> appList = specificServiceCfgDao.findAllSpecificServiceCfg(appSpec, null);
if (!StringUtil.isEmpty(appList)) {
SpecificServiceCfg app = appList.get(0);
entity.setAppCode(app.getSpecServiceCode());
}
}
List<AppIpCfg> list = appCfgDao.findAppIpList(entity); List<AppIpCfg> list = appCfgDao.findAppIpList(entity);
page.setList(list); page.setList(list);
return page; return page;
} }
public List<AppIpCfg> findAppIpList(AppIpCfg entity) { public List<AppIpCfg> findAppIpList(AppIpCfg entity) {
if(!StringUtil.isEmpty(entity.getSpecServiceId())){
// 查找社交应用的所有有效一级特定服务
SpecificServiceCfg appSpec = new SpecificServiceCfg();
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
if (entity.getFunctionId() == 63 && Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
if (entity.getFunctionId() == 407 && Constants.SPECIFIC_SERVICE_CFG_TYPE_BASIC_PROTOCOL.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
if (entity.getFunctionId() == 408 && Constants.SPECIFIC_SERVICE_CFG_TYPE_ENCRYPTED_TUNNEL_BEHAVIOR.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
}
appSpec.setIsValid(Constants.VALID_YES);
appSpec.setIsLeaf(0);
appSpec.setSpecServiceId(entity.getSpecServiceId());
List<SpecificServiceCfg> appList = specificServiceCfgDao.findAllSpecificServiceCfg(appSpec, null);
if (!StringUtil.isEmpty(appList)) {
SpecificServiceCfg app = appList.get(0);
entity.setAppCode(app.getSpecServiceCode());
}
}
List<AppIpCfg> list = appCfgDao.findAppIpList(entity); List<AppIpCfg> list = appCfgDao.findAppIpList(entity);
return list; return list;
} }
@@ -121,6 +196,26 @@ public class AppCfgService extends BaseService {
public Page<AppHttpCfg> findAppHttpList(Page<AppHttpCfg> page, AppHttpCfg entity) { public Page<AppHttpCfg> findAppHttpList(Page<AppHttpCfg> page, AppHttpCfg entity) {
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r")); entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r"));
entity.setPage(page); entity.setPage(page);
if(!StringUtil.isEmpty(entity.getSpecServiceId())){
// 查找社交应用的所有有效一级特定服务
SpecificServiceCfg appSpec = new SpecificServiceCfg();
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
}
appSpec.setIsValid(Constants.VALID_YES);
appSpec.setIsLeaf(0);
appSpec.setSpecServiceId(entity.getSpecServiceId());
List<SpecificServiceCfg> appList = specificServiceCfgDao.findAllSpecificServiceCfg(appSpec, null);
if (!StringUtil.isEmpty(appList)) {
SpecificServiceCfg app = appList.get(0);
entity.setAppCode(app.getSpecServiceCode());
}
}
List<AppHttpCfg> list = appCfgDao.findAppHttpList(entity); List<AppHttpCfg> list = appCfgDao.findAppHttpList(entity);
page.setList(list); page.setList(list);
return page; return page;
@@ -134,6 +229,26 @@ public class AppCfgService extends BaseService {
public Page<AppDomainCfg> findAppDomainList(Page<AppDomainCfg> page, AppDomainCfg entity) { public Page<AppDomainCfg> findAppDomainList(Page<AppDomainCfg> page, AppDomainCfg entity) {
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r")); entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r"));
entity.setPage(page); entity.setPage(page);
if(!StringUtil.isEmpty(entity.getSpecServiceId())){
// 查找社交应用的所有有效一级特定服务
SpecificServiceCfg appSpec = new SpecificServiceCfg();
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
}
appSpec.setIsValid(Constants.VALID_YES);
appSpec.setIsLeaf(0);
appSpec.setSpecServiceId(entity.getSpecServiceId());
List<SpecificServiceCfg> appList = specificServiceCfgDao.findAllSpecificServiceCfg(appSpec, null);
if (!StringUtil.isEmpty(appList)) {
SpecificServiceCfg app = appList.get(0);
entity.setAppCode(app.getSpecServiceCode());
}
}
List<AppDomainCfg> list = appCfgDao.findAppDomainList(entity); List<AppDomainCfg> list = appCfgDao.findAppDomainList(entity);
page.setList(list); page.setList(list);
return page; return page;
@@ -174,6 +289,26 @@ public class AppCfgService extends BaseService {
public Page<AppByteCfg> findAppByteList(Page<AppByteCfg> page, AppByteCfg entity) { public Page<AppByteCfg> findAppByteList(Page<AppByteCfg> page, AppByteCfg entity) {
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r")); entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r"));
entity.setPage(page); entity.setPage(page);
if(!StringUtil.isEmpty(entity.getSpecServiceId())){
// 查找社交应用的所有有效一级特定服务
SpecificServiceCfg appSpec = new SpecificServiceCfg();
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
}
appSpec.setIsValid(Constants.VALID_YES);
appSpec.setIsLeaf(0);
appSpec.setSpecServiceId(entity.getSpecServiceId());
List<SpecificServiceCfg> appList = specificServiceCfgDao.findAllSpecificServiceCfg(appSpec, null);
if (!StringUtil.isEmpty(appList)) {
SpecificServiceCfg app = appList.get(0);
entity.setAppCode(app.getSpecServiceCode());
}
}
List<AppByteCfg> list = appCfgDao.findAppByteList(entity); List<AppByteCfg> list = appCfgDao.findAppByteList(entity);
page.setList(list); page.setList(list);
return page; return page;
@@ -182,6 +317,26 @@ public class AppCfgService extends BaseService {
public Page<AppSslCertCfg> findAppSslList(Page<AppSslCertCfg> page, AppSslCertCfg entity) { public Page<AppSslCertCfg> findAppSslList(Page<AppSslCertCfg> page, AppSslCertCfg entity) {
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r")); entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r"));
entity.setPage(page); entity.setPage(page);
if(!StringUtil.isEmpty(entity.getSpecServiceId())){
// 查找社交应用的所有有效一级特定服务
SpecificServiceCfg appSpec = new SpecificServiceCfg();
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
}
appSpec.setIsValid(Constants.VALID_YES);
appSpec.setIsLeaf(0);
appSpec.setSpecServiceId(entity.getSpecServiceId());
List<SpecificServiceCfg> appList = specificServiceCfgDao.findAllSpecificServiceCfg(appSpec, null);
if (!StringUtil.isEmpty(appList)) {
SpecificServiceCfg app = appList.get(0);
entity.setAppCode(app.getSpecServiceCode());
}
}
List<AppSslCertCfg> list = appCfgDao.findAppSslList(entity); List<AppSslCertCfg> list = appCfgDao.findAppSslList(entity);
page.setList(list); page.setList(list);
return page; return page;
@@ -195,6 +350,26 @@ public class AppCfgService extends BaseService {
public Page<AppTcpCfg> findAppTcpList(Page<AppTcpCfg> page, AppTcpCfg entity) { public Page<AppTcpCfg> findAppTcpList(Page<AppTcpCfg> page, AppTcpCfg entity) {
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r")); entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r"));
entity.setPage(page); entity.setPage(page);
if(!StringUtil.isEmpty(entity.getSpecServiceId())){
// 查找社交应用的所有有效一级特定服务
SpecificServiceCfg appSpec = new SpecificServiceCfg();
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
}
appSpec.setIsValid(Constants.VALID_YES);
appSpec.setIsLeaf(0);
appSpec.setSpecServiceId(entity.getSpecServiceId());
List<SpecificServiceCfg> appList = specificServiceCfgDao.findAllSpecificServiceCfg(appSpec, null);
if (!StringUtil.isEmpty(appList)) {
SpecificServiceCfg app = appList.get(0);
entity.setAppCode(app.getSpecServiceCode());
}
}
List<AppTcpCfg> list = appCfgDao.findAppTcpList(entity); List<AppTcpCfg> list = appCfgDao.findAppTcpList(entity);
page.setList(list); page.setList(list);
return page; return page;
@@ -2061,6 +2236,26 @@ public class AppCfgService extends BaseService {
public Page<AppHeaderCfg> findAppHeaderList(Page<AppHeaderCfg> page, AppHeaderCfg entity) { public Page<AppHeaderCfg> findAppHeaderList(Page<AppHeaderCfg> page, AppHeaderCfg entity) {
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r")); entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r"));
entity.setPage(page); entity.setPage(page);
if(!StringUtil.isEmpty(entity.getSpecServiceId())){
// 查找社交应用的所有有效一级特定服务
SpecificServiceCfg appSpec = new SpecificServiceCfg();
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
}
appSpec.setIsValid(Constants.VALID_YES);
appSpec.setIsLeaf(0);
appSpec.setSpecServiceId(entity.getSpecServiceId());
List<SpecificServiceCfg> appList = specificServiceCfgDao.findAllSpecificServiceCfg(appSpec, null);
if (!StringUtil.isEmpty(appList)) {
SpecificServiceCfg app = appList.get(0);
entity.setAppCode(app.getSpecServiceCode());
}
}
List<AppHeaderCfg> list = appCfgDao.findAppHeaderList(entity); List<AppHeaderCfg> list = appCfgDao.findAppHeaderList(entity);
page.setList(list); page.setList(list);
return page; return page;
@@ -2230,4 +2425,5 @@ public class AppCfgService extends BaseService {
} }
} }

View File

@@ -15,6 +15,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import com.nis.domain.Page; import com.nis.domain.Page;
import com.nis.domain.SysDataDictionaryItem;
import com.nis.domain.configuration.AppComplexFeatureCfg; import com.nis.domain.configuration.AppComplexFeatureCfg;
import com.nis.domain.configuration.AppFeatureIndex; import com.nis.domain.configuration.AppFeatureIndex;
import com.nis.domain.configuration.AppHttpCfg; import com.nis.domain.configuration.AppHttpCfg;
@@ -34,6 +35,7 @@ import com.nis.domain.maat.MaatCfg.GroupCfg;
import com.nis.domain.maat.MaatCfg.IpCfg; import com.nis.domain.maat.MaatCfg.IpCfg;
import com.nis.domain.maat.MaatCfg.NumBoundaryCfg; import com.nis.domain.maat.MaatCfg.NumBoundaryCfg;
import com.nis.domain.maat.MaatCfg.StringCfg; import com.nis.domain.maat.MaatCfg.StringCfg;
import com.nis.domain.specific.SpecificServiceCfg;
import com.nis.domain.maat.ToMaatBean; import com.nis.domain.maat.ToMaatBean;
import com.nis.domain.maat.ToMaatResult; import com.nis.domain.maat.ToMaatResult;
import com.nis.exceptions.MaatConvertException; import com.nis.exceptions.MaatConvertException;
@@ -42,6 +44,7 @@ import com.nis.util.Constants;
import com.nis.util.DictUtils; import com.nis.util.DictUtils;
import com.nis.util.StringUtil; import com.nis.util.StringUtil;
import com.nis.web.dao.configuration.AppMultiFeatureCfgDao; import com.nis.web.dao.configuration.AppMultiFeatureCfgDao;
import com.nis.web.dao.specific.SpecificServiceCfgDao;
import com.nis.web.security.UserUtils; import com.nis.web.security.UserUtils;
import com.nis.web.service.BaseService; import com.nis.web.service.BaseService;
@@ -55,11 +58,33 @@ import com.nis.web.service.BaseService;
public class AppMultiFeatureCfgService extends BaseService { public class AppMultiFeatureCfgService extends BaseService {
@Autowired @Autowired
protected AppMultiFeatureCfgDao appMultiFeatureCfgDao; protected AppMultiFeatureCfgDao appMultiFeatureCfgDao;
@Autowired
protected SpecificServiceCfgDao specificServiceCfgDao;
//分页查询 //分页查询
public Page<AppFeatureIndex> findAppFeatureIndexList(Page<AppFeatureIndex> page, AppFeatureIndex entity) { public Page<AppFeatureIndex> findAppFeatureIndexList(Page<AppFeatureIndex> page, AppFeatureIndex entity) {
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r")); entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r"));
entity.setPage(page); entity.setPage(page);
if(!StringUtil.isEmpty(entity.getSpecServiceId())){
// 查找社交应用的所有有效一级特定服务
SpecificServiceCfg appSpec = new SpecificServiceCfg();
for (SysDataDictionaryItem dict : DictUtils.getDictList("SPECIFIC_SERVICE_CFG_TYPE")) {
if (Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equals(dict.getItemValue())) {
appSpec.setCfgType(Integer.parseInt(dict.getItemCode()));
break;
}
}
appSpec.setIsValid(Constants.VALID_YES);
appSpec.setIsLeaf(0);
appSpec.setSpecServiceId(entity.getSpecServiceId());
List<SpecificServiceCfg> appList = specificServiceCfgDao.findAllSpecificServiceCfg(appSpec, null);
if (!StringUtil.isEmpty(appList)) {
SpecificServiceCfg app = appList.get(0);
entity.setAppCode(app.getSpecServiceCode());
}
}
List<AppFeatureIndex> list = appMultiFeatureCfgDao.findAppFeatureIndexList(entity); List<AppFeatureIndex> list = appMultiFeatureCfgDao.findAppFeatureIndexList(entity);
page.setList(list); page.setList(list);
return page; return page;

View File

@@ -33,11 +33,11 @@ public class SpecificServiceCfgService extends BaseService{
public SpecificServiceCfg getBySpecServiceId(Integer specServiceId) { public SpecificServiceCfg getBySpecServiceId(Integer specServiceId) {
return specificServiceCfgDao.getBySpecServiceId(specServiceId); return specificServiceCfgDao.getBySpecServiceId(specServiceId);
} }
public List<SpecificServiceCfg> getBySpecServiceCodes(String specServiceCodes) { public List<SpecificServiceCfg> getBySpecServiceCodes(String specServiceCodes,Integer cfgType) {
for(String specServiceId:specServiceCodes.split(",")) { for(String specServiceId:specServiceCodes.split(",")) {
Integer.parseInt(specServiceId); Integer.parseInt(specServiceId);
} }
return specificServiceCfgDao.getBySpecServiceCodes(specServiceCodes); return specificServiceCfgDao.getBySpecServiceCodes(specServiceCodes,cfgType);
} }
/** /**
* 查询所有符合条件的顶层分页 * 查询所有符合条件的顶层分页

View File

@@ -100,6 +100,9 @@
<body> <body>
<div class="page-content"> <div class="page-content">
<c:forEach items="${fns:getDictList('SPECIFIC_SERVICE_CFG_TYPE') }" var="dict">
<c:if test="${dict.itemValue eq 'social_app'}"><c:set var="app" value="${dict.itemCode}"/></c:if>
</c:forEach>
<div class="theme-panel hidden-xs hidden-sm"> <div class="theme-panel hidden-xs hidden-sm">
<shiro:hasPermission name="app:policy:config"> <shiro:hasPermission name="app:policy:config">
<button type="button" class="addId btn btn-primary" <button type="button" class="addId btn btn-primary"
@@ -451,8 +454,8 @@
</c:forEach> </c:forEach>
</c:if> </c:if>
</td> </td>
<td class="appCode" id="${cfg.appCode }">${cfg.appCode }</td> <td class="appCode" id="${cfg.appCode }" cfgType="${app }"></td>
<td class="behavCode" id="${cfg.behavCode }">${cfg.behavCode }</td> <td class="behavCode" id="${cfg.behavCode }" cfgType="${app }"></td>
<%-- <td>${cfg.ratelimit }</td> --%> <%-- <td>${cfg.ratelimit }</td> --%>
<td> <td>
<c:choose> <c:choose>

View File

@@ -455,7 +455,7 @@
</c:forEach> </c:forEach>
</c:if> </c:if>
</td> </td>
<td class="appCode" id="${cfg.appCode }">${cfg.appCode }</td> <td class="appCode" id="${cfg.appCode }" cfgType="${app }"></td>
<td> <td>
<c:choose> <c:choose>
<c:when test="${cfg.isAudit eq '0'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:when> <c:when test="${cfg.isAudit eq '0'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:when>

View File

@@ -100,6 +100,9 @@
<body> <body>
<div class="page-content"> <div class="page-content">
<c:forEach items="${fns:getDictList('SPECIFIC_SERVICE_CFG_TYPE') }" var="dict">
<c:if test="${dict.itemValue eq 'encrypted_tunnel_behavior'}"><c:set var="app" value="${dict.itemCode}"/></c:if>
</c:forEach>
<div class="theme-panel hidden-xs hidden-sm"> <div class="theme-panel hidden-xs hidden-sm">
<shiro:hasPermission name="encryptedtunnelbehav:config"> <shiro:hasPermission name="encryptedtunnelbehav:config">
<button type="button" class="addId btn btn-primary" <button type="button" class="addId btn btn-primary"
@@ -451,8 +454,8 @@
</c:forEach> </c:forEach>
</c:if> </c:if>
</td> </td>
<td class="appCode" id="${cfg.appCode }">${cfg.appCode }</td> <td class="appCode" id="${cfg.appCode }" cfgType="${app }"></td>
<td class="behavCode" id="${cfg.behavCode }">${cfg.behavCode }</td> <td class="behavCode" id="${cfg.behavCode }" cfgType="${app }"></td>
<td> <td>
<c:choose> <c:choose>
<c:when test="${cfg.isAudit eq '0'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:when> <c:when test="${cfg.isAudit eq '0'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:when>

View File

@@ -1,11 +1,16 @@
$(function(){ $(function(){
var ids=[]; var ids=[];
var cfgType='';
$(".appCode").each(function(){ $(".appCode").each(function(){
if($(this).attr("id")&&$(this).attr("id")!=''){ if($(this).attr("id")&&$(this).attr("id")!=''){
ids.push($(this).attr("id")); ids.push($(this).attr("id"));
} }
//ids.push($(this).attr("id")); //ids.push($(this).attr("id"));
if(cfgType == null || cfgType == '' ){
cfgType=$(this).attr("cfgType");
}
}); });
$(".behavCode").each(function(){ $(".behavCode").each(function(){
if($(this).attr("id")&&$(this).attr("id")!=''){ if($(this).attr("id")&&$(this).attr("id")!=''){
ids.push($(this).attr("id")); ids.push($(this).attr("id"));
@@ -17,7 +22,7 @@ $(function(){
type:'post', type:'post',
async:false, async:false,
url:pathName+'/app/ajaxAppName', url:pathName+'/app/ajaxAppName',
data:{"ids":ids.join(",")}, data:{"ids":ids.join(","),"cfgType":cfgType},
success:function(data){ success:function(data){
if(data&&data.length==2){ if(data&&data.length==2){
var apps=data[0]; var apps=data[0];