1.app_policy增加do_log字段,subcribeId相关增删改查方法写在stringCfgDao
This commit is contained in:
@@ -20,6 +20,10 @@ import com.nis.util.excel.ExcelField;
|
||||
* @date 2018年2月5日 下午5:26:02
|
||||
* @version V1.0
|
||||
*/
|
||||
/**
|
||||
* @author Administrator
|
||||
*
|
||||
*/
|
||||
public class AppPolicyCfg extends BaseCfg<AppPolicyCfg> {
|
||||
|
||||
/**
|
||||
@@ -79,6 +83,24 @@ public class AppPolicyCfg extends BaseCfg<AppPolicyCfg> {
|
||||
|
||||
private List<IpPortCfg> ipPortList;
|
||||
private IpPortCfg ipPort;
|
||||
private NtcSubscribeIdCfg ntcSubscribeIdCfg;
|
||||
private List<NtcSubscribeIdCfg> ntcSubscribeCfgList;
|
||||
|
||||
public List<NtcSubscribeIdCfg> getNtcSubscribeCfgList() {
|
||||
return ntcSubscribeCfgList;
|
||||
}
|
||||
|
||||
public void setNtcSubscribeCfgList(List<NtcSubscribeIdCfg> ntcSubscribeCfgList) {
|
||||
this.ntcSubscribeCfgList = ntcSubscribeCfgList;
|
||||
}
|
||||
|
||||
public NtcSubscribeIdCfg getNtcSubscribeIdCfg() {
|
||||
return ntcSubscribeIdCfg;
|
||||
}
|
||||
|
||||
public void setNtcSubscribeIdCfg(NtcSubscribeIdCfg ntcSubscribeIdCfg) {
|
||||
this.ntcSubscribeIdCfg = ntcSubscribeIdCfg;
|
||||
}
|
||||
|
||||
public Integer getExprType() {
|
||||
return exprType;
|
||||
|
||||
@@ -525,6 +525,18 @@
|
||||
</where>
|
||||
)
|
||||
</if>
|
||||
<if test="(ntcSubscribeIdCfg.cfgKeywords != null and ntcSubscribeIdCfg.cfgKeywords != '') ">
|
||||
AND r.compile_id in (select f.compile_id from ntc_subscribe_id_cfg f
|
||||
<where>
|
||||
<if test="ntcSubscribeIdCfg.cfgKeywords != null and ntcSubscribeIdCfg.cfgKeywords != ''">
|
||||
and f.cfg_keywords like concat(concat('%',#{ntcSubscribeIdCfg.cfgKeywords,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
and f.compile_id =#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
</where>
|
||||
)
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${sqlMap.dsf}
|
||||
</trim>
|
||||
|
||||
@@ -695,7 +695,7 @@
|
||||
#{voipAccount.isHexbin,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<!-- insert AV_VOIP_ACCOUNT_CFG表信息 -->
|
||||
<!-- insert ntc_subscribe_id_cfg表信息 -->
|
||||
<insert id="insertAvVoipKeywordCfg" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||
insert into ntc_subscribe_id_cfg (
|
||||
CFG_DESC,
|
||||
@@ -1007,7 +1007,7 @@
|
||||
</trim>
|
||||
</set>
|
||||
<where>
|
||||
<if test="voipAccount != null and voipAccount.cfgId != null" >
|
||||
<if test="ntcSubscribeIdCfg != null and ntcSubscribeIdCfg.cfgId != null" >
|
||||
and cfg_id = #{ntcSubscribeIdCfg.cfgId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileId != null" >
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
|
||||
@@ -40,4 +41,9 @@ public interface StringCfgDao extends CrudDao<BaseStringCfg>{
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public void deleteByCompileIds(@Param("user")long user,@Param("tableName")String tableName,@Param("compileIds")String compileIds);
|
||||
|
||||
public List<NtcSubscribeIdCfg> findSubscribeIdCfgList(NtcSubscribeIdCfg ntcSubscribeIdCfg);
|
||||
public void saveSubscribeIdCfg(NtcSubscribeIdCfg ntcSubscribeIdCfg);
|
||||
public void updateSubscribeIdCfg(NtcSubscribeIdCfg ntcSubscribeIdCfg);
|
||||
public void deleteSubscribeIdCfg(NtcSubscribeIdCfg ntcSubscribeIdCfg);
|
||||
}
|
||||
|
||||
@@ -35,12 +35,49 @@
|
||||
<result column="auditor_name" property="auditorName" jdbcType="VARCHAR" />
|
||||
<result column="editor_name" property="editorName" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<resultMap id="SubscribeIdCfgMap" type="com.nis.domain.configuration.NtcSubscribeIdCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="cfg_keywords" property="cfgKeywords" jdbcType="VARCHAR" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
<result column="action" property="action" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
||||
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
|
||||
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
<result column="expr_type " property="exprType" jdbcType="INTEGER" />
|
||||
<result column="match_method" property="matchMethod" jdbcType="INTEGER" />
|
||||
<result column="is_hexbin" property="isHexbin" jdbcType="INTEGER" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="BaseStringCfg_Column_List_with_id" >
|
||||
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,
|
||||
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
|
||||
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN,FUNCTION_ID,CFG_REGION_CODE,RATELIMIT
|
||||
</sql>
|
||||
|
||||
<sql id="SubscribeIdCfg_Column">
|
||||
r.cfg_id,r.cfg_desc,r.cfg_keywords,r.cfg_type,
|
||||
r.action,r.is_valid,r.is_audit,r.creator_id,r.create_time,r.editor_id,r.edit_time, r.auditor_id,
|
||||
r.audit_time,r.service_id,r.request_id,r.compile_id,r.is_area_effective,r.classify,r.attribute,r.lable,
|
||||
r.expr_type,r.match_method,r.is_hexbin,r.area_effective_ids,r.function_id,r.cfg_region_code
|
||||
</sql>
|
||||
<!-- <sql id="BaseStringCfg_Column_List_with_id_alias" >
|
||||
r.CFG_ID as cfgId, r.CFG_DESC as cfgDesc, r.CFG_KEYWORDS as cfgKeywords, r.ACTION as action,r.IS_VALID as isValid,r.IS_AUDIT as isAudit,
|
||||
@@ -474,4 +511,184 @@
|
||||
<update id="deleteByCompileIds" parameterType="com.nis.domain.configuration.BaseStringCfg" >
|
||||
update ${tableName} set is_valid = -1, editor_id = #{user,jdbcType=INTEGER} , edit_time = NOW() where compile_id in (${compileIds})
|
||||
</update>
|
||||
<!-- =================NtcSubscribeIdCfg begin========================== -->
|
||||
<!-- 根据compileId获取NtcSubscribeIdCfg信息 -->
|
||||
<select id="findSubscribeIdCfgList" resultMap="SubscribeIdCfgMap" parameterType="com.nis.domain.configuration.NtcSubscribeIdCfg">
|
||||
select
|
||||
<include refid="SubscribeIdCfg_Column" />
|
||||
from ntc_subscribe_id_cfg r
|
||||
<where>
|
||||
<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>
|
||||
<!-- insert ntc_subscribe_id_cfg表信息 -->
|
||||
<insert id="saveSubscribeIdCfg" parameterType="com.nis.domain.configuration.NtcSubscribeIdCfg" >
|
||||
insert into ntc_subscribe_id_cfg (
|
||||
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
|
||||
)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}
|
||||
)
|
||||
</insert>
|
||||
<!-- update ntc_subscribe_id_cfg表信息 -->
|
||||
<update id="updateSubscribeIdCfg" parameterType="com.nis.domain.configuration.NtcSubscribeIdCfg" >
|
||||
update ntc_subscribe_id_cfg
|
||||
<set >
|
||||
<trim suffixOverrides=",">
|
||||
<if test="cfgDesc != null and cfgDesc != ''" >
|
||||
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="action != null" >
|
||||
action = #{action,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isValid != null" >
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAudit != null" >
|
||||
is_audit = #{isAudit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="editorId != null" >
|
||||
editor_id = #{editorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="editTime != null and editTime != ''" >
|
||||
edit_time = #{editTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="auditorId != null" >
|
||||
AUDITOR_ID = #{auditorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="auditTime != null and auditTime != ''" >
|
||||
AUDIT_TIME = #{auditTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="compileId != null" >
|
||||
COMPILE_ID = #{compileId,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="requestId != null" >
|
||||
request_id = #{requestId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAreaEffective != null" >
|
||||
is_area_effective = #{isAreaEffective,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="classify != null and classify != ''" >
|
||||
classify = #{classify,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="attribute != null and attribute != ''" >
|
||||
attribute = #{attribute,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lable != null and lable != ''" >
|
||||
lable = #{lable,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null" >
|
||||
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="functionId != null" >
|
||||
function_id = #{functionId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="serviceId != null" >
|
||||
service_id = #{serviceId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="cfgKeywords != null and cfgKeywords != ''" >
|
||||
cfg_keywords = #{cfgKeywords,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cfgType != null and cfgType != ''" >
|
||||
cfg_type = #{cfgType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cfgRegionCode != null " >
|
||||
cfg_region_code = #{cfgRegionCode,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="exprType != null " >
|
||||
expr_type = #{exprType,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="matchMethod != null " >
|
||||
match_method = #{matchMethod,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isHexbin != null " >
|
||||
is_hexbin = #{isHexbin,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
<where>
|
||||
<if test="cfgId != null" >
|
||||
and cfg_id = #{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>
|
||||
</update>
|
||||
<!-- 删除 subscribe信息 -->
|
||||
<delete id="deleteSubscribeIdCfg" parameterType="com.nis.domain.configuration.NtcSubscribeIdCfg" >
|
||||
delete from ntc_subscribe_id_cfg
|
||||
<where>
|
||||
<if test="cfgId != null" >
|
||||
and cfg_id = #{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======================== -->
|
||||
</mapper>
|
||||
@@ -1 +1,2 @@
|
||||
alter table task_info add do_log int(11) COMMENT 'do_log:0不需要1记录所有日志2只记录结构化日志。默认是2'
|
||||
alter table cfg_index_info add do_log int(11) COMMENT 'do_log:0不需要1记录所有日志2只记录结构化日志。默认是2'
|
||||
alter table app_policy_cfg add do_log int(11) COMMENT 'do_log:0不需要1记录所有日志2只记录结构化日志。默认是2'
|
||||
@@ -217,7 +217,7 @@
|
||||
<c:set var="strCfgIndex" value="0"></c:set>
|
||||
<c:forEach items="${regionList}" var="region" varStatus="status">
|
||||
<c:if test="${region.regionType eq 2 }">
|
||||
<c:if test="${region.configRegionValue eq 'MM_VOIP_ACCOUNT' }">
|
||||
<c:if test="${region.configServiceType eq 'voip_account' }">
|
||||
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
||||
<h4 class="form-section">
|
||||
<spring:message code="${region.configRegionValue}" />
|
||||
@@ -257,7 +257,7 @@
|
||||
</c:choose>
|
||||
</c:if>
|
||||
<!-- 关键字 -->
|
||||
<c:if test="${region.configRegionValue eq 'NTC_SUBSCRIBE_ID' }">
|
||||
<c:if test="${region.configServiceType eq 'subscribe_id' }">
|
||||
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
||||
<h4 class="form-section">
|
||||
<spring:message code="${region.configRegionValue}" />
|
||||
|
||||
Reference in New Issue
Block a user