Merge branch 'develop' of http://192.168.10.125/k18_web/NFS.git into
develop Conflicts: src/main/resources/messages/message_en.properties src/main/resources/messages/message_ru.properties src/main/resources/messages/message_zh_CN.properties 关键字日志转http url配置功能完成
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
package com.nis.web.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.nis.domain.SysLog;
|
||||
@MyBatisDao
|
||||
public interface SysLogDao extends CrudDao<SysLog>{
|
||||
|
||||
public void insertCfgOperationLog(SysLog log);
|
||||
public List<SysLog> findCfgOperationLogList(SysLog log);
|
||||
}
|
||||
@@ -28,6 +28,26 @@
|
||||
ORDER BY a.create_date DESC
|
||||
</select>
|
||||
|
||||
<select id="findCfgOperationLogList" resultType="sysLog">
|
||||
SELECT
|
||||
a.*
|
||||
FROM sys_cfg_operation_log a
|
||||
WHERE a.create_date BETWEEN #{beginDate} AND #{endDate}
|
||||
<if test="functionName != null and functionName != ''">
|
||||
AND a.function_name=#{functionName}
|
||||
</if>
|
||||
<if test="createBy != null and createBy != ''">
|
||||
AND a.create_by = #{createBy}
|
||||
</if>
|
||||
<if test="operation != null and operation != ''">
|
||||
AND a.operation=#{operation}
|
||||
</if>
|
||||
<if test="exception != null and exception != ''">
|
||||
AND a.state = 0
|
||||
</if>
|
||||
ORDER BY a.create_date DESC
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insert" parameterType="sysLog" useGeneratedKeys="true" keyProperty="id" >
|
||||
INSERT INTO sys_log(
|
||||
@@ -59,4 +79,49 @@
|
||||
)
|
||||
</insert>
|
||||
|
||||
<insert id="insertCfgOperationLog" parameterType="sysLog" useGeneratedKeys="true" keyProperty="id" >
|
||||
INSERT INTO sys_cfg_operation_log(
|
||||
type,
|
||||
title,
|
||||
create_by,
|
||||
create_date,
|
||||
remote_addr,
|
||||
user_agent,
|
||||
request_uri,
|
||||
method,
|
||||
state,
|
||||
consumer_time,
|
||||
params,
|
||||
exception,
|
||||
compile_id,
|
||||
cfg_id,
|
||||
function_id,
|
||||
method_name,
|
||||
audit_state,
|
||||
action,
|
||||
operation,
|
||||
function_name
|
||||
) VALUES (
|
||||
#{type},
|
||||
#{title},
|
||||
#{createBy},
|
||||
#{createDate},
|
||||
#{remoteAddr},
|
||||
#{userAgent},
|
||||
#{requestUri},
|
||||
#{method},
|
||||
#{state},
|
||||
#{consumerTime},
|
||||
#{params},
|
||||
#{exception},
|
||||
#{compileId},
|
||||
#{cfgId},
|
||||
#{functionId},
|
||||
#{methodName},
|
||||
#{auditState},
|
||||
#{action},
|
||||
#{operation},
|
||||
#{functionName}
|
||||
)
|
||||
</insert>
|
||||
</mapper>
|
||||
@@ -16,7 +16,10 @@ public interface AsnIpCfgDao extends CrudDao<AsnIpCfg>{
|
||||
public List<AsnIpCfg> getByIds(@Param("ids")String ids);
|
||||
public List<Integer> hasGroupIds(@Param("ids")String ids);
|
||||
public List<AsnIpCfg> findAllList(AsnIpCfg cfg);
|
||||
public List<ConfigGroupInfo> findPolicyGroupInfosByType(@Param("groupId")Integer groupId);
|
||||
// public List<ConfigGroupInfo> findPolicyGroupInfosByType(@Param("groupId")Integer groupId);
|
||||
public List<Integer> findOtherIps(@Param("groupId")Integer groupId,@Param("cfgId")Integer cfgId);
|
||||
public List<Integer> countValidIPs(@Param("groups")String groups,@Param("ids")String ids);
|
||||
public ConfigGroupInfo getInfoByAsnNo(@Param("asnId")Integer asnNo);
|
||||
public List<AsnIpCfg> getByAsnGroup(@Param("groupId")Integer groupId,@Param("asnId")Integer asnNo);
|
||||
public void deleteByAsnGroup(@Param("groupId")Integer groupId,@Param("asnId")Integer asnNo);
|
||||
}
|
||||
|
||||
@@ -206,7 +206,11 @@
|
||||
from asn_ip_cfg r
|
||||
where r.cfg_id in (${ids}) and is_valid !=-1
|
||||
</select>
|
||||
|
||||
<select id="getByAsnGroup" resultMap="asnIpCfgMap" parameterType="java.lang.Integer" >
|
||||
select
|
||||
<include refid="columns"></include>
|
||||
from asn_ip_cfg r where r.is_valid!=-1 and r.asn_ip_group=#{groupId} and r.user_region1=#{asnId}
|
||||
</select>
|
||||
<insert id="insert" parameterType="com.nis.domain.basics.AsnIpCfg" >
|
||||
insert into asn_ip_cfg (
|
||||
CFG_DESC,
|
||||
@@ -392,18 +396,23 @@
|
||||
<update id="updateValid" parameterType="com.nis.domain.basics.AsnIpCfg" >
|
||||
update asn_ip_cfg set is_valid=#{isValid} where cfg_id in (${ids})
|
||||
</update>
|
||||
<select id="findPolicyGroupInfosByType" resultType="com.nis.domain.specific.ConfigGroupInfo" parameterType="java.lang.Integer">
|
||||
select id,group_id,group_name,is_issued,insert_time,update_time,group_type
|
||||
from config_group_info c where c.group_type= #{groupId}
|
||||
</select>
|
||||
<!-- <update id="deleteByAsnGroup" parameterType="java.lang.Integer" >
|
||||
update asn_ip_cfg set is_valid=-1 where asn_ip_group=#{groupId} and user_region1=#{asnId}
|
||||
</update> -->
|
||||
<delete id="deleteByAsnGroup" parameterType="java.lang.Integer" >
|
||||
delete from asn_ip_cfg where asn_ip_group=#{groupId} and user_region1=#{asnId}
|
||||
</delete>
|
||||
<select id="findOtherIps" resultType="java.lang.Integer" parameterType="java.lang.Integer">
|
||||
select 1 from asn_ip_cfg where is_valid=1 and asn_ip_group=#{groupId} and cfg_id !=#{cfgId} limit 1
|
||||
</select>
|
||||
<select id="hasGroupIds" resultType="java.lang.Integer" parameterType="java.lang.Integer">
|
||||
select 1 from asn_ip_cfg where is_valid !=-1 and asn_ip_group in(${ids}) limit 1
|
||||
</select>
|
||||
<select id="countValidIPs" resultType="java.lang.Integer" parameterType="java.lang.Integer">
|
||||
<select id="countValidIPs" resultType="java.lang.Integer" parameterType="java.lang.String">
|
||||
select count(1) from asn_ip_cfg where is_valid !=-1 and asn_ip_group in(${groups}) and cfg_id not in(${ids}) GROUP BY asn_ip_group;
|
||||
</select>
|
||||
|
||||
<select id="getInfoByAsnNo" resultType="com.nis.domain.specific.ConfigGroupInfo" parameterType="java.lang.Integer">
|
||||
select id,group_id,group_name,is_issued,insert_time,update_time,group_type,compile_id,asn_id
|
||||
from config_group_info c where c.asn_id= #{asnId} and c.group_type=4
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1056,7 +1056,7 @@
|
||||
</update>
|
||||
<!-- update av_voip_ip_cfg表信息 -->
|
||||
<update id="updateAvVoipIp" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||
update av_voip_ip_cfg
|
||||
update ip_port_cfg
|
||||
<set >
|
||||
<trim suffixOverrides=",">
|
||||
<if test="cfgDesc != null and cfgDesc != ''" >
|
||||
|
||||
@@ -28,12 +28,14 @@ import com.nis.web.dao.MyBatisDao;
|
||||
@MyBatisDao
|
||||
public interface WebsiteCfgDao extends CrudDao<CfgIndexInfo>{
|
||||
|
||||
public List<CfgIndexInfo> getCfgIndexInfos(CfgIndexInfo entity);
|
||||
public CfgIndexInfo getCfgIndexInfo(Long id);
|
||||
public List<CfgIndexInfo> getWebsiteList(CfgIndexInfo entity);
|
||||
public List<IpPortCfg> getIpPortList(CfgIndexInfo entity);
|
||||
public List<HttpUrlCfg> getHttpUrlList(CfgIndexInfo entity);
|
||||
public List<HttpResHeadCfg> getHttpResHdrList(CfgIndexInfo entity);
|
||||
public List<HttpBodyCfg> getHttpResBodyList(CfgIndexInfo entity);
|
||||
public List<HttpBodyCfg> getHttpBodyList(CfgIndexInfo entity);
|
||||
public List<HttpReqHeadCfg> getHttpReqHdrList(CfgIndexInfo entity);
|
||||
public List<HttpBodyCfg> getHttpReqBodyList(CfgIndexInfo entity);
|
||||
public void saveCfgIndex(CfgIndexInfo entity);
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
<result column="user_region3" property="userRegion3" jdbcType="VARCHAR" />
|
||||
<result column="user_region4" property="userRegion4" jdbcType="VARCHAR" />
|
||||
<result column="user_region5" property="userRegion5" jdbcType="VARCHAR" />
|
||||
<result column="source_compile_id" property="sourceCompileId" jdbcType="INTEGER" />
|
||||
<result column="cancel_request_id" property="cancelRequestId" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
<resultMap id="ipPortMap" type="com.nis.domain.configuration.IpPortCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
@@ -130,7 +132,7 @@
|
||||
a.CREATOR_ID,a.CREATE_TIME,a.EDITOR_ID,a.EDIT_TIME,a.AUDITOR_ID,a.AUDIT_TIME,
|
||||
a.SERVICE_ID,a.REQUEST_ID,a.COMPILE_ID,a.IS_AREA_EFFECTIVE,a.CLASSIFY,
|
||||
a.ATTRIBUTE,a.LABLE,a.AREA_EFFECTIVE_IDS,a.function_id,a.dns_strategy_id,a.user_region1,
|
||||
a.user_region2,a.user_region3,a.user_region4,a.user_region5,a.do_log
|
||||
a.user_region2,a.user_region3,a.user_region4,a.user_region5,a.do_log,a.source_compile_id,a.cancel_request_id
|
||||
</sql>
|
||||
<sql id="IpCfg_Column" >
|
||||
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port
|
||||
@@ -328,6 +330,25 @@
|
||||
<include refid="ConfigIndex_Column" />
|
||||
FROM cfg_index_info a where cfg_id=#{cfgId}
|
||||
</select>
|
||||
<select id="getCfgIndexInfos" resultMap="CfgIndexInfoMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
||||
SELECT
|
||||
<include refid="ConfigIndex_Column" />
|
||||
FROM cfg_index_info a
|
||||
<where>
|
||||
<if test="cfgId != null">
|
||||
and cfg_id=#{cfgId}
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
and compileId=#{compileId}
|
||||
</if>
|
||||
<if test="functionId != null">
|
||||
and function_id=#{functionId}
|
||||
</if>
|
||||
<if test="sourceCompileId != null">
|
||||
and source_compile_id=#{sourceCompileId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="getIpPortList" resultMap="ipPortMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
||||
SELECT
|
||||
<include refid="IpCfg_Column" />
|
||||
@@ -336,7 +357,32 @@
|
||||
<select id="getHttpUrlList" resultMap="stringCfgMap">
|
||||
SELECT
|
||||
<include refid="StrCfg_Column" />
|
||||
FROM http_url_cfg a where compile_id=#{compileId} and function_id=#{functionId}
|
||||
FROM http_url_cfg a
|
||||
<where>
|
||||
<if test="compileId != null">
|
||||
AND a.compile_id =#{compileId}
|
||||
</if>
|
||||
<if test="functionId != null">
|
||||
AND a.function_id =#{functionId}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
<select id="getHttpBodyList" resultMap="stringCfgMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
||||
SELECT
|
||||
<include refid="StrCfg_Column" />
|
||||
FROM http_body_cfg a
|
||||
<where>
|
||||
<if test="compileId != null">
|
||||
AND a.compile_id =#{compileId}
|
||||
</if>
|
||||
<if test="functionId != null">
|
||||
AND a.function_id =#{functionId}
|
||||
</if>
|
||||
<if test="cfgType != null and cfgType !='' ">
|
||||
AND a.cfg_type =#{cfgType}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="getHttpReqBodyList" resultMap="stringCfgMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
||||
SELECT
|
||||
@@ -407,7 +453,8 @@
|
||||
user_region3,
|
||||
user_region4,
|
||||
user_region5,
|
||||
do_log
|
||||
do_log,
|
||||
source_compile_id
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
@@ -434,7 +481,8 @@
|
||||
#{userRegion3,jdbcType=VARCHAR},
|
||||
#{userRegion4,jdbcType=VARCHAR},
|
||||
#{userRegion5,jdbcType=VARCHAR},
|
||||
#{doLog,jdbcType=INTEGER}
|
||||
#{doLog,jdbcType=INTEGER},
|
||||
#{sourceCompileId,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<!-- insert ip_port_cfg表信息 -->
|
||||
@@ -883,6 +931,9 @@
|
||||
update ${tableName} set is_valid = #{isValid,jdbcType=INTEGER},
|
||||
editor_id = #{editorId,jdbcType=INTEGER} ,
|
||||
edit_time = #{editTime,jdbcType=TIMESTAMP}
|
||||
<if test="isAudit !=null ">
|
||||
,is_audit = #{isAudit,jdbcType=BIGINT}
|
||||
</if>
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="cfgId !=null ">
|
||||
AND cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
|
||||
@@ -18,4 +18,5 @@ public interface ConfigureStatisticsDao {
|
||||
public List<Object[]> getConfigStatisticTime();
|
||||
public List<Object[]> getRequestStatisticTime();
|
||||
public List<Object[]> getRequestStateStatistics(@Param("requestList")List<RequestInfo> requestList,@Param("serviceList")List<FunctionServiceDict> serviceList) ;
|
||||
public Integer getEffectiveCfgNum(@Param("serviceId")Integer serviceId);
|
||||
}
|
||||
|
||||
@@ -45,4 +45,7 @@
|
||||
from request_num_statistics c
|
||||
group by request_id)
|
||||
</select> -->
|
||||
<select id="getEffectiveCfgNum" resultType="Integer">
|
||||
select count(distinct c.compile_id) from cfg_num_statistics c where c.service_id=#{serviceId} and c.cfg_state=1;
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -44,6 +44,7 @@ public interface SpecificServiceCfgDao extends CrudDao<SpecificServiceCfg> {
|
||||
List<SpecificServiceCfg> getChildrenById(Integer specServiceId);
|
||||
|
||||
ConfigGroupInfo getConfigGroupInfoByGroupId(Integer groupId);
|
||||
ConfigGroupInfo findPolicyGroupInfosByType(@Param("groupType")Integer groupType);
|
||||
Integer getIssuedConfigGroupInfoByGroupIds(@Param("groupIds")String groupIds);
|
||||
|
||||
Integer insertConfigGroupInfo(ConfigGroupInfo entity);
|
||||
|
||||
@@ -237,4 +237,8 @@
|
||||
insert into config_group_info (id,group_id,group_name,is_issued,insert_time,group_type,compile_id,asn_id)
|
||||
values(#{id},#{groupId},#{groupName},#{isIssued},now(),#{groupType},#{compileId},#{asnId})
|
||||
</insert>
|
||||
<select id="findPolicyGroupInfosByType" resultType="com.nis.domain.specific.ConfigGroupInfo" parameterType="java.lang.Integer">
|
||||
select id,group_id,group_name,is_issued,insert_time,update_time,group_type,compile_id,asn_id
|
||||
from config_group_info c where c.group_type= #{groupType}
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user