dns mail http ssl增加subscribeId业务
This commit is contained in:
@@ -447,6 +447,7 @@ public final class Constants {
|
|||||||
public static final String HTTP_REQ_HEAD_REGION = Configurations.getStringProperty("http_req_hdr_region","http_req_hdr");
|
public static final String HTTP_REQ_HEAD_REGION = Configurations.getStringProperty("http_req_hdr_region","http_req_hdr");
|
||||||
public static final String HTTP_REQ_BODY_REGION = Configurations.getStringProperty("http_req_body_region","http_req_body");
|
public static final String HTTP_REQ_BODY_REGION = Configurations.getStringProperty("http_req_body_region","http_req_body");
|
||||||
public static final String HTTP_RES_HEAD_REGION = Configurations.getStringProperty("http_res_hdr_region","http_res_hdr");
|
public static final String HTTP_RES_HEAD_REGION = Configurations.getStringProperty("http_res_hdr_region","http_res_hdr");
|
||||||
|
public static final String NTC_SUBSCRIBE_ID = Configurations.getStringProperty("ntc_subscribe_id","NTC_SUBSCRIBE_ID");
|
||||||
public static final String HTTP_RES_BODY_REGION = Configurations.getStringProperty("http_res_body_region","http_res_body");
|
public static final String HTTP_RES_BODY_REGION = Configurations.getStringProperty("http_res_body_region","http_res_body");
|
||||||
public static final String HTTP_URL_REGION = Configurations.getStringProperty("http_url_region","http_url");
|
public static final String HTTP_URL_REGION = Configurations.getStringProperty("http_url_region","http_url");
|
||||||
public static final String VOIP_IP_REGION = Configurations.getStringProperty("voip_ip","av_voip_ip");
|
public static final String VOIP_IP_REGION = Configurations.getStringProperty("voip_ip","av_voip_ip");
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import com.nis.domain.configuration.CfgIndexInfo;
|
|||||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||||
import com.nis.domain.configuration.FileDigestCfg;
|
import com.nis.domain.configuration.FileDigestCfg;
|
||||||
import com.nis.domain.configuration.IpPortCfg;
|
import com.nis.domain.configuration.IpPortCfg;
|
||||||
|
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||||
import com.nis.domain.maat.ToMaatResult;
|
import com.nis.domain.maat.ToMaatResult;
|
||||||
import com.nis.exceptions.MaatConvertException;
|
import com.nis.exceptions.MaatConvertException;
|
||||||
import com.nis.util.ConfigServiceUtil;
|
import com.nis.util.ConfigServiceUtil;
|
||||||
@@ -131,6 +132,15 @@ public class MailCfgController extends BaseController{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(cfg.getNtcSubscribeIdCfgList()!=null){
|
||||||
|
String cfgType = null;
|
||||||
|
for(NtcSubscribeIdCfg keyword:cfg.getNtcSubscribeIdCfgList()){
|
||||||
|
if(!keyword.getCfgType().equals(cfgType)){
|
||||||
|
tabList.add(new String[]{"2",keyword.getCfgType()});
|
||||||
|
cfgType = keyword.getCfgType();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
model.addAttribute("_cfg", cfg);
|
model.addAttribute("_cfg", cfg);
|
||||||
model.addAttribute("index", index);
|
model.addAttribute("index", index);
|
||||||
model.addAttribute("tabList", tabList);
|
model.addAttribute("tabList", tabList);
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ import com.nis.domain.configuration.HttpReqHeadCfg;
|
|||||||
import com.nis.domain.configuration.HttpResHeadCfg;
|
import com.nis.domain.configuration.HttpResHeadCfg;
|
||||||
import com.nis.domain.configuration.HttpUrlCfg;
|
import com.nis.domain.configuration.HttpUrlCfg;
|
||||||
import com.nis.domain.configuration.IpPortCfg;
|
import com.nis.domain.configuration.IpPortCfg;
|
||||||
|
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||||
import com.nis.exceptions.MaatConvertException;
|
import com.nis.exceptions.MaatConvertException;
|
||||||
import com.nis.util.Constants;
|
import com.nis.util.Constants;
|
||||||
import com.nis.util.excel.ImportExcel;
|
import com.nis.util.excel.ImportExcel;
|
||||||
@@ -91,13 +92,18 @@ public class WebsiteController extends BaseController{
|
|||||||
HttpBodyCfg resBodyCfg = new HttpBodyCfg();
|
HttpBodyCfg resBodyCfg = new HttpBodyCfg();
|
||||||
resBodyCfg.setCfgType(Constants.HTTP_RES_BODY_REGION);
|
resBodyCfg.setCfgType(Constants.HTTP_RES_BODY_REGION);
|
||||||
entity.setHttpResBody(resBodyCfg);
|
entity.setHttpResBody(resBodyCfg);
|
||||||
|
NtcSubscribeIdCfg subscribeId = new NtcSubscribeIdCfg();
|
||||||
|
subscribeId.setCfgType(Constants.NTC_SUBSCRIBE_ID);
|
||||||
|
entity.setNtcSubscribeIdCfg(subscribeId);
|
||||||
|
|
||||||
int httpReqCfgNum = entity.getIpPortList().size()+
|
int httpReqCfgNum = entity.getIpPortList().size()+
|
||||||
entity.getHttpUrlList().size()+
|
entity.getHttpUrlList().size()+
|
||||||
entity.getHttpReqBodyList().size()+
|
entity.getHttpReqBodyList().size()+
|
||||||
entity.getHttpReqHdrList().size();
|
entity.getHttpReqHdrList().size()+
|
||||||
|
entity.getNtcSubscribeIdCfgList().size();
|
||||||
int httpResCfgNum = entity.getHttpResHdrList().size()+
|
int httpResCfgNum = entity.getHttpResHdrList().size()+
|
||||||
entity.getHttpResBodyList().size();
|
entity.getHttpResBodyList().size()+
|
||||||
|
entity.getNtcSubscribeIdCfgList().size();
|
||||||
model.addAttribute("httpReqCfgNum", httpReqCfgNum);
|
model.addAttribute("httpReqCfgNum", httpReqCfgNum);
|
||||||
model.addAttribute("httpResCfgNum", httpResCfgNum);
|
model.addAttribute("httpResCfgNum", httpResCfgNum);
|
||||||
if(entity.getIpPortList().size()==0){
|
if(entity.getIpPortList().size()==0){
|
||||||
@@ -118,6 +124,9 @@ public class WebsiteController extends BaseController{
|
|||||||
if(entity.getHttpResBodyList().size()==0){
|
if(entity.getHttpResBodyList().size()==0){
|
||||||
entity.getHttpResBodyList().add(resBodyCfg);
|
entity.getHttpResBodyList().add(resBodyCfg);
|
||||||
}
|
}
|
||||||
|
if(entity.getNtcSubscribeIdCfgList().size()==0){
|
||||||
|
entity.getNtcSubscribeIdCfgList().add(subscribeId);
|
||||||
|
}
|
||||||
initUpdateFormCondition(model,entity);
|
initUpdateFormCondition(model,entity);
|
||||||
}else{
|
}else{
|
||||||
//设置http各类配置的配置域类型
|
//设置http各类配置的配置域类型
|
||||||
@@ -139,6 +148,9 @@ public class WebsiteController extends BaseController{
|
|||||||
HttpBodyCfg resBodyCfg = new HttpBodyCfg();
|
HttpBodyCfg resBodyCfg = new HttpBodyCfg();
|
||||||
resBodyCfg.setCfgType(Constants.HTTP_RES_BODY_REGION);
|
resBodyCfg.setCfgType(Constants.HTTP_RES_BODY_REGION);
|
||||||
entity.setHttpResBody(resBodyCfg);
|
entity.setHttpResBody(resBodyCfg);
|
||||||
|
NtcSubscribeIdCfg subscribeIdCfg = new NtcSubscribeIdCfg();
|
||||||
|
subscribeIdCfg.setCfgType(Constants.NTC_SUBSCRIBE_ID);
|
||||||
|
entity.setNtcSubscribeIdCfg(subscribeIdCfg);
|
||||||
|
|
||||||
List<IpPortCfg> ipList=new ArrayList<IpPortCfg>();
|
List<IpPortCfg> ipList=new ArrayList<IpPortCfg>();
|
||||||
ipList.add(ipCfg);
|
ipList.add(ipCfg);
|
||||||
@@ -158,6 +170,9 @@ public class WebsiteController extends BaseController{
|
|||||||
List<HttpBodyCfg> resBodyList=new ArrayList<HttpBodyCfg>();
|
List<HttpBodyCfg> resBodyList=new ArrayList<HttpBodyCfg>();
|
||||||
resBodyList.add(resBodyCfg);
|
resBodyList.add(resBodyCfg);
|
||||||
entity.setHttpResBodyList(resBodyList);
|
entity.setHttpResBodyList(resBodyList);
|
||||||
|
List<NtcSubscribeIdCfg> subscribeIdList=new ArrayList<NtcSubscribeIdCfg>();
|
||||||
|
subscribeIdList.add(subscribeIdCfg);
|
||||||
|
entity.setNtcSubscribeIdCfgList(subscribeIdList);
|
||||||
initFormCondition(model,entity);
|
initFormCondition(model,entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -257,6 +272,15 @@ public class WebsiteController extends BaseController{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(cfg.getNtcSubscribeIdCfgList()!=null){
|
||||||
|
String cfgType = null;
|
||||||
|
for(NtcSubscribeIdCfg keyword:cfg.getNtcSubscribeIdCfgList()){
|
||||||
|
if(!keyword.getCfgType().equals(cfgType)){
|
||||||
|
tabList.add(new String[]{"2",keyword.getCfgType()});
|
||||||
|
cfgType = keyword.getCfgType();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
model.addAttribute("_cfg", cfg);
|
model.addAttribute("_cfg", cfg);
|
||||||
model.addAttribute("index", index);
|
model.addAttribute("index", index);
|
||||||
model.addAttribute("tabList", tabList);
|
model.addAttribute("tabList", tabList);
|
||||||
@@ -334,6 +358,15 @@ public class WebsiteController extends BaseController{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(cfg.getNtcSubscribeIdCfgList()!=null){
|
||||||
|
String cfgType = null;
|
||||||
|
for(NtcSubscribeIdCfg keyword:cfg.getNtcSubscribeIdCfgList()){
|
||||||
|
if(!keyword.getCfgType().equals(cfgType)){
|
||||||
|
tabList.add(new String[]{"2",keyword.getCfgType()});
|
||||||
|
cfgType = keyword.getCfgType();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
model.addAttribute("_cfg", cfg);
|
model.addAttribute("_cfg", cfg);
|
||||||
model.addAttribute("index", index);
|
model.addAttribute("index", index);
|
||||||
model.addAttribute("tabList", tabList);
|
model.addAttribute("tabList", tabList);
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import com.nis.domain.configuration.AvVoipIpCfg;
|
|||||||
import com.nis.domain.configuration.BaseIpCfg;
|
import com.nis.domain.configuration.BaseIpCfg;
|
||||||
import com.nis.domain.configuration.BaseStringCfg;
|
import com.nis.domain.configuration.BaseStringCfg;
|
||||||
import com.nis.domain.configuration.CfgIndexInfo;
|
import com.nis.domain.configuration.CfgIndexInfo;
|
||||||
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
|
||||||
import com.nis.web.dao.MyBatisDao;
|
import com.nis.web.dao.MyBatisDao;
|
||||||
|
|
||||||
|
|
||||||
@@ -19,7 +18,6 @@ public interface AvContentCfgDao {
|
|||||||
public List<CfgIndexInfo> findAccountList(CfgIndexInfo entity) ;
|
public List<CfgIndexInfo> findAccountList(CfgIndexInfo entity) ;
|
||||||
public List<AvVoipIpCfg> findVoipIpCfgList(CfgIndexInfo entity);
|
public List<AvVoipIpCfg> findVoipIpCfgList(CfgIndexInfo entity);
|
||||||
public List<AvVoipAccountCfg> findVoipAccountCfgList(CfgIndexInfo entity);
|
public List<AvVoipAccountCfg> findVoipAccountCfgList(CfgIndexInfo entity);
|
||||||
public List<NtcSubscribeIdCfg> findSubscribeIdCfgList(CfgIndexInfo entity);
|
|
||||||
public CfgIndexInfo getCfgIndexInfo(CfgIndexInfo entity);
|
public CfgIndexInfo getCfgIndexInfo(CfgIndexInfo entity);
|
||||||
|
|
||||||
public void insertCfgIndexInfo(CfgIndexInfo entity);
|
public void insertCfgIndexInfo(CfgIndexInfo entity);
|
||||||
@@ -33,7 +31,6 @@ public interface AvContentCfgDao {
|
|||||||
public void updateAvVoipKeywordCfgt(CfgIndexInfo entity);
|
public void updateAvVoipKeywordCfgt(CfgIndexInfo entity);
|
||||||
|
|
||||||
public void deleteAvVoipIp(CfgIndexInfo entity);
|
public void deleteAvVoipIp(CfgIndexInfo entity);
|
||||||
public void deleteAvVoipKeywordCfg(CfgIndexInfo entity);
|
|
||||||
public void deleteAvVoipAccountCfg(CfgIndexInfo entity);
|
public void deleteAvVoipAccountCfg(CfgIndexInfo entity);
|
||||||
|
|
||||||
public BaseIpCfg findIpCfgById(BaseIpCfg entity) ;
|
public BaseIpCfg findIpCfgById(BaseIpCfg entity) ;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import java.util.List;
|
|||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import com.nis.domain.configuration.BaseStringCfg;
|
import com.nis.domain.configuration.BaseStringCfg;
|
||||||
|
import com.nis.domain.configuration.CfgIndexInfo;
|
||||||
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||||
import com.nis.web.dao.CrudDao;
|
import com.nis.web.dao.CrudDao;
|
||||||
import com.nis.web.dao.MyBatisDao;
|
import com.nis.web.dao.MyBatisDao;
|
||||||
@@ -41,7 +42,8 @@ public interface StringCfgDao extends CrudDao<BaseStringCfg>{
|
|||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public void deleteByCompileIds(@Param("user")long user,@Param("tableName")String tableName,@Param("compileIds")String compileIds);
|
public void deleteByCompileIds(@Param("user")long user,@Param("tableName")String tableName,@Param("compileIds")String compileIds);
|
||||||
|
public List<NtcSubscribeIdCfg> findSubscribeIdCfgListByCfgIndexInfo(CfgIndexInfo entity);
|
||||||
|
public void deleteSubscribeIdCfgByCfgIndexInfo(CfgIndexInfo entity);
|
||||||
public List<NtcSubscribeIdCfg> findSubscribeIdCfgList(NtcSubscribeIdCfg ntcSubscribeIdCfg);
|
public List<NtcSubscribeIdCfg> findSubscribeIdCfgList(NtcSubscribeIdCfg ntcSubscribeIdCfg);
|
||||||
public void saveSubscribeIdCfg(NtcSubscribeIdCfg ntcSubscribeIdCfg);
|
public void saveSubscribeIdCfg(NtcSubscribeIdCfg ntcSubscribeIdCfg);
|
||||||
public void updateSubscribeIdCfg(NtcSubscribeIdCfg ntcSubscribeIdCfg);
|
public void updateSubscribeIdCfg(NtcSubscribeIdCfg ntcSubscribeIdCfg);
|
||||||
|
|||||||
@@ -65,7 +65,6 @@
|
|||||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
<sql id="BaseStringCfg_Column_List_with_id" >
|
<sql id="BaseStringCfg_Column_List_with_id" >
|
||||||
CFG_ID, CFG_DESC, CFG_KEYWORDS,CFG_TYPE,ACTION,IS_VALID,IS_AUDIT,
|
CFG_ID, CFG_DESC, CFG_KEYWORDS,CFG_TYPE,ACTION,IS_VALID,IS_AUDIT,
|
||||||
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
|
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
|
||||||
@@ -518,6 +517,9 @@
|
|||||||
<include refid="SubscribeIdCfg_Column" />
|
<include refid="SubscribeIdCfg_Column" />
|
||||||
from ntc_subscribe_id_cfg r
|
from ntc_subscribe_id_cfg r
|
||||||
<where>
|
<where>
|
||||||
|
<if test="fucntionId != null">
|
||||||
|
and r.FUNCTION_ID=#{fucntionId,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
<if test="compileId != null">
|
<if test="compileId != null">
|
||||||
and r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
and r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
@@ -690,5 +692,44 @@
|
|||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<!-- 根据compileId获取SubscribeIdCfg信息 -->
|
||||||
|
<select id="findSubscribeIdCfgListByCfgIndexInfo" resultMap="SubscribeIdCfgMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
||||||
|
select
|
||||||
|
<include refid="SubscribeIdCfg_Column" />
|
||||||
|
from ntc_subscribe_id_cfg r
|
||||||
|
<where>
|
||||||
|
<if test="functionId != null">
|
||||||
|
and r.function_id=#{functionId,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
<if test="compileId != null">
|
||||||
|
and r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
<choose>
|
||||||
|
<when test="isValid != null">
|
||||||
|
and r.is_valid=#{isValid,jdbcType=INTEGER}
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
and r.is_valid != -1
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
</where>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
<!-- 删除voip subscribe信息 -->
|
||||||
|
<delete id="deleteSubscribeIdCfgByCfgIndexInfo" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||||
|
delete from ntc_subscribe_id_cfg
|
||||||
|
<where>
|
||||||
|
<if test="ntcSubscribeIdCfg != null and ntcSubscribeIdCfg.cfgId != null" >
|
||||||
|
and cfg_id = #{ntcSubscribeIdCfg.cfgId,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
<if test="compileId != null" >
|
||||||
|
and compile_id = #{compileId,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
<if test="functionId != null" >
|
||||||
|
and function_id = #{functionId,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</delete>
|
||||||
<!-- =====================NtcSubscribeIdCfg end======================== -->
|
<!-- =====================NtcSubscribeIdCfg end======================== -->
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -107,7 +107,7 @@ public class AvContentCfgService extends BaseService{
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<NtcSubscribeIdCfg> getSubscribeIdCfgList(CfgIndexInfo entity) {
|
public List<NtcSubscribeIdCfg> getSubscribeIdCfgList(CfgIndexInfo entity) {
|
||||||
return avContentCfgDao.findSubscribeIdCfgList(entity);
|
return stringCfgDao.findSubscribeIdCfgListByCfgIndexInfo(entity);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 根据索引表信息获取voipAccountCfg信息
|
* 根据索引表信息获取voipAccountCfg信息
|
||||||
@@ -198,7 +198,7 @@ public class AvContentCfgService extends BaseService{
|
|||||||
avContentCfgDao.updateCfgIndexInfo(entity);
|
avContentCfgDao.updateCfgIndexInfo(entity);
|
||||||
//无效子配置后,再新增子配置
|
//无效子配置后,再新增子配置
|
||||||
avContentCfgDao.deleteAvVoipIp(entity);
|
avContentCfgDao.deleteAvVoipIp(entity);
|
||||||
avContentCfgDao.deleteAvVoipKeywordCfg(entity);
|
stringCfgDao.deleteSubscribeIdCfgByCfgIndexInfo(entity);
|
||||||
AreaIpCfg area = new AreaIpCfg();
|
AreaIpCfg area = new AreaIpCfg();
|
||||||
area.setCompileId(entity.getCompileId());
|
area.setCompileId(entity.getCompileId());
|
||||||
area.setFunctionId(entity.getFunctionId());
|
area.setFunctionId(entity.getFunctionId());
|
||||||
@@ -280,7 +280,7 @@ public class AvContentCfgService extends BaseService{
|
|||||||
entity.setEditorId(entity.getCurrentUser().getId());
|
entity.setEditorId(entity.getCurrentUser().getId());
|
||||||
avContentCfgDao.updateCfgIndexInfo(entity);
|
avContentCfgDao.updateCfgIndexInfo(entity);
|
||||||
//无效子配置后,再新增子配置
|
//无效子配置后,再新增子配置
|
||||||
avContentCfgDao.deleteAvVoipKeywordCfg(entity);
|
stringCfgDao.deleteSubscribeIdCfgByCfgIndexInfo(entity);
|
||||||
avContentCfgDao.deleteAvVoipAccountCfg(entity);
|
avContentCfgDao.deleteAvVoipAccountCfg(entity);
|
||||||
AreaIpCfg area = new AreaIpCfg();
|
AreaIpCfg area = new AreaIpCfg();
|
||||||
area.setCompileId(entity.getCompileId());
|
area.setCompileId(entity.getCompileId());
|
||||||
@@ -398,7 +398,7 @@ public class AvContentCfgService extends BaseService{
|
|||||||
areaIpCfgDao.updateAreaIpCfg(areaIpCfg);
|
areaIpCfgDao.updateAreaIpCfg(areaIpCfg);
|
||||||
|
|
||||||
voipIpList=avContentCfgDao.findVoipIpCfgList(entity);
|
voipIpList=avContentCfgDao.findVoipIpCfgList(entity);
|
||||||
ntcList=avContentCfgDao.findSubscribeIdCfgList(entity);
|
ntcList=stringCfgDao.findSubscribeIdCfgListByCfgIndexInfo(entity);
|
||||||
areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId());
|
areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId());
|
||||||
|
|
||||||
ToMaatBean maatBean = new ToMaatBean();
|
ToMaatBean maatBean = new ToMaatBean();
|
||||||
@@ -511,7 +511,7 @@ public class AvContentCfgService extends BaseService{
|
|||||||
BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode","cfgType","cfgId"});
|
BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode","cfgType","cfgId"});
|
||||||
areaIpCfgDao.updateAreaIpCfg(areaIpCfg);
|
areaIpCfgDao.updateAreaIpCfg(areaIpCfg);
|
||||||
|
|
||||||
ntcList=avContentCfgDao.findSubscribeIdCfgList(entity);
|
ntcList=stringCfgDao.findSubscribeIdCfgListByCfgIndexInfo(entity);
|
||||||
accountList=avContentCfgDao.findVoipAccountCfgList(entity);
|
accountList=avContentCfgDao.findVoipAccountCfgList(entity);
|
||||||
areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId());
|
areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId());
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import com.nis.domain.configuration.ComplexkeywordCfg;
|
|||||||
import com.nis.domain.configuration.FileDigestCfg;
|
import com.nis.domain.configuration.FileDigestCfg;
|
||||||
import com.nis.domain.configuration.IpPortCfg;
|
import com.nis.domain.configuration.IpPortCfg;
|
||||||
import com.nis.domain.configuration.MailKeywordCfg;
|
import com.nis.domain.configuration.MailKeywordCfg;
|
||||||
|
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||||
import com.nis.domain.maat.MaatCfg;
|
import com.nis.domain.maat.MaatCfg;
|
||||||
import com.nis.domain.maat.ToMaatBean;
|
import com.nis.domain.maat.ToMaatBean;
|
||||||
import com.nis.domain.maat.ToMaatResult;
|
import com.nis.domain.maat.ToMaatResult;
|
||||||
@@ -37,6 +38,7 @@ import com.nis.util.FileUtils;
|
|||||||
import com.nis.util.JsonMapper;
|
import com.nis.util.JsonMapper;
|
||||||
import com.nis.web.dao.configuration.AreaIpCfgDao;
|
import com.nis.web.dao.configuration.AreaIpCfgDao;
|
||||||
import com.nis.web.dao.configuration.MailCfgDao;
|
import com.nis.web.dao.configuration.MailCfgDao;
|
||||||
|
import com.nis.web.dao.configuration.StringCfgDao;
|
||||||
import com.nis.web.security.UserUtils;
|
import com.nis.web.security.UserUtils;
|
||||||
import com.nis.web.service.CrudService;
|
import com.nis.web.service.CrudService;
|
||||||
|
|
||||||
@@ -51,6 +53,10 @@ public class MailCfgService extends CrudService<MailCfgDao,CfgIndexInfo> {
|
|||||||
protected MailCfgDao mailCfgDao;
|
protected MailCfgDao mailCfgDao;
|
||||||
@Autowired
|
@Autowired
|
||||||
protected AreaIpCfgDao areaIpCfgDao;
|
protected AreaIpCfgDao areaIpCfgDao;
|
||||||
|
@Autowired
|
||||||
|
protected StringCfgDao stringCfgDao;
|
||||||
|
|
||||||
|
|
||||||
public Page<CfgIndexInfo> getMailList(Page<CfgIndexInfo> page, CfgIndexInfo entity){
|
public Page<CfgIndexInfo> getMailList(Page<CfgIndexInfo> page, CfgIndexInfo entity){
|
||||||
// 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL)
|
// 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL)
|
||||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a"));
|
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a"));
|
||||||
@@ -65,9 +71,11 @@ public class MailCfgService extends CrudService<MailCfgDao,CfgIndexInfo> {
|
|||||||
List<ComplexkeywordCfg> keywordList = mailCfgDao.getMailKeywordList(entity);
|
List<ComplexkeywordCfg> keywordList = mailCfgDao.getMailKeywordList(entity);
|
||||||
List<FileDigestCfg> digestList = mailCfgDao.getMailFileDigestList(entity);
|
List<FileDigestCfg> digestList = mailCfgDao.getMailFileDigestList(entity);
|
||||||
List<AreaIpCfg> areaCfg = areaIpCfgDao.getByCompileId(entity.getCompileId());
|
List<AreaIpCfg> areaCfg = areaIpCfgDao.getByCompileId(entity.getCompileId());
|
||||||
|
List<NtcSubscribeIdCfg> ntcSubscribeIdList = stringCfgDao.findSubscribeIdCfgListByCfgIndexInfo(entity);
|
||||||
entity.setIpPortList(ipPortList);
|
entity.setIpPortList(ipPortList);
|
||||||
entity.setComplexList(keywordList);
|
entity.setComplexList(keywordList);
|
||||||
entity.setDigestList(digestList);
|
entity.setDigestList(digestList);
|
||||||
|
entity.setNtcSubscribeIdCfgList(ntcSubscribeIdList);
|
||||||
entity.setAreaCfg(areaCfg);
|
entity.setAreaCfg(areaCfg);
|
||||||
return entity;
|
return entity;
|
||||||
}
|
}
|
||||||
@@ -79,6 +87,10 @@ public class MailCfgService extends CrudService<MailCfgDao,CfgIndexInfo> {
|
|||||||
public void saveMailCfg(CfgIndexInfo entity,ToMaatResult result){
|
public void saveMailCfg(CfgIndexInfo entity,ToMaatResult result){
|
||||||
//设置区域运营商信息
|
//设置区域运营商信息
|
||||||
setAreaEffectiveIds(entity);
|
setAreaEffectiveIds(entity);
|
||||||
|
|
||||||
|
entity.setIsValid(0);
|
||||||
|
entity.setIsAudit(0);
|
||||||
|
|
||||||
if(entity.getCfgId()==null){
|
if(entity.getCfgId()==null){
|
||||||
Integer compileId = 0;
|
Integer compileId = 0;
|
||||||
try {
|
try {
|
||||||
@@ -86,58 +98,67 @@ public class MailCfgService extends CrudService<MailCfgDao,CfgIndexInfo> {
|
|||||||
if(idList!=null && idList.size()>0){
|
if(idList!=null && idList.size()>0){
|
||||||
compileId = idList.get(0);
|
compileId = idList.get(0);
|
||||||
}
|
}
|
||||||
entity.setCompileId(compileId);
|
} catch (MaatConvertException e) {
|
||||||
entity.setCreateTime(new Date());
|
|
||||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
|
||||||
mailCfgDao.saveCfgIndex(entity);
|
|
||||||
if(entity.getIpPortList()!=null){
|
|
||||||
for(IpPortCfg cfg:entity.getIpPortList()){
|
|
||||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
|
||||||
mailCfgDao.saveIpPortCfg(cfg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(entity.getComplexList()!=null){
|
|
||||||
for(ComplexkeywordCfg cfg:entity.getComplexList()){
|
|
||||||
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
|
||||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
|
||||||
if(StringUtils.isNoneBlank(cfg.getDistrictShowName()) && cfg.getDistrict().equals("others")){
|
|
||||||
cfg.setDistrict(cfg.getDistrictShowName());
|
|
||||||
}
|
|
||||||
mailCfgDao.saveMailKeywordCfg(cfg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(entity.getDigestList()!=null){
|
|
||||||
for(FileDigestCfg cfg:entity.getDigestList()){
|
|
||||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
|
||||||
if(result!=null && result.getData()!=null){
|
|
||||||
cfg.setRawLen(result.getData().getRawLen());
|
|
||||||
cfg.setDigest(result.getData().getDigest());
|
|
||||||
cfg.setFileUrl(result.getData().getAccessUrl());
|
|
||||||
}
|
|
||||||
mailCfgDao.saveMailFileDigestCfg(cfg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//保存区域IP信息
|
|
||||||
if(entity.getAreaCfg()!=null){
|
|
||||||
for(AreaIpCfg cfg:entity.getAreaCfg()){
|
|
||||||
cfg.initDefaultValue();
|
|
||||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
|
||||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
logger.info("获取编译ID出错");
|
logger.info("获取编译ID出错");
|
||||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
|
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
||||||
|
}
|
||||||
|
entity.setCompileId(compileId);
|
||||||
|
entity.setCreateTime(new Date());
|
||||||
|
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||||
|
mailCfgDao.saveCfgIndex(entity);
|
||||||
|
if(entity.getIpPortList()!=null){
|
||||||
|
for(IpPortCfg cfg:entity.getIpPortList()){
|
||||||
|
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||||
|
mailCfgDao.saveIpPortCfg(cfg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(entity.getComplexList()!=null){
|
||||||
|
for(ComplexkeywordCfg cfg:entity.getComplexList()){
|
||||||
|
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||||
|
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||||
|
if(StringUtils.isNoneBlank(cfg.getDistrictShowName()) && cfg.getDistrict().equals("others")){
|
||||||
|
cfg.setDistrict(cfg.getDistrictShowName());
|
||||||
|
}
|
||||||
|
mailCfgDao.saveMailKeywordCfg(cfg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(entity.getDigestList()!=null){
|
||||||
|
for(FileDigestCfg cfg:entity.getDigestList()){
|
||||||
|
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||||
|
if(result!=null && result.getData()!=null){
|
||||||
|
cfg.setRawLen(result.getData().getRawLen());
|
||||||
|
cfg.setDigest(result.getData().getDigest());
|
||||||
|
cfg.setFileUrl(result.getData().getAccessUrl());
|
||||||
|
}
|
||||||
|
mailCfgDao.saveMailFileDigestCfg(cfg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(entity.getNtcSubscribeIdCfgList()!=null){
|
||||||
|
for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){
|
||||||
|
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||||
|
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||||
|
stringCfgDao.saveSubscribeIdCfg(cfg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//保存区域IP信息
|
||||||
|
if(entity.getAreaCfg()!=null){
|
||||||
|
for(AreaIpCfg cfg:entity.getAreaCfg()){
|
||||||
|
cfg.initDefaultValue();
|
||||||
|
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||||
|
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||||
|
}
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
mailCfgDao.updateCfgIndex(entity);
|
mailCfgDao.updateCfgIndex(entity);
|
||||||
//无效子配置后,再新增子配置
|
//无效子配置后,再新增子配置
|
||||||
mailCfgDao.deleteMailIpCfg(entity);
|
mailCfgDao.deleteMailIpCfg(entity);
|
||||||
mailCfgDao.deleteMailKeywordCfg(entity);
|
mailCfgDao.deleteMailKeywordCfg(entity);
|
||||||
mailCfgDao.deleteMailFileDigestCfg(entity);
|
mailCfgDao.deleteMailFileDigestCfg(entity);
|
||||||
|
stringCfgDao.deleteSubscribeIdCfgByCfgIndexInfo(entity);
|
||||||
AreaIpCfg area = new AreaIpCfg();
|
AreaIpCfg area = new AreaIpCfg();
|
||||||
area.setCompileId(entity.getCompileId());
|
area.setCompileId(entity.getCompileId());
|
||||||
area.setFunctionId(entity.getFunctionId());
|
area.setFunctionId(entity.getFunctionId());
|
||||||
@@ -172,6 +193,14 @@ public class MailCfgService extends CrudService<MailCfgDao,CfgIndexInfo> {
|
|||||||
mailCfgDao.saveMailFileDigestCfg(cfg);
|
mailCfgDao.saveMailFileDigestCfg(cfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(entity.getNtcSubscribeIdCfgList()!=null){
|
||||||
|
for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){
|
||||||
|
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||||
|
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||||
|
stringCfgDao.saveSubscribeIdCfg(cfg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
//保存区域IP信息
|
//保存区域IP信息
|
||||||
if(entity.getAreaCfg()!=null){
|
if(entity.getAreaCfg()!=null){
|
||||||
for(AreaIpCfg cfg:entity.getAreaCfg()){
|
for(AreaIpCfg cfg:entity.getAreaCfg()){
|
||||||
@@ -208,6 +237,13 @@ public class MailCfgService extends CrudService<MailCfgDao,CfgIndexInfo> {
|
|||||||
cfg.setTableName(MailKeywordCfg.getTablename());
|
cfg.setTableName(MailKeywordCfg.getTablename());
|
||||||
mailCfgDao.updateCfgValid(cfg);
|
mailCfgDao.updateCfgValid(cfg);
|
||||||
}
|
}
|
||||||
|
if(entity.getNtcSubscribeIdCfgList()!=null && entity.getNtcSubscribeIdCfgList().size()>0)
|
||||||
|
{
|
||||||
|
NtcSubscribeIdCfg cfg = new NtcSubscribeIdCfg();
|
||||||
|
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||||
|
cfg.setTableName(NtcSubscribeIdCfg.getTablename());
|
||||||
|
mailCfgDao.updateCfgValid(cfg);
|
||||||
|
}
|
||||||
//保存区域IP信息
|
//保存区域IP信息
|
||||||
if(entity.getAreaCfg()!=null && entity.getAreaCfg().size()>0){
|
if(entity.getAreaCfg()!=null && entity.getAreaCfg().size()>0){
|
||||||
AreaIpCfg cfg = new AreaIpCfg();
|
AreaIpCfg cfg = new AreaIpCfg();
|
||||||
@@ -272,6 +308,19 @@ public class MailCfgService extends CrudService<MailCfgDao,CfgIndexInfo> {
|
|||||||
digestRegionList=map.get("dstList");
|
digestRegionList=map.get("dstList");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(entity.getNtcSubscribeIdCfgList()!=null && entity.getNtcSubscribeIdCfgList().size()>0){
|
||||||
|
NtcSubscribeIdCfg cfg = new NtcSubscribeIdCfg();
|
||||||
|
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||||
|
cfg.setTableName(NtcSubscribeIdCfg.getTablename());
|
||||||
|
mailCfgDao.auditCfg(cfg);
|
||||||
|
if(isAudit==1){
|
||||||
|
Map<String,List> map = cfgConvert(strRegionList,entity.getNtcSubscribeIdCfgList(),2,entity,groupRelationList);
|
||||||
|
groupRelationList=map.get("groupList");
|
||||||
|
strRegionList=map.get("dstList");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//保存区域IP信息
|
//保存区域IP信息
|
||||||
if(entity.getAreaCfg()!=null && entity.getAreaCfg().size()>0){
|
if(entity.getAreaCfg()!=null && entity.getAreaCfg().size()>0){
|
||||||
AreaIpCfg cfg = new AreaIpCfg();
|
AreaIpCfg cfg = new AreaIpCfg();
|
||||||
|
|||||||
@@ -1,29 +1,17 @@
|
|||||||
package com.nis.web.service.configuration;
|
package com.nis.web.service.configuration;
|
||||||
|
|
||||||
import java.beans.PropertyDescriptor;
|
|
||||||
import java.lang.reflect.Method;
|
|
||||||
import java.lang.reflect.Modifier;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.BeansException;
|
|
||||||
import org.springframework.beans.FatalBeanException;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.util.Assert;
|
|
||||||
import org.springframework.util.ClassUtils;
|
|
||||||
|
|
||||||
import com.nis.domain.Page;
|
import com.nis.domain.Page;
|
||||||
import com.nis.domain.configuration.AreaIpCfg;
|
import com.nis.domain.configuration.AreaIpCfg;
|
||||||
import com.nis.domain.configuration.AvFileSampleCfg;
|
|
||||||
import com.nis.domain.configuration.AvSignSampleCfg;
|
|
||||||
import com.nis.domain.configuration.BaseIpCfg;
|
|
||||||
import com.nis.domain.configuration.BaseStringCfg;
|
import com.nis.domain.configuration.BaseStringCfg;
|
||||||
import com.nis.domain.configuration.CfgIndexInfo;
|
import com.nis.domain.configuration.CfgIndexInfo;
|
||||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||||
@@ -33,6 +21,7 @@ import com.nis.domain.configuration.HttpReqHeadCfg;
|
|||||||
import com.nis.domain.configuration.HttpResHeadCfg;
|
import com.nis.domain.configuration.HttpResHeadCfg;
|
||||||
import com.nis.domain.configuration.HttpUrlCfg;
|
import com.nis.domain.configuration.HttpUrlCfg;
|
||||||
import com.nis.domain.configuration.IpPortCfg;
|
import com.nis.domain.configuration.IpPortCfg;
|
||||||
|
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||||
import com.nis.domain.configuration.SslKeywordCfg;
|
import com.nis.domain.configuration.SslKeywordCfg;
|
||||||
import com.nis.domain.maat.MaatCfg;
|
import com.nis.domain.maat.MaatCfg;
|
||||||
import com.nis.domain.maat.MaatCfg.NumBoundaryCfg;
|
import com.nis.domain.maat.MaatCfg.NumBoundaryCfg;
|
||||||
@@ -46,14 +35,11 @@ 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.DictUtils;
|
||||||
import com.nis.util.IpUtil;
|
|
||||||
import com.nis.util.StringUtil;
|
import com.nis.util.StringUtil;
|
||||||
import com.nis.web.dao.configuration.AreaIpCfgDao;
|
import com.nis.web.dao.configuration.AreaIpCfgDao;
|
||||||
import com.nis.web.dao.configuration.IpCfgDao;
|
|
||||||
import com.nis.web.dao.configuration.StringCfgDao;
|
import com.nis.web.dao.configuration.StringCfgDao;
|
||||||
import com.nis.web.dao.configuration.WebsiteCfgDao;
|
import com.nis.web.dao.configuration.WebsiteCfgDao;
|
||||||
import com.nis.web.security.UserUtils;
|
import com.nis.web.security.UserUtils;
|
||||||
import com.nis.web.service.BaseService;
|
|
||||||
import com.nis.web.service.CrudService;
|
import com.nis.web.service.CrudService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -67,6 +53,8 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
protected WebsiteCfgDao websiteCfgDao;
|
protected WebsiteCfgDao websiteCfgDao;
|
||||||
@Autowired
|
@Autowired
|
||||||
protected AreaIpCfgDao areaIpCfgDao;
|
protected AreaIpCfgDao areaIpCfgDao;
|
||||||
|
@Autowired
|
||||||
|
protected StringCfgDao stringCfgDao;
|
||||||
|
|
||||||
public CfgIndexInfo getHttpCfg(Long cfgId){
|
public CfgIndexInfo getHttpCfg(Long cfgId){
|
||||||
CfgIndexInfo entity = websiteCfgDao.getCfgIndexInfo(cfgId);
|
CfgIndexInfo entity = websiteCfgDao.getCfgIndexInfo(cfgId);
|
||||||
@@ -74,6 +62,7 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
List<HttpUrlCfg> httpUrlList = websiteCfgDao.getHttpUrlList(entity);
|
List<HttpUrlCfg> httpUrlList = websiteCfgDao.getHttpUrlList(entity);
|
||||||
List<HttpReqHeadCfg> httpReqHdrList = websiteCfgDao.getHttpReqHdrList(entity);
|
List<HttpReqHeadCfg> httpReqHdrList = websiteCfgDao.getHttpReqHdrList(entity);
|
||||||
List<HttpResHeadCfg> httpResHdrList = websiteCfgDao.getHttpResHdrList(entity);
|
List<HttpResHeadCfg> httpResHdrList = websiteCfgDao.getHttpResHdrList(entity);
|
||||||
|
List<NtcSubscribeIdCfg> subscribeIdList = stringCfgDao.findSubscribeIdCfgListByCfgIndexInfo(entity);
|
||||||
entity.setCfgType(Constants.HTTP_REQ_BODY_REGION);
|
entity.setCfgType(Constants.HTTP_REQ_BODY_REGION);
|
||||||
List<HttpBodyCfg> httpReqBodyList = websiteCfgDao.getHttpReqBodyList(entity);
|
List<HttpBodyCfg> httpReqBodyList = websiteCfgDao.getHttpReqBodyList(entity);
|
||||||
entity.setCfgType(Constants.HTTP_RES_BODY_REGION);
|
entity.setCfgType(Constants.HTTP_RES_BODY_REGION);
|
||||||
@@ -84,13 +73,16 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
entity.setHttpResBodyList(httpResBodyList);
|
entity.setHttpResBodyList(httpResBodyList);
|
||||||
entity.setHttpResHdrList(httpResHdrList);
|
entity.setHttpResHdrList(httpResHdrList);
|
||||||
entity.setHttpUrlList(httpUrlList);
|
entity.setHttpUrlList(httpUrlList);
|
||||||
|
entity.setNtcSubscribeIdCfgList(subscribeIdList);
|
||||||
return entity;
|
return entity;
|
||||||
}
|
}
|
||||||
public CfgIndexInfo getSslCfg(Long cfgId){
|
public CfgIndexInfo getSslCfg(Long cfgId){
|
||||||
CfgIndexInfo entity = websiteCfgDao.getCfgIndexInfo(cfgId);
|
CfgIndexInfo entity = websiteCfgDao.getCfgIndexInfo(cfgId);
|
||||||
List<IpPortCfg> ipPortList = websiteCfgDao.getIpPortList(entity);
|
List<IpPortCfg> ipPortList = websiteCfgDao.getIpPortList(entity);
|
||||||
List<BaseStringCfg> sslList = websiteCfgDao.getSslKewordList(entity);
|
List<BaseStringCfg> sslList = websiteCfgDao.getSslKewordList(entity);
|
||||||
|
List<NtcSubscribeIdCfg> subscribeIdList = stringCfgDao.findSubscribeIdCfgListByCfgIndexInfo(entity);
|
||||||
entity.setIpPortList(ipPortList);
|
entity.setIpPortList(ipPortList);
|
||||||
|
entity.setNtcSubscribeIdCfgList(subscribeIdList);
|
||||||
entity.setSslList(sslList);
|
entity.setSslList(sslList);
|
||||||
return entity;
|
return entity;
|
||||||
}
|
}
|
||||||
@@ -98,8 +90,10 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
CfgIndexInfo entity = websiteCfgDao.getCfgIndexInfo(cfgId);
|
CfgIndexInfo entity = websiteCfgDao.getCfgIndexInfo(cfgId);
|
||||||
List<IpPortCfg> ipPortList = websiteCfgDao.getIpPortList(entity);
|
List<IpPortCfg> ipPortList = websiteCfgDao.getIpPortList(entity);
|
||||||
List<ComplexkeywordCfg> domainList = websiteCfgDao.getDnsDomainList(entity);
|
List<ComplexkeywordCfg> domainList = websiteCfgDao.getDnsDomainList(entity);
|
||||||
|
List<NtcSubscribeIdCfg> subscribeIdList = stringCfgDao.findSubscribeIdCfgListByCfgIndexInfo(entity);
|
||||||
entity.setIpPortList(ipPortList);
|
entity.setIpPortList(ipPortList);
|
||||||
entity.setDomainList(domainList);
|
entity.setDomainList(domainList);
|
||||||
|
entity.setNtcSubscribeIdCfgList(subscribeIdList);
|
||||||
return entity;
|
return entity;
|
||||||
}
|
}
|
||||||
public Page<CfgIndexInfo> getWebsiteList(Page<CfgIndexInfo> page, CfgIndexInfo entity){
|
public Page<CfgIndexInfo> getWebsiteList(Page<CfgIndexInfo> page, CfgIndexInfo entity){
|
||||||
@@ -113,6 +107,10 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
public void saveHttpCfg(CfgIndexInfo entity){
|
public void saveHttpCfg(CfgIndexInfo entity){
|
||||||
//设置区域运营商信息
|
//设置区域运营商信息
|
||||||
setAreaEffectiveIds(entity);
|
setAreaEffectiveIds(entity);
|
||||||
|
|
||||||
|
entity.setIsValid(0);
|
||||||
|
entity.setIsAudit(0);
|
||||||
|
|
||||||
if(entity.getCfgId()==null){
|
if(entity.getCfgId()==null){
|
||||||
Integer compileId = 0;
|
Integer compileId = 0;
|
||||||
try {
|
try {
|
||||||
@@ -120,64 +118,69 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
if(idList!=null && idList.size()>0){
|
if(idList!=null && idList.size()>0){
|
||||||
compileId = idList.get(0);
|
compileId = idList.get(0);
|
||||||
}
|
}
|
||||||
entity.setCompileId(compileId);
|
} catch (MaatConvertException e) {
|
||||||
entity.setCreateTime(new Date());
|
|
||||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
|
||||||
websiteCfgDao.saveCfgIndex(entity);
|
|
||||||
if(entity.getIpPortList()!=null){
|
|
||||||
for(IpPortCfg cfg:entity.getIpPortList()){
|
|
||||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
|
||||||
websiteCfgDao.saveIpPortCfg(cfg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(entity.getHttpUrlList()!=null){
|
|
||||||
for(HttpUrlCfg cfg:entity.getHttpUrlList()){
|
|
||||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
|
||||||
websiteCfgDao.saveHttpUrlCfg(cfg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(entity.getHttpReqHdrList()!=null){
|
|
||||||
for(HttpReqHeadCfg cfg:entity.getHttpReqHdrList()){
|
|
||||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
|
||||||
if(StringUtils.isNoneBlank(cfg.getDistrictShowName()) && cfg.getDistrict().equals("others")){
|
|
||||||
cfg.setDistrict(cfg.getDistrictShowName());
|
|
||||||
}
|
|
||||||
websiteCfgDao.saveHttpReqHdrCfg(cfg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(entity.getHttpResHdrList()!=null){
|
|
||||||
for(HttpResHeadCfg cfg:entity.getHttpResHdrList()){
|
|
||||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
|
||||||
if(StringUtils.isNoneBlank(cfg.getDistrictShowName()) && cfg.getDistrict().equals("others")){
|
|
||||||
cfg.setDistrict(cfg.getDistrictShowName());
|
|
||||||
}
|
|
||||||
websiteCfgDao.saveHttpResHdrCfg(cfg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(entity.getHttpReqBodyList()!=null){
|
|
||||||
for(HttpBodyCfg cfg:entity.getHttpReqBodyList()){
|
|
||||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
|
||||||
websiteCfgDao.saveHttpBodyCfg(cfg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(entity.getHttpResBodyList()!=null){
|
|
||||||
for(HttpBodyCfg cfg:entity.getHttpResBodyList()){
|
|
||||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
|
||||||
websiteCfgDao.saveHttpBodyCfg(cfg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//保存区域IP信息
|
|
||||||
if(entity.getAreaCfg()!=null){
|
|
||||||
for(AreaIpCfg cfg:entity.getAreaCfg()){
|
|
||||||
cfg.initDefaultValue();
|
|
||||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
|
||||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
logger.info("获取编译ID出错");
|
logger.info("获取编译ID出错");
|
||||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
|
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
||||||
|
}
|
||||||
|
entity.setCompileId(compileId);
|
||||||
|
entity.setCreateTime(new Date());
|
||||||
|
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||||
|
websiteCfgDao.saveCfgIndex(entity);
|
||||||
|
if(entity.getIpPortList()!=null){
|
||||||
|
for(IpPortCfg cfg:entity.getIpPortList()){
|
||||||
|
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||||
|
websiteCfgDao.saveIpPortCfg(cfg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(entity.getHttpUrlList()!=null){
|
||||||
|
for(HttpUrlCfg cfg:entity.getHttpUrlList()){
|
||||||
|
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||||
|
websiteCfgDao.saveHttpUrlCfg(cfg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(entity.getHttpReqHdrList()!=null){
|
||||||
|
for(HttpReqHeadCfg cfg:entity.getHttpReqHdrList()){
|
||||||
|
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||||
|
if(StringUtils.isNoneBlank(cfg.getDistrictShowName()) && cfg.getDistrict().equals("others")){
|
||||||
|
cfg.setDistrict(cfg.getDistrictShowName());
|
||||||
|
}
|
||||||
|
websiteCfgDao.saveHttpReqHdrCfg(cfg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(entity.getHttpResHdrList()!=null){
|
||||||
|
for(HttpResHeadCfg cfg:entity.getHttpResHdrList()){
|
||||||
|
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||||
|
if(StringUtils.isNoneBlank(cfg.getDistrictShowName()) && cfg.getDistrict().equals("others")){
|
||||||
|
cfg.setDistrict(cfg.getDistrictShowName());
|
||||||
|
}
|
||||||
|
websiteCfgDao.saveHttpResHdrCfg(cfg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(entity.getHttpReqBodyList()!=null){
|
||||||
|
for(HttpBodyCfg cfg:entity.getHttpReqBodyList()){
|
||||||
|
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||||
|
websiteCfgDao.saveHttpBodyCfg(cfg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(entity.getHttpResBodyList()!=null){
|
||||||
|
for(HttpBodyCfg cfg:entity.getHttpResBodyList()){
|
||||||
|
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||||
|
websiteCfgDao.saveHttpBodyCfg(cfg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(entity.getNtcSubscribeIdCfgList()!=null){
|
||||||
|
for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){
|
||||||
|
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||||
|
stringCfgDao.saveSubscribeIdCfg(cfg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//保存区域IP信息
|
||||||
|
if(entity.getAreaCfg()!=null){
|
||||||
|
for(AreaIpCfg cfg:entity.getAreaCfg()){
|
||||||
|
cfg.initDefaultValue();
|
||||||
|
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||||
|
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
@@ -188,6 +191,7 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
websiteCfgDao.deleteHttpReqHdrCfg(entity);
|
websiteCfgDao.deleteHttpReqHdrCfg(entity);
|
||||||
websiteCfgDao.deleteHttpResHdrCfg(entity);
|
websiteCfgDao.deleteHttpResHdrCfg(entity);
|
||||||
websiteCfgDao.deleteHttpBodyCfg(entity);
|
websiteCfgDao.deleteHttpBodyCfg(entity);
|
||||||
|
stringCfgDao.deleteSubscribeIdCfgByCfgIndexInfo(entity);
|
||||||
AreaIpCfg area = new AreaIpCfg();
|
AreaIpCfg area = new AreaIpCfg();
|
||||||
area.setCompileId(entity.getCompileId());
|
area.setCompileId(entity.getCompileId());
|
||||||
area.setFunctionId(entity.getFunctionId());
|
area.setFunctionId(entity.getFunctionId());
|
||||||
@@ -236,6 +240,12 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
websiteCfgDao.saveHttpBodyCfg(cfg);
|
websiteCfgDao.saveHttpBodyCfg(cfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(entity.getNtcSubscribeIdCfgList()!=null){
|
||||||
|
for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){
|
||||||
|
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||||
|
stringCfgDao.saveSubscribeIdCfg(cfg);
|
||||||
|
}
|
||||||
|
}
|
||||||
//保存区域IP信息
|
//保存区域IP信息
|
||||||
if(entity.getAreaCfg()!=null){
|
if(entity.getAreaCfg()!=null){
|
||||||
for(AreaIpCfg cfg:entity.getAreaCfg()){
|
for(AreaIpCfg cfg:entity.getAreaCfg()){
|
||||||
@@ -290,6 +300,12 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
cfg.setTableName(HttpBodyCfg.getTablename());
|
cfg.setTableName(HttpBodyCfg.getTablename());
|
||||||
websiteCfgDao.updateCfgValid(cfg);
|
websiteCfgDao.updateCfgValid(cfg);
|
||||||
}
|
}
|
||||||
|
if(entity.getNtcSubscribeIdCfgList()!=null && entity.getNtcSubscribeIdCfgList().size()>0){
|
||||||
|
NtcSubscribeIdCfg cfg = new NtcSubscribeIdCfg();
|
||||||
|
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||||
|
cfg.setTableName(NtcSubscribeIdCfg.getTablename());
|
||||||
|
websiteCfgDao.updateCfgValid(cfg);
|
||||||
|
}
|
||||||
//保存区域IP信息
|
//保存区域IP信息
|
||||||
if(entity.getAreaCfg()!=null && entity.getAreaCfg().size()>0){
|
if(entity.getAreaCfg()!=null && entity.getAreaCfg().size()>0){
|
||||||
AreaIpCfg cfg = new AreaIpCfg();
|
AreaIpCfg cfg = new AreaIpCfg();
|
||||||
@@ -384,6 +400,17 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(entity.getNtcSubscribeIdCfgList()!=null && entity.getNtcSubscribeIdCfgList().size()>0){
|
||||||
|
NtcSubscribeIdCfg cfg = new NtcSubscribeIdCfg();
|
||||||
|
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||||
|
cfg.setTableName(NtcSubscribeIdCfg.getTablename());
|
||||||
|
websiteCfgDao.auditCfg(cfg);
|
||||||
|
if(isAudit==1){
|
||||||
|
Map<String,List> map = cfgConvert(strRegionList,entity.getNtcSubscribeIdCfgList(),2,entity,groupRelationList);
|
||||||
|
groupRelationList=map.get("groupList");
|
||||||
|
strRegionList=map.get("dstList");
|
||||||
|
}
|
||||||
|
}
|
||||||
//保存区域IP信息
|
//保存区域IP信息
|
||||||
List<AreaIpCfg> areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId());
|
List<AreaIpCfg> areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId());
|
||||||
if(!StringUtil.isEmpty(areaIpCfgList)){
|
if(!StringUtil.isEmpty(areaIpCfgList)){
|
||||||
@@ -482,6 +509,10 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
public void saveSslCfg(CfgIndexInfo entity){
|
public void saveSslCfg(CfgIndexInfo entity){
|
||||||
//设置区域运营商信息
|
//设置区域运营商信息
|
||||||
setAreaEffectiveIds(entity);
|
setAreaEffectiveIds(entity);
|
||||||
|
|
||||||
|
entity.setIsValid(0);
|
||||||
|
entity.setIsAudit(0);
|
||||||
|
|
||||||
if(entity.getCfgId()==null){
|
if(entity.getCfgId()==null){
|
||||||
Integer compileId = 0;
|
Integer compileId = 0;
|
||||||
try {
|
try {
|
||||||
@@ -489,36 +520,43 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
if(idList!=null && idList.size()>0){
|
if(idList!=null && idList.size()>0){
|
||||||
compileId = idList.get(0);
|
compileId = idList.get(0);
|
||||||
}
|
}
|
||||||
entity.setCompileId(compileId);
|
} catch (MaatConvertException e) {
|
||||||
entity.setCreateTime(new Date());
|
|
||||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
|
||||||
websiteCfgDao.saveCfgIndex(entity);
|
|
||||||
if(entity.getIpPortList()!=null){
|
|
||||||
for(IpPortCfg cfg:entity.getIpPortList()){
|
|
||||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
|
||||||
websiteCfgDao.saveIpPortCfg(cfg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(entity.getSslList()!=null){
|
|
||||||
for(BaseStringCfg cfg:entity.getSslList()){
|
|
||||||
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
|
||||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
|
||||||
websiteCfgDao.saveSslKeywordCfg(cfg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//保存区域IP信息
|
|
||||||
if(entity.getAreaCfg()!=null){
|
|
||||||
for(AreaIpCfg cfg:entity.getAreaCfg()){
|
|
||||||
cfg.initDefaultValue();
|
|
||||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
|
||||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
logger.info("获取编译ID出错");
|
logger.info("获取编译ID出错");
|
||||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
|
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
||||||
|
}
|
||||||
|
entity.setCompileId(compileId);
|
||||||
|
entity.setCreateTime(new Date());
|
||||||
|
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||||
|
websiteCfgDao.saveCfgIndex(entity);
|
||||||
|
if(entity.getIpPortList()!=null){
|
||||||
|
for(IpPortCfg cfg:entity.getIpPortList()){
|
||||||
|
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||||
|
websiteCfgDao.saveIpPortCfg(cfg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(entity.getSslList()!=null){
|
||||||
|
for(BaseStringCfg cfg:entity.getSslList()){
|
||||||
|
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||||
|
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||||
|
websiteCfgDao.saveSslKeywordCfg(cfg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(entity.getSslList()!=null){
|
||||||
|
for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){
|
||||||
|
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||||
|
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||||
|
stringCfgDao.saveSubscribeIdCfg(cfg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//保存区域IP信息
|
||||||
|
if(entity.getAreaCfg()!=null){
|
||||||
|
for(AreaIpCfg cfg:entity.getAreaCfg()){
|
||||||
|
cfg.initDefaultValue();
|
||||||
|
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||||
|
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
@@ -526,6 +564,7 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
//无效子配置后,再新增子配置
|
//无效子配置后,再新增子配置
|
||||||
websiteCfgDao.deleteSslIpCfg(entity);
|
websiteCfgDao.deleteSslIpCfg(entity);
|
||||||
websiteCfgDao.deleteSslKeywordCfg(entity);
|
websiteCfgDao.deleteSslKeywordCfg(entity);
|
||||||
|
stringCfgDao.deleteSubscribeIdCfgByCfgIndexInfo(entity);
|
||||||
AreaIpCfg area = new AreaIpCfg();
|
AreaIpCfg area = new AreaIpCfg();
|
||||||
area.setCompileId(entity.getCompileId());
|
area.setCompileId(entity.getCompileId());
|
||||||
area.setFunctionId(entity.getFunctionId());
|
area.setFunctionId(entity.getFunctionId());
|
||||||
@@ -546,6 +585,14 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(entity.getNtcSubscribeIdCfgList()!=null){
|
||||||
|
for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){
|
||||||
|
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||||
|
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||||
|
stringCfgDao.saveSubscribeIdCfg(cfg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
//保存区域IP信息
|
//保存区域IP信息
|
||||||
if(entity.getAreaCfg()!=null){
|
if(entity.getAreaCfg()!=null){
|
||||||
for(AreaIpCfg cfg:entity.getAreaCfg()){
|
for(AreaIpCfg cfg:entity.getAreaCfg()){
|
||||||
@@ -582,6 +629,13 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
cfg.setTableName(SslKeywordCfg.getTablename());
|
cfg.setTableName(SslKeywordCfg.getTablename());
|
||||||
websiteCfgDao.updateCfgValid(cfg);
|
websiteCfgDao.updateCfgValid(cfg);
|
||||||
}
|
}
|
||||||
|
if(entity.getNtcSubscribeIdCfgList()!=null && entity.getNtcSubscribeIdCfgList().size()>0)
|
||||||
|
{
|
||||||
|
NtcSubscribeIdCfg cfg = new NtcSubscribeIdCfg();
|
||||||
|
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||||
|
cfg.setTableName(NtcSubscribeIdCfg.getTablename());
|
||||||
|
websiteCfgDao.updateCfgValid(cfg);
|
||||||
|
}
|
||||||
//保存区域IP信息
|
//保存区域IP信息
|
||||||
if(entity.getAreaCfg()!=null && entity.getAreaCfg().size()>0){
|
if(entity.getAreaCfg()!=null && entity.getAreaCfg().size()>0){
|
||||||
AreaIpCfg cfg = new AreaIpCfg();
|
AreaIpCfg cfg = new AreaIpCfg();
|
||||||
@@ -635,6 +689,17 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
strRegionList=map.get("dstList");
|
strRegionList=map.get("dstList");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(entity.getNtcSubscribeIdCfgList()!=null && entity.getNtcSubscribeIdCfgList().size()>0){
|
||||||
|
NtcSubscribeIdCfg cfg = new NtcSubscribeIdCfg();
|
||||||
|
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||||
|
cfg.setTableName(NtcSubscribeIdCfg.getTablename());
|
||||||
|
websiteCfgDao.auditCfg(cfg);
|
||||||
|
if(isAudit==1){
|
||||||
|
Map<String,List> map = cfgConvert(strRegionList,entity.getNtcSubscribeIdCfgList(),2,entity,groupRelationList);
|
||||||
|
groupRelationList=map.get("groupList");
|
||||||
|
strRegionList=map.get("dstList");
|
||||||
|
}
|
||||||
|
}
|
||||||
//保存区域IP信息
|
//保存区域IP信息
|
||||||
List<AreaIpCfg> areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId());
|
List<AreaIpCfg> areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId());
|
||||||
if(!StringUtil.isEmpty(areaIpCfgList)){
|
if(!StringUtil.isEmpty(areaIpCfgList)){
|
||||||
@@ -703,6 +768,10 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
public void saveDnsCfg(CfgIndexInfo entity){
|
public void saveDnsCfg(CfgIndexInfo entity){
|
||||||
//设置区域运营商信息
|
//设置区域运营商信息
|
||||||
setAreaEffectiveIds(entity);
|
setAreaEffectiveIds(entity);
|
||||||
|
|
||||||
|
entity.setIsValid(0);
|
||||||
|
entity.setIsAudit(0);
|
||||||
|
|
||||||
if(entity.getCfgId()==null){
|
if(entity.getCfgId()==null){
|
||||||
Integer compileId = 0;
|
Integer compileId = 0;
|
||||||
try {
|
try {
|
||||||
@@ -710,39 +779,46 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
if(idList!=null && idList.size()>0){
|
if(idList!=null && idList.size()>0){
|
||||||
compileId = idList.get(0);
|
compileId = idList.get(0);
|
||||||
}
|
}
|
||||||
entity.setCompileId(compileId);
|
} catch (MaatConvertException e) {
|
||||||
entity.setCreateTime(new Date());
|
|
||||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
|
||||||
websiteCfgDao.saveCfgIndex(entity);
|
|
||||||
if(entity.getIpPortList()!=null){
|
|
||||||
for(IpPortCfg cfg:entity.getIpPortList()){
|
|
||||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
|
||||||
websiteCfgDao.saveIpPortCfg(cfg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(entity.getDomainList()!=null){
|
|
||||||
for(ComplexkeywordCfg cfg:entity.getDomainList()){
|
|
||||||
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
|
||||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
|
||||||
if(StringUtils.isNoneBlank(cfg.getDistrictShowName()) && cfg.getDistrict().equals("others")){
|
|
||||||
cfg.setDistrict(cfg.getDistrictShowName());
|
|
||||||
}
|
|
||||||
websiteCfgDao.saveDnsDomainCfg(cfg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//保存区域IP信息
|
|
||||||
if(entity.getAreaCfg()!=null){
|
|
||||||
for(AreaIpCfg cfg:entity.getAreaCfg()){
|
|
||||||
cfg.initDefaultValue();
|
|
||||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
|
||||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
logger.info("获取编译ID出错");
|
logger.info("获取编译ID出错");
|
||||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
|
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
||||||
|
}
|
||||||
|
entity.setCompileId(compileId);
|
||||||
|
entity.setCreateTime(new Date());
|
||||||
|
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||||
|
websiteCfgDao.saveCfgIndex(entity);
|
||||||
|
if(entity.getIpPortList()!=null){
|
||||||
|
for(IpPortCfg cfg:entity.getIpPortList()){
|
||||||
|
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||||
|
websiteCfgDao.saveIpPortCfg(cfg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(entity.getDomainList()!=null){
|
||||||
|
for(ComplexkeywordCfg cfg:entity.getDomainList()){
|
||||||
|
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||||
|
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||||
|
if(StringUtils.isNoneBlank(cfg.getDistrictShowName()) && cfg.getDistrict().equals("others")){
|
||||||
|
cfg.setDistrict(cfg.getDistrictShowName());
|
||||||
|
}
|
||||||
|
websiteCfgDao.saveDnsDomainCfg(cfg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(entity.getNtcSubscribeIdCfgList()!=null){
|
||||||
|
for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){
|
||||||
|
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||||
|
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||||
|
stringCfgDao.saveSubscribeIdCfg(cfg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//保存区域IP信息
|
||||||
|
if(entity.getAreaCfg()!=null){
|
||||||
|
for(AreaIpCfg cfg:entity.getAreaCfg()){
|
||||||
|
cfg.initDefaultValue();
|
||||||
|
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||||
|
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
@@ -750,6 +826,7 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
//无效子配置后,再新增子配置
|
//无效子配置后,再新增子配置
|
||||||
websiteCfgDao.deleteDnsIpCfg(entity);
|
websiteCfgDao.deleteDnsIpCfg(entity);
|
||||||
websiteCfgDao.deleteDnsDomainCfg(entity);
|
websiteCfgDao.deleteDnsDomainCfg(entity);
|
||||||
|
stringCfgDao.deleteSubscribeIdCfgByCfgIndexInfo(entity);
|
||||||
AreaIpCfg area = new AreaIpCfg();
|
AreaIpCfg area = new AreaIpCfg();
|
||||||
area.setCompileId(entity.getCompileId());
|
area.setCompileId(entity.getCompileId());
|
||||||
area.setFunctionId(entity.getFunctionId());
|
area.setFunctionId(entity.getFunctionId());
|
||||||
@@ -773,6 +850,14 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(entity.getNtcSubscribeIdCfgList()!=null){
|
||||||
|
for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){
|
||||||
|
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||||
|
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||||
|
stringCfgDao.saveSubscribeIdCfg(cfg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
//保存区域IP信息
|
//保存区域IP信息
|
||||||
if(entity.getAreaCfg()!=null){
|
if(entity.getAreaCfg()!=null){
|
||||||
for(AreaIpCfg cfg:entity.getAreaCfg()){
|
for(AreaIpCfg cfg:entity.getAreaCfg()){
|
||||||
@@ -810,11 +895,18 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
}
|
}
|
||||||
if(entity.getDomainList()!=null && entity.getDomainList().size()>0)
|
if(entity.getDomainList()!=null && entity.getDomainList().size()>0)
|
||||||
{
|
{
|
||||||
SslKeywordCfg cfg = new SslKeywordCfg();
|
DnsDomainCfg cfg = new DnsDomainCfg();
|
||||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||||
cfg.setTableName(DnsDomainCfg.getTablename());
|
cfg.setTableName(DnsDomainCfg.getTablename());
|
||||||
websiteCfgDao.updateCfgValid(cfg);
|
websiteCfgDao.updateCfgValid(cfg);
|
||||||
}
|
}
|
||||||
|
if(entity.getNtcSubscribeIdCfgList()!=null && entity.getNtcSubscribeIdCfgList().size()>0)
|
||||||
|
{
|
||||||
|
NtcSubscribeIdCfg cfg = new NtcSubscribeIdCfg();
|
||||||
|
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||||
|
cfg.setTableName(NtcSubscribeIdCfg.getTablename());
|
||||||
|
websiteCfgDao.updateCfgValid(cfg);
|
||||||
|
}
|
||||||
//保存区域IP信息
|
//保存区域IP信息
|
||||||
if(entity.getAreaCfg()!=null && entity.getAreaCfg().size()>0){
|
if(entity.getAreaCfg()!=null && entity.getAreaCfg().size()>0){
|
||||||
AreaIpCfg cfg = new AreaIpCfg();
|
AreaIpCfg cfg = new AreaIpCfg();
|
||||||
@@ -874,6 +966,17 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
strRegionList=map.get("dstList");
|
strRegionList=map.get("dstList");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(entity.getNtcSubscribeIdCfgList()!=null && entity.getNtcSubscribeIdCfgList().size()>0){
|
||||||
|
NtcSubscribeIdCfg cfg = new NtcSubscribeIdCfg();
|
||||||
|
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||||
|
cfg.setTableName(NtcSubscribeIdCfg.getTablename());
|
||||||
|
websiteCfgDao.auditCfg(cfg);
|
||||||
|
if(isAudit==1){
|
||||||
|
Map<String,List> map = cfgConvert(strRegionList,entity.getNtcSubscribeIdCfgList(),2,entity,groupRelationList);
|
||||||
|
groupRelationList=map.get("groupList");
|
||||||
|
strRegionList=map.get("dstList");
|
||||||
|
}
|
||||||
|
}
|
||||||
//保存区域IP信息
|
//保存区域IP信息
|
||||||
List<AreaIpCfg> areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId());
|
List<AreaIpCfg> areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId());
|
||||||
if(!StringUtil.isEmpty(areaIpCfgList)){
|
if(!StringUtil.isEmpty(areaIpCfgList)){
|
||||||
|
|||||||
@@ -443,7 +443,7 @@ specific_service_cfg_type_basic_protocol=basic_protocol
|
|||||||
proto_id_region=PROTO_ID
|
proto_id_region=PROTO_ID
|
||||||
#拦截IP自定义域key
|
#拦截IP自定义域key
|
||||||
keyring_id=keyring_id
|
keyring_id=keyring_id
|
||||||
droprate=Droprate
|
droprate=DROPRATE
|
||||||
bandwidth=Bandwidth
|
bandwidth=Bandwidth
|
||||||
#IP\u9ed8\u8ba4\u503c
|
#IP\u9ed8\u8ba4\u503c
|
||||||
ipv4_default_ip_value=\:\:
|
ipv4_default_ip_value=\:\:
|
||||||
|
|||||||
19
src/main/resources/sql/add_function_region.sql
Normal file
19
src/main/resources/sql/add_function_region.sql
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
INSERT INTO function_region_dict
|
||||||
|
()
|
||||||
|
VALUES
|
||||||
|
('subscribe_id', '0', '0,1', '0,1,2', '0,1,2,3', 174, 34, 2, 'NTC_SUBSCRIBE_ID', '', 'SSL SUBSCRIBE_ID配置', 1, NULL, NULL, NULL, NULL, 1, 2, '', '', '', '', '', '', 3);
|
||||||
|
|
||||||
|
INSERT INTO function_region_dict
|
||||||
|
()
|
||||||
|
VALUES
|
||||||
|
('subscribe_id', '0', '0,1', '0,1,2', '0,1,2,3', 175, 7, 2, 'NTC_SUBSCRIBE_ID', '', 'DNS SUBSCRIBE_ID配置', 1, NULL, NULL, NULL, NULL, 1, 2, '', '', '', '', '', '', 5);
|
||||||
|
|
||||||
|
INSERT INTO function_region_dict
|
||||||
|
()
|
||||||
|
VALUES
|
||||||
|
('subscribe_id', '0', '0,1', '0,1,2', '0,1,2,3', 176, 35, 3, 'NTC_SUBSCRIBE_ID', '', '邮件 SUBSCRIBE_ID配置', 1, NULL, NULL,NULL , NULL, 1, 2, '', '', '', '', '', '', 7);
|
||||||
|
|
||||||
|
INSERT INTO function_region_dict
|
||||||
|
()
|
||||||
|
VALUES
|
||||||
|
('subscribe_id', '0', '0,1', '0,1,2', '0,1,2,3', 177, 8, 3, 'NTC_SUBSCRIBE_ID', '', 'HTTP SUBSCRIBE_ID配置', 1, NULL, NULL,NULL , NULL, 1, 3, '', '', '', '', '', '', 7);
|
||||||
@@ -16,6 +16,13 @@
|
|||||||
$("#cancel").on("click", function() {
|
$("#cancel").on("click", function() {
|
||||||
window.history.back();
|
window.history.back();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(".action").on("change", function() {
|
||||||
|
//拦截根据action切换动作部分
|
||||||
|
setInterceptDefaultInfo("");
|
||||||
|
$("#serviceId").val($(this).attr("serviceId"));
|
||||||
|
$("#protocolId").val($(this).attr("protocolId"));
|
||||||
|
});
|
||||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||||
$("#protocolId").val($(".action:checked").attr("protocolId"));
|
$("#protocolId").val($(".action:checked").attr("protocolId"));
|
||||||
$("#cfgFrom").validate(
|
$("#cfgFrom").validate(
|
||||||
|
|||||||
@@ -229,5 +229,60 @@
|
|||||||
</c:if>
|
</c:if>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</c:if>
|
</c:if>
|
||||||
|
<c:if test="${region[0] eq 2 }">
|
||||||
|
<c:forEach items="${_cfg.ntcSubscribeIdCfgList}" var="cfg">
|
||||||
|
<c:if test="${region[1] eq cfg.cfgType }">
|
||||||
|
<div id="${region[1]}Info${index}" class="content" name="subCfg${index}">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-8">
|
||||||
|
<div class="form-group">
|
||||||
|
<label><spring:message code='keywords' />:</label>
|
||||||
|
<label>
|
||||||
|
${fn:replace(cfg.cfgKeywords, "***and***", " ")}
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="form-group">
|
||||||
|
<label><spring:message code='expression_type' />:</label>
|
||||||
|
<label>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${cfg.exprType eq 1}"><spring:message code='and_expression'/></c:when>
|
||||||
|
<c:when test="${cfg.exprType eq 0}"><spring:message code='null_expression'/></c:when>
|
||||||
|
</c:choose>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="form-group">
|
||||||
|
<label><spring:message code='match_method' />:</label>
|
||||||
|
<label>
|
||||||
|
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||||
|
<c:if test="${cfg.matchMethod==matchMethodC.itemCode }"><spring:message code="${matchMethodC.itemValue}"/></c:if>
|
||||||
|
</c:forEach>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="form-group">
|
||||||
|
<label><spring:message code='whether_hexbinary' />:</label>
|
||||||
|
<label>
|
||||||
|
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||||
|
<c:if test="${cfg.isHexbin==isHexbinC.itemCode }"><spring:message code="${isHexbinC.itemValue}"/></c:if>
|
||||||
|
</c:forEach>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>
|
||||||
|
</c:if>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</html>
|
</html>
|
||||||
@@ -184,5 +184,60 @@
|
|||||||
</c:if>
|
</c:if>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</c:if>
|
</c:if>
|
||||||
|
<c:if test="${region[0] eq 2 }">
|
||||||
|
<c:forEach items="${_cfg.ntcSubscribeIdCfgList}" var="cfg">
|
||||||
|
<c:if test="${region[1] eq cfg.cfgType }">
|
||||||
|
<div id="${region[1]}Info${index}" class="content" name="subCfg${index}">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-8">
|
||||||
|
<div class="form-group">
|
||||||
|
<label><spring:message code='keywords' />:</label>
|
||||||
|
<label>
|
||||||
|
${fn:replace(cfg.cfgKeywords, "***and***", " ")}
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="form-group">
|
||||||
|
<label><spring:message code='expression_type' />:</label>
|
||||||
|
<label>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${cfg.exprType eq 1}"><spring:message code='and_expression'/></c:when>
|
||||||
|
<c:when test="${cfg.exprType eq 0}"><spring:message code='null_expression'/></c:when>
|
||||||
|
</c:choose>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="form-group">
|
||||||
|
<label><spring:message code='match_method' />:</label>
|
||||||
|
<label>
|
||||||
|
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||||
|
<c:if test="${cfg.matchMethod==matchMethodC.itemCode }"><spring:message code="${matchMethodC.itemValue}"/></c:if>
|
||||||
|
</c:forEach>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="form-group">
|
||||||
|
<label><spring:message code='whether_hexbinary' />:</label>
|
||||||
|
<label>
|
||||||
|
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||||
|
<c:if test="${cfg.isHexbin==isHexbinC.itemCode }"><spring:message code="${isHexbinC.itemValue}"/></c:if>
|
||||||
|
</c:forEach>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>
|
||||||
|
</c:if>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</html>
|
</html>
|
||||||
@@ -9,6 +9,8 @@
|
|||||||
//搜索框提示语初始化
|
//搜索框提示语初始化
|
||||||
if("${cfg.cfgDesc}"){
|
if("${cfg.cfgDesc}"){
|
||||||
$("#intype").val("${cfg.cfgDesc}");
|
$("#intype").val("${cfg.cfgDesc}");
|
||||||
|
}else if("${cfg.compileId}"){
|
||||||
|
$("#intype").val("${cfg.compileId}");
|
||||||
}else{
|
}else{
|
||||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
|
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
|
||||||
}
|
}
|
||||||
@@ -289,6 +291,7 @@
|
|||||||
|
|
||||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||||
|
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option>
|
||||||
<%-- <form:option value="voipIp.srcIpAddress"><spring:message code="client_ip"/></form:option>
|
<%-- <form:option value="voipIp.srcIpAddress"><spring:message code="client_ip"/></form:option>
|
||||||
<form:option value="voipIp.srcPort"><spring:message code="client_port"/></form:option>
|
<form:option value="voipIp.srcPort"><spring:message code="client_port"/></form:option>
|
||||||
<form:option value="voipAccount.cfgKeywords"><spring:message code="key_word"/></form:option>
|
<form:option value="voipAccount.cfgKeywords"><spring:message code="key_word"/></form:option>
|
||||||
@@ -363,7 +366,7 @@
|
|||||||
</form:select>
|
</form:select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
|
|
||||||
|
|||||||
@@ -53,6 +53,13 @@
|
|||||||
<i id="resBody${index}" class="fa" name="tabFlag${index}"></i>
|
<i id="resBody${index}" class="fa" name="tabFlag${index}"></i>
|
||||||
</div>
|
</div>
|
||||||
</c:if>
|
</c:if>
|
||||||
|
<c:if test="${fn:length(_cfg.ntcSubscribeIdCfgList)>0}">
|
||||||
|
<div id="subscribeIdTitle${index}" onclick="switchSubCfgTabInfo('subscribeId',${index})"
|
||||||
|
class="col-md-1 tabInfo" name="tabTitle${index }">
|
||||||
|
<spring:message code='NTC_SUBSCRIBE_ID' />
|
||||||
|
<i id="resBody${index}" class="fa" name="tabFlag${index}"></i>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<c:forEach items="${_cfg.ipPortList}" var="cfg">
|
<c:forEach items="${_cfg.ipPortList}" var="cfg">
|
||||||
@@ -409,6 +416,55 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</c:forEach>
|
||||||
|
<c:forEach items="${_cfg.ntcSubscribeIdCfgList}" var="cfg">
|
||||||
|
<div id="subscribeIdInfo${index}" class="content" name="subCfg${index}">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-8">
|
||||||
|
<div class="form-group">
|
||||||
|
<label><spring:message code='keywords' />:</label><label>${fn:replace(cfg.cfgKeywords, "***and***", " ")}</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="form-group">
|
||||||
|
<label><spring:message code='expression_type' />:</label>
|
||||||
|
<label>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${cfg.exprType eq 1}"><spring:message code='and_expression'/></c:when>
|
||||||
|
<c:when test="${cfg.exprType eq 0}"><spring:message code='null_expression'/></c:when>
|
||||||
|
</c:choose>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="form-group">
|
||||||
|
<label><spring:message code='match_method' />:</label>
|
||||||
|
<label>
|
||||||
|
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||||
|
<c:if test="${cfg.matchMethod==matchMethodC.itemCode }"><spring:message code="${matchMethodC.itemValue}"/></c:if>
|
||||||
|
</c:forEach>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="form-group">
|
||||||
|
<label><spring:message code='whether_hexbinary' />:</label>
|
||||||
|
<label>
|
||||||
|
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||||
|
<c:if test="${cfg.isHexbin==isHexbinC.itemCode }"><spring:message code="${isHexbinC.itemValue}"/></c:if>
|
||||||
|
</c:forEach>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
@@ -120,7 +120,7 @@
|
|||||||
</c:if>
|
</c:if>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</c:if>
|
</c:if>
|
||||||
<c:if test="${region[0] eq 2 }">
|
<c:if test="${(region[0] eq 2) && (fn:length(_cfg.sslList) >0)}">
|
||||||
<c:forEach items="${_cfg.sslList}" var="cfg">
|
<c:forEach items="${_cfg.sslList}" var="cfg">
|
||||||
<c:if test="${region[1] eq cfg.cfgType }">
|
<c:if test="${region[1] eq cfg.cfgType }">
|
||||||
<div id="${region[1]}Info${index}" class="content" name="subCfg${index}">
|
<div id="${region[1]}Info${index}" class="content" name="subCfg${index}">
|
||||||
@@ -172,5 +172,57 @@
|
|||||||
</c:if>
|
</c:if>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</c:if>
|
</c:if>
|
||||||
|
<c:if test="${(region[0] eq 2) && (fn:length(_cfg.ntcSubscribeIdCfgList) >0)}">
|
||||||
|
<c:forEach items="${_cfg.ntcSubscribeIdCfgList}" var="cfg">
|
||||||
|
<c:if test="${region[1] eq cfg.cfgType }">
|
||||||
|
<div id="${region[1]}Info${index}" class="content" name="subCfg${index}">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-8">
|
||||||
|
<div class="form-group">
|
||||||
|
<label><spring:message code='keywords' />:</label><label>${fn:replace(cfg.cfgKeywords, "***and***", " ")}</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="form-group">
|
||||||
|
<label><spring:message code='expression_type' />:</label>
|
||||||
|
<label>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${cfg.exprType eq 1}"><spring:message code='and_expression'/></c:when>
|
||||||
|
<c:when test="${cfg.exprType eq 0}"><spring:message code='null_expression'/></c:when>
|
||||||
|
</c:choose>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="form-group">
|
||||||
|
<label><spring:message code='match_method' />:</label>
|
||||||
|
<label>
|
||||||
|
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||||
|
<c:if test="${cfg.matchMethod==matchMethodC.itemCode }"><spring:message code="${matchMethodC.itemValue}"/></c:if>
|
||||||
|
</c:forEach>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="form-group">
|
||||||
|
<label><spring:message code='whether_hexbinary' />:</label>
|
||||||
|
<label>
|
||||||
|
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||||
|
<c:if test="${cfg.isHexbin==isHexbinC.itemCode }"><spring:message code="${isHexbinC.itemValue}"/></c:if>
|
||||||
|
</c:forEach>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>
|
||||||
|
</c:if>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</html>
|
</html>
|
||||||
Reference in New Issue
Block a user