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