1.导入配置数据入库优化 2.修复VoIP配置 无IP域配置数据不显示BUG

This commit is contained in:
zhangwq
2018-11-17 23:59:50 +08:00
parent 2e4817e39b
commit 85123852b0
13 changed files with 346 additions and 101 deletions

View File

@@ -100,4 +100,8 @@ public interface AppCfgDao {
public List<WebsiteDomainTopic> getDomainDict(WebsiteDomainTopic websiteDomainTopic);
public void saveDomainDict(WebsiteDomainTopic websiteDomainTopic);
public List<AppIpCfg> getAppIpCfgBySpecServiceId(Integer specServiceId);
// 导入配置时数据批量入库使用
public void insertAppDomainCfgBatch(AppDomainCfg cfg);
public void insertAppHttpCfgBatch(AppHttpCfg cfg);
}

View File

@@ -1752,6 +1752,19 @@
#{exprType,jdbcType=INTEGER},#{matchMethod,jdbcType=INTEGER},#{isHexbin,jdbcType=INTEGER},#{doLog,jdbcType=INTEGER}
)
</insert>
<insert id="insertAppHttpCfgBatch" parameterType="com.nis.domain.configuration.AppHttpCfg" >
insert into app_http_cfg (
APP_CODE,BEHAV_CODE,SPEC_SERVICE_ID,CFG_DESC,ACTION,IS_VALID,IS_AUDIT,
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,RATELIMIT,FUNCTION_ID,CFG_TYPE,CFG_REGION_CODE,
DISTRICT,CFG_KEYWORDS,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN,DO_LOG
)values (
<include refid="AppCommonCfg_Value_List" />,
#{district,jdbcType=VARCHAR},#{cfgKeywords,jdbcType=VARCHAR},
#{exprType,jdbcType=INTEGER},#{matchMethod,jdbcType=INTEGER},#{isHexbin,jdbcType=INTEGER},#{doLog,jdbcType=INTEGER}
)
</insert>
<insert id="insertAppDomainCfg" parameterType="com.nis.domain.configuration.AppDomainCfg" >
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
SELECT LAST_INSERT_ID()
@@ -1768,6 +1781,19 @@
#{isHexbin,jdbcType=INTEGER},#{doLog,jdbcType=INTEGER}
)
</insert>
<insert id="insertAppDomainCfgBatch" parameterType="com.nis.domain.configuration.AppDomainCfg" >
insert into app_domain_cfg (
APP_CODE,BEHAV_CODE,SPEC_SERVICE_ID,CFG_DESC,ACTION,IS_VALID,IS_AUDIT,
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,RATELIMIT,FUNCTION_ID,CFG_TYPE,CFG_REGION_CODE,
DOMAIN,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN,DO_LOG
)values (
<include refid="AppCommonCfg_Value_List" />,
#{domain,jdbcType=VARCHAR},#{exprType,jdbcType=INTEGER},#{matchMethod,jdbcType=INTEGER},
#{isHexbin,jdbcType=INTEGER},#{doLog,jdbcType=INTEGER}
)
</insert>
<!-- 主题网站新增 -->
<insert id="insertAppTopicDomainCfg" parameterType="com.nis.domain.configuration.AppTopicDomainCfg" >
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">

View File

