app http特征导入提交
This commit is contained in:
@@ -3305,8 +3305,9 @@ public class BaseController {
|
||||
|| serviceDict.getServiceId().intValue() == 147
|
||||
|| serviceDict.getServiceId().intValue() == 36
|
||||
|| serviceDict.getServiceId().intValue() == 148
|
||||
|| serviceDict.getServiceId().intValue() == 1028)// app ip
|
||||
) {
|
||||
|| serviceDict.getServiceId().intValue() == 1028// app ip
|
||||
|| serviceDict.getServiceId().intValue() == 1024//app http
|
||||
)) {
|
||||
if (StringUtils.isNotBlank(specServiceId)) {
|
||||
specificServiceCfg = specificServiceCfgService
|
||||
.getBySpecServiceId(Integer.parseInt(specServiceId));
|
||||
@@ -3473,7 +3474,9 @@ public class BaseController {
|
||||
cfg.setLable("0");
|
||||
cfg.setRequestId(StringUtil.isEmpty(requestId) ? 0 : requestId);
|
||||
cfg.setServiceId(serviceDict.getServiceId());
|
||||
cfg.setCompileId(compileIds.get(i));
|
||||
if(compileIds!=null&&compileIds.size()==stringCfgs.size()) {
|
||||
cfg.setCompileId(compileIds.get(i));
|
||||
}
|
||||
if(specificServiceCfg!=null) {
|
||||
cfg.setAppCode(specificServiceCfg.getSpecServiceCode());
|
||||
cfg.setSpecServiceId(specificServiceCfg.getSpecServiceId());
|
||||
@@ -3572,7 +3575,9 @@ public class BaseController {
|
||||
cfg.setLable("0");
|
||||
cfg.setRequestId(StringUtil.isEmpty(requestId) ? 0 : requestId);
|
||||
cfg.setServiceId(serviceDict.getServiceId());
|
||||
cfg.setCompileId(compileIds.get(ind));
|
||||
if(compileIds!=null&&compileIds.size()==complexkeywordCfgs.size()) {
|
||||
cfg.setCompileId(compileIds.get(ind));
|
||||
}
|
||||
if(specificServiceCfg!=null) {
|
||||
cfg.setAppCode(specificServiceCfg.getSpecServiceCode());
|
||||
cfg.setSpecServiceId(specificServiceCfg.getSpecServiceId());
|
||||
@@ -3603,9 +3608,12 @@ public class BaseController {
|
||||
appPolicyCfgs.add(appPolicyCfg);
|
||||
}
|
||||
} else {
|
||||
CfgIndexInfo cfgIndexInfo = new CfgIndexInfo();
|
||||
BeanUtils.copyProperties(cfg, cfgIndexInfo);
|
||||
cfgIndexInfos.add(cfgIndexInfo);
|
||||
if(!regionDict.getFunctionId().equals(402)) {
|
||||
CfgIndexInfo cfgIndexInfo = new CfgIndexInfo();
|
||||
BeanUtils.copyProperties(cfg, cfgIndexInfo);
|
||||
cfgIndexInfos.add(cfgIndexInfo);
|
||||
}
|
||||
|
||||
}
|
||||
ind++;
|
||||
}
|
||||
@@ -3621,6 +3629,9 @@ public class BaseController {
|
||||
if(regionDict.getDictId().intValue()==11) {
|
||||
websiteCfgService.saveHttpResHeadCfg(complexkeywordCfgs);
|
||||
}
|
||||
if(regionDict.getDictId().intValue()==63) {
|
||||
appCfgService.saveAppHttpCfg(complexkeywordCfgs);
|
||||
}
|
||||
}else if(regionDict.getRegionType().equals(6)) {
|
||||
if(regionDict.getFunctionId().equals(400)) {
|
||||
List<Integer> compileIds=Lists.newArrayList();
|
||||
|
||||
@@ -25,6 +25,7 @@ import com.nis.domain.configuration.AppTcpCfg;
|
||||
import com.nis.domain.configuration.AppTopicDomainCfg;
|
||||
import com.nis.domain.configuration.AreaIpCfg;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||
import com.nis.domain.configuration.WebsiteDomainTopic;
|
||||
@@ -445,7 +446,14 @@ public class AppCfgService extends BaseService {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void saveAppHttpCfg(List<ComplexkeywordCfg> cfgs) {
|
||||
for(ComplexkeywordCfg cfg:cfgs) {
|
||||
AppHttpCfg appHttpCfg=new AppHttpCfg();
|
||||
BeanUtils.copyProperties(cfg, appHttpCfg);
|
||||
appCfgDao.insertAppHttpCfg(appHttpCfg);
|
||||
}
|
||||
|
||||
}
|
||||
@Transactional(readOnly = false, rollbackFor = RuntimeException.class)
|
||||
public void saveOrUpdateAppHttpCfg(AppHttpCfg entity) throws Exception {
|
||||
// 设置区域运营商信息
|
||||
|
||||
@@ -32,4 +32,7 @@ UPDATE function_region_dict SET is_import=1 WHERE function_id=400;
|
||||
UPDATE function_service_dict SET is_import=1 WHERE function_id=400;
|
||||
#app ip
|
||||
UPDATE function_region_dict SET is_import=1 WHERE function_id=405;
|
||||
UPDATE function_service_dict SET is_import=1 WHERE function_id=405;
|
||||
UPDATE function_service_dict SET is_import=1 WHERE function_id=405;
|
||||
#app http
|
||||
UPDATE function_region_dict SET is_import=1 WHERE function_id=402 AND is_valid=1;
|
||||
UPDATE function_service_dict SET is_import=1 WHERE function_id=402 AND is_valid=1;
|
||||
@@ -53,6 +53,23 @@
|
||||
onClick="javascript:window.location='${ctx}/app/httpCfgForm?functionId=${cfg.functionId}'">
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="add"></spring:message></button>
|
||||
<c:set var="serviceImport" value="false"></c:set>
|
||||
<c:set var="regionImport" value="false"></c:set>
|
||||
<c:forEach items="${serviceList}" var="service" >
|
||||
<c:if test="${(cfg.functionId eq service.functionId) && service.isImport eq 1}">
|
||||
<c:set var="serviceImport" value="true"></c:set>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<c:forEach items="${regionList}" var="region" >
|
||||
<c:if test="${(cfg.functionId eq region.functionId) && region.isImport eq 1}">
|
||||
<c:set var="regionImport" value="true"></c:set>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<c:if test="${serviceImport eq 'true' && regionImport eq 'true'}">
|
||||
<button type="button" class="btn btn-primary import" >
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="import"></spring:message></button>
|
||||
</c:if>
|
||||
</shiro:hasPermission>
|
||||
</div>
|
||||
|
||||
@@ -446,6 +463,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<c:set var="importPath" value="/app/httpCfgList?functionId=${cfg.functionId}"/>
|
||||
<!-- 模板导入,start -->
|
||||
<%@include file="/WEB-INF/include/excel/importModal.jsp" %>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user