@@ -395,6 +395,15 @@
</if>
</where>
)
</if>
<if test="voipAccount != null">
AND r.compile_id in (SELECT s.compile_id FROM av_voip_account_cfg s
<where>
<if test="voipAccount.cfgKeywords != null and voipAccount.cfgKeywords != ''">
REPLACE(s.cfg_keywords,'***and***','|') LIKE concat(concat('%',#{voipAccount.cfgKeywords,jdbcType=VARCHAR}),'%')
</if>
</where>
)
</if>
<!-- 数据范围过滤 -->
${sqlMap.dsf}

View File

@@ -6,6 +6,7 @@ import org.apache.ibatis.annotations.Param;
import com.nis.domain.configuration.BaseStringCfg;
import com.nis.domain.configuration.CfgIndexInfo;
import com.nis.domain.configuration.ComplexkeywordCfg;
import com.nis.domain.configuration.NtcSubscribeIdCfg;
import com.nis.web.dao.CrudDao;
import com.nis.web.dao.MyBatisDao;
@@ -48,4 +49,8 @@ public interface StringCfgDao extends CrudDao<BaseStringCfg>{
public void saveSubscribeIdCfg(NtcSubscribeIdCfg ntcSubscribeIdCfg);
public void updateSubscribeIdCfg(NtcSubscribeIdCfg ntcSubscribeIdCfg);
public void deleteSubscribeIdCfg(NtcSubscribeIdCfg ntcSubscribeIdCfg);
// 导入配置时数据批量入库使用
public void saveStringCfgBatch(BaseStringCfg cfg);
public void saveComplexkeywordCfgBatch(ComplexkeywordCfg cfg);
}

View File

@@ -732,4 +732,128 @@
</where>
</delete>
<!-- =====================NtcSubscribeIdCfg end======================== -->
<insert id="saveStringCfgBatch" parameterType="com.nis.domain.configuration.BaseStringCfg" >
insert into ${tableName} (
CFG_DESC,
ACTION,
IS_VALID,
IS_AUDIT,
CREATOR_ID,
CREATE_TIME,
EDITOR_ID,
EDIT_TIME,
AUDITOR_ID,
AUDIT_TIME,
SERVICE_ID,
REQUEST_ID,
COMPILE_ID,
IS_AREA_EFFECTIVE,
CLASSIFY,
ATTRIBUTE,
LABLE,
AREA_EFFECTIVE_IDS,
function_id,
cfg_keywords,
cfg_type,
cfg_region_code,
expr_type,
match_method,
is_hexbin,
user_region1,
user_region2,
user_region3,
user_region4,
user_region5
)values (
#{cfgDesc,jdbcType=VARCHAR},
#{action,jdbcType=INTEGER},
0,
0,
#{creatorId,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP},
#{editorId,jdbcType=INTEGER},
#{editTime,jdbcType=TIMESTAMP},
#{auditorId,jdbcType=INTEGER},
#{auditTime,jdbcType=TIMESTAMP},
#{serviceId,jdbcType=INTEGER},
#{requestId,jdbcType=INTEGER},
#{compileId,jdbcType=INTEGER},
#{isAreaEffective,jdbcType=INTEGER},
#{classify,jdbcType=VARCHAR},
#{attribute,jdbcType=VARCHAR},
#{lable,jdbcType=VARCHAR},
#{areaEffectiveIds,jdbcType=VARCHAR},
#{functionId,jdbcType=INTEGER},
#{cfgKeywords,jdbcType=VARCHAR},
#{cfgType,jdbcType=VARCHAR},
#{cfgRegionCode,jdbcType=INTEGER},
#{exprType,jdbcType=INTEGER},
#{matchMethod,jdbcType=INTEGER},
#{isHexbin,jdbcType=INTEGER},
#{userRegion1,jdbcType=VARCHAR},
#{userRegion2,jdbcType=VARCHAR},
#{userRegion3,jdbcType=VARCHAR},
#{userRegion4,jdbcType=VARCHAR},
#{userRegion5,jdbcType=VARCHAR}
)
</insert>
<insert id="saveComplexkeywordCfgBatch" parameterType="com.nis.domain.configuration.ComplexkeywordCfg" >
insert into ${tableName} (
CFG_DESC,
ACTION,
IS_VALID,
IS_AUDIT,
CREATOR_ID,
CREATE_TIME,
EDITOR_ID,
EDIT_TIME,
AUDITOR_ID,
AUDIT_TIME,
SERVICE_ID,
REQUEST_ID,
COMPILE_ID,
IS_AREA_EFFECTIVE,
CLASSIFY,
ATTRIBUTE,
LABLE,
AREA_EFFECTIVE_IDS,
function_id,
district,
cfg_keywords,
cfg_type,
cfg_region_code,
expr_type,
match_method,
is_hexbin
)values (
#{cfgDesc,jdbcType=VARCHAR},
#{action,jdbcType=INTEGER},
0,
0,
#{creatorId,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP},
#{editorId,jdbcType=INTEGER},
#{editTime,jdbcType=TIMESTAMP},
#{auditorId,jdbcType=INTEGER},
#{auditTime,jdbcType=TIMESTAMP},
#{serviceId,jdbcType=INTEGER},
#{requestId,jdbcType=INTEGER},
#{compileId,jdbcType=INTEGER},
#{isAreaEffective,jdbcType=INTEGER},
#{classify,jdbcType=VARCHAR},
#{attribute,jdbcType=VARCHAR},
#{lable,jdbcType=VARCHAR},
#{areaEffectiveIds,jdbcType=VARCHAR},
#{functionId,jdbcType=INTEGER},
#{district,jdbcType=VARCHAR},
#{cfgKeywords,jdbcType=VARCHAR},
#{cfgType,jdbcType=VARCHAR},
#{cfgRegionCode,jdbcType=INTEGER},
#{exprType,jdbcType=INTEGER},
#{matchMethod,jdbcType=INTEGER},
#{isHexbin,jdbcType=INTEGER}
)
</insert>
</mapper>

View File

@@ -67,6 +67,4 @@ public interface WebsiteCfgDao extends CrudDao<CfgIndexInfo>{
public void deleteSslIpCfg(CfgIndexInfo entity);
public void deleteSslKeywordCfg(CfgIndexInfo entity);
public void saveWebsiteCfgForBatch(BaseStringCfg cfg);
}

View File

@@ -793,73 +793,8 @@
#{userRegion5,jdbcType=VARCHAR}
)
</insert>
<!-- insert http_url_cfg表信息 -->
<insert id="saveWebsiteCfgForBatch" parameterType="com.nis.domain.configuration.BaseStringCfg" >
insert into ${tableName} (
CFG_DESC,
ACTION,
IS_VALID,
IS_AUDIT,
CREATOR_ID,
CREATE_TIME,
EDITOR_ID,
EDIT_TIME,
AUDITOR_ID,
AUDIT_TIME,
SERVICE_ID,
REQUEST_ID,
COMPILE_ID,
IS_AREA_EFFECTIVE,
CLASSIFY,
ATTRIBUTE,
LABLE,
AREA_EFFECTIVE_IDS,
function_id,
cfg_keywords,
cfg_type,
cfg_region_code,
expr_type,
match_method,
is_hexbin,
user_region1,
user_region2,
user_region3,
user_region4,
user_region5
)values (
#{cfgDesc,jdbcType=VARCHAR},
#{action,jdbcType=INTEGER},
0,
0,
#{creatorId,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP},
#{editorId,jdbcType=INTEGER},
#{editTime,jdbcType=TIMESTAMP},
#{auditorId,jdbcType=INTEGER},
#{auditTime,jdbcType=TIMESTAMP},
#{serviceId,jdbcType=INTEGER},
#{requestId,jdbcType=INTEGER},
#{compileId,jdbcType=INTEGER},
#{isAreaEffective,jdbcType=INTEGER},
#{classify,jdbcType=VARCHAR},
#{attribute,jdbcType=VARCHAR},
#{lable,jdbcType=VARCHAR},
#{areaEffectiveIds,jdbcType=VARCHAR},
#{functionId,jdbcType=INTEGER},
#{cfgKeywords,jdbcType=VARCHAR},
#{cfgType,jdbcType=VARCHAR},
#{cfgRegionCode,jdbcType=INTEGER},
#{exprType,jdbcType=INTEGER},
#{matchMethod,jdbcType=INTEGER},
#{isHexbin,jdbcType=INTEGER},
#{userRegion1,jdbcType=VARCHAR},
#{userRegion2,jdbcType=VARCHAR},
#{userRegion3,jdbcType=VARCHAR},
#{userRegion4,jdbcType=VARCHAR},
#{userRegion5,jdbcType=VARCHAR}
)
</insert>
<!-- insert http_url_cfg表信息 -->
<insert id="saveHttpUrlCfg" parameterType="com.nis.domain.configuration.HttpUrlCfg" >
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
SELECT LAST_INSERT_ID()