Merge branch 'develop' of https://git.mesalab.cn/K18_NTCS_WEB/NTC.git
into develop Conflicts: src/main/java/com/nis/domain/configuration/CfgIndexInfo.java src/main/resources/nis.properties src/main/webapp/WEB-INF/tags/sys/delRow.tag asn相关功能更改: IP ADDR:增加asn域 1、新增IP ADDR可选asn,如果asn未下发过(is_used=0),下发时asn的group需要标记为commonGroup(groupId为asn组织的groupId,regionId为asn的regionId)。 2、如果所选的asn组(asn组织的groupId)已经下发过(is_used=1),则下发maat时,asn域不需要下发。 3、策略取消时,如果有需要保留的公共组(commongRroupIds),需要将公共组的组号下发。 ASN GROUP: 1、新增asn,如果此asn的组织groupId已下发过(is_used=1),且此组织的groupId已被策略标记过全选(is_audit_all=1),则需要调用公共组域新增的接口,将新增的asn关键字下发。 2、修改asn,如果此asn的组织groupId已下发过(is_used=1),则需要调用公共组域修改的接口,修改已经下发的asn关键字域。 3、删除asn,如果此asn的组织groupId已下发过(is_used=1),则需要调用公共组域删除的接口,删除已经下发的asn关键字域。 ASN IP CFG: 1、新增asn ip,所选asn no的组首次下发(is_valid=0),需要将asn no的groupId标记为公共组;如果asn no非首次下发(is_valid=1),直接调用公共组新增域的接口。 2、修改 生效状态asn ip修改,调用公共组修改域接口直接修改 3、失效 直接调用公共组删除域接口,失效asn ip域
This commit is contained in:
@@ -29,4 +29,7 @@ public interface AsnGroupInfoDao extends CrudDao<AsnGroupInfo> {
|
||||
List<AsnGroupInfo> findAsnGroupInfos();
|
||||
Long getCount();
|
||||
void modifyIssuedIp(AsnGroupInfo info);
|
||||
List<AsnGroupInfo> findAsnGroupInfoByAsnGroup(AsnGroupInfo asnGroupInfo);
|
||||
void updateIsUsedAndIsValid(@Param("asnNos")List asnNos,@Param("isUsed")Integer isUsed,@Param("isValid")Integer isValid);
|
||||
List<AsnGroupInfo> findAsnGroupInfoByAsnNos(@Param("asnNos")List asnNos,@Param("isUsed")Integer isUsed);
|
||||
}
|
||||
@@ -15,10 +15,12 @@
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="asn_id" property="asnId" jdbcType="BIGINT" />
|
||||
<result column="issued_ips" property="issuedIPs" jdbcType="INTEGER" />
|
||||
<result column="is_used" property="isUsed" jdbcType="INTEGER" />
|
||||
<result column="region_id" property="regionId" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
<sql id="AsnGroupInfoColumns">
|
||||
r.id,r.group_id,r.compile_id,r.organization,r.country,r.detail,r.is_valid,r.create_time,r.edit_time,
|
||||
r.creator_id,r.editor_id,r.asn_id,r.issued_ips
|
||||
r.creator_id,r.editor_id,r.asn_id,r.issued_ips,r.is_used,r.region_id
|
||||
</sql>
|
||||
|
||||
<!-- 查出所有 有效数据-->
|
||||
@@ -79,7 +81,7 @@
|
||||
<select id="findAsnGroupInfos" resultMap="AsnGroupInfoMap">
|
||||
SELECT
|
||||
<include refid="AsnGroupInfoColumns"/>
|
||||
FROM asn_group_info r where is_valid !=-1
|
||||
FROM asn_group_info r where r.is_valid !=-1
|
||||
</select>
|
||||
<select id="getCount" resultType="java.lang.Long">
|
||||
SELECT count(1)
|
||||
@@ -87,7 +89,20 @@
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.nis.domain.basics.AsnGroupInfo" >
|
||||
insert into asn_group_info(group_id,compile_id,organization,country,detail,is_valid,creator_id,create_time,editor_id,edit_time,asn_id
|
||||
insert into asn_group_info(
|
||||
group_id,
|
||||
compile_id,
|
||||
organization,
|
||||
country,
|
||||
detail,
|
||||
is_valid,
|
||||
creator_id,
|
||||
create_time,
|
||||
editor_id,
|
||||
edit_time,
|
||||
asn_id,
|
||||
is_used,
|
||||
region_id
|
||||
)values (
|
||||
#{groupId,jdbcType=INTEGER},
|
||||
#{compileId,jdbcType=INTEGER},
|
||||
@@ -99,7 +114,9 @@
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
#{editorId,jdbcType=INTEGER},
|
||||
#{editTime,jdbcType=TIMESTAMP},
|
||||
#{asnId,jdbcType=INTEGER}
|
||||
#{asnId,jdbcType=INTEGER},
|
||||
#{isUsed,jdbcType=INTEGER},
|
||||
#{regionId,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
|
||||
@@ -137,6 +154,12 @@
|
||||
<if test="editTime != null and editTime != ''" >
|
||||
edit_time = #{editTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="isUsed != null" >
|
||||
is_used = #{isUsed,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="regionId != null" >
|
||||
region_id = #{regionId,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
<where>
|
||||
@@ -147,6 +170,28 @@
|
||||
</trim>
|
||||
</where>
|
||||
</update>
|
||||
<update id="updateIsUsedAndIsValid" >
|
||||
update asn_group_info
|
||||
<set >
|
||||
<if test="isUsed != null" >
|
||||
is_used = #{isUsed,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isValid != null" >
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
<where>
|
||||
<if test="asnNos != null" >
|
||||
and asn_id in
|
||||
<foreach collection ="asnNos" item="asnId" separator ="," open="(" close=")">
|
||||
#{asnId}
|
||||
</foreach >
|
||||
</if>
|
||||
<if test="isValid != null" >
|
||||
and is_valid != #{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
<update id="updateValid" parameterType="com.nis.domain.basics.AsnGroupInfo" >
|
||||
update asn_group_info
|
||||
<set >
|
||||
@@ -205,7 +250,7 @@
|
||||
<select id="getByGroupId" resultType="com.nis.domain.basics.AsnGroupInfo">
|
||||
select <include refid="AsnGroupInfoColumns"/>
|
||||
from asn_group_info r
|
||||
where r.group_id =#{groupId} and is_valid !=-1
|
||||
where r.group_id =#{groupId} and r.is_valid !=-1
|
||||
</select>
|
||||
<select id="getGroupInfoByName" resultType="com.nis.domain.basics.AsnGroupInfo">
|
||||
select <include refid="AsnGroupInfoColumns"/>
|
||||
@@ -243,13 +288,13 @@
|
||||
SELECT
|
||||
<include refid="AsnGroupInfoColumns"/>
|
||||
FROM
|
||||
asn_group_info r WHERE group_id = #{groupId,jdbcType=INTEGER} AND is_valid !=-1
|
||||
asn_group_info r WHERE r.group_id = #{groupId,jdbcType=INTEGER} AND r.is_valid !=-1
|
||||
</select>
|
||||
<select id="getConfigGroupInfoByName" resultType="com.nis.domain.basics.AsnGroupInfo">
|
||||
SELECT
|
||||
<include refid="AsnGroupInfoColumns"/>
|
||||
FROM
|
||||
asn_group_info r WHERE organization = #{organization,jdbcType=VARCHAR} AND is_valid !=-1
|
||||
asn_group_info r WHERE r.organization = #{organization,jdbcType=VARCHAR} AND r.is_valid !=-1
|
||||
</select>
|
||||
<select id="getValidConfigGroupInfoByName" resultType="com.nis.domain.basics.AsnGroupInfo">
|
||||
SELECT
|
||||
@@ -278,11 +323,49 @@
|
||||
asn_group_info r
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="organization != null and organization != ''" >
|
||||
AND organization = #{organization,jdbcType=VARCHAR}
|
||||
AND r.organization = #{organization,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="asnId != null" >
|
||||
AND asn_id = #{asnId,jdbcType=INTEGER}
|
||||
AND r.asn_id = #{asnId,jdbcType=INTEGER}
|
||||
</if>
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
<select id="findAsnGroupInfoByAsnGroup" resultMap="AsnGroupInfoMap">
|
||||
SELECT
|
||||
<include refid="AsnGroupInfoColumns"/>
|
||||
FROM
|
||||
asn_group_info r
|
||||
<where>
|
||||
<if test="asnId != null" >
|
||||
AND r.asn_id = #{asnId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isUsed != null" >
|
||||
AND r.is_used = #{isUsed,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="organization != null and organization != ''" >
|
||||
AND r.organization = #{organization,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="isValid != null" >
|
||||
AND r.is_valid = #{isValid,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="findAsnGroupInfoByAsnNos" resultMap="AsnGroupInfoMap">
|
||||
SELECT
|
||||
<include refid="AsnGroupInfoColumns"/>
|
||||
FROM
|
||||
asn_group_info r
|
||||
<where>
|
||||
<if test="isUsed != null" >
|
||||
AND r.is_used = #{isUsed,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="asnNos != null" >
|
||||
and r.asn_id in
|
||||
<foreach collection ="asnNos" item="asnId" separator ="," open="(" close=")">
|
||||
#{asnId}
|
||||
</foreach >
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -4,6 +4,7 @@ import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.basics.AsnGroupInfo;
|
||||
import com.nis.domain.basics.AsnIpCfg;
|
||||
import com.nis.domain.basics.Varibles;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
@@ -20,6 +21,7 @@ public interface AsnIpCfgDao extends CrudDao<AsnIpCfg>{
|
||||
public List<Integer> hasASNIds(@Param("ids")String ids);
|
||||
public List<Integer> hasASNIpAddrs(@Param("ids")String ids);
|
||||
public List<AsnIpCfg> findAllList(AsnIpCfg cfg);
|
||||
public List<AsnIpCfg> findAllListByAsnGroup(@Param("entity")AsnIpCfg entity,@Param("asnGroups")List<AsnGroupInfo> asnGroups,@Param("asnIds")String asnIds);
|
||||
// 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);
|
||||
@@ -32,4 +34,5 @@ public interface AsnIpCfgDao extends CrudDao<AsnIpCfg>{
|
||||
public int hasValidAsnIp(@Param("asnId")Long asnNo);
|
||||
public AsnIpCfg getOne(AsnIpCfg cfg);
|
||||
public void updateAsn(@Param("asnId")String asnNo,@Param("organization")String organization,@Param("country")String country,@Param("detail")String detail);
|
||||
public void updateAsnIpByAsnGroups(@Param("entity")AsnIpCfg entity,@Param("asnGroups")List<AsnGroupInfo> asnGroups,@Param("asnIds")String asnIds);
|
||||
}
|
||||
|
||||
@@ -308,6 +308,26 @@
|
||||
AND r.asn_ip_group =#{asnIpGroup}
|
||||
</if>
|
||||
</select>
|
||||
<select id="findAllListByAsnGroup" resultMap="asnIpCfgMap">
|
||||
select
|
||||
<include refid="columns"></include>
|
||||
from asn_ip_cfg r
|
||||
<where>
|
||||
and is_valid=#{entity.isValid,jdbcType=INTEGER}
|
||||
and is_audit=#{entity.isAudit,jdbcType=INTEGER}
|
||||
<if test=" asnGroups != null">
|
||||
and r.user_region1 in
|
||||
<foreach collection ="asnGroups" item="asnGroup" separator ="," open="(" close=")">
|
||||
#{asnGroup.asnId,jdbcType=INTEGER}
|
||||
</foreach >
|
||||
</if>
|
||||
<if test=" asnIds != null and asnIds !=''">
|
||||
and r.user_region1 in (select asn_id from asn_group_info where asn_id in(${asnIds}) and is_used=0)
|
||||
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
<select id="getByIds" resultMap="asnIpCfgMap">
|
||||
select
|
||||
<include refid="columns"></include>
|
||||
@@ -627,6 +647,26 @@
|
||||
<!-- left join policy_group_info d on r.asn_ip_group = d.service_group_id -->
|
||||
where r.CFG_ID in (${ids})
|
||||
</select>
|
||||
|
||||
<update id="updateAsnIpByAsnGroups" >
|
||||
update asn_ip_cfg set
|
||||
<if test=" asnIds != null and asnIds !=''">
|
||||
is_valid=#{entity.isValid} ,
|
||||
is_audit=#{entity.isAudit},
|
||||
</if>
|
||||
AUDITOR_ID = #{entity.auditorId,jdbcType=INTEGER}
|
||||
,AUDIT_TIME = #{entity.auditTime,jdbcType=TIMESTAMP}
|
||||
<where>
|
||||
<if test=" asnGroups != null">
|
||||
and user_region1 in
|
||||
<foreach collection ="asnGroups" item="asnGroup" separator ="," open="(" close=")">
|
||||
#{asnGroup.asnId,jdbcType=INTEGER}
|
||||
</foreach >
|
||||
</if>
|
||||
<if test=" asnIds != null and asnIds !=''">
|
||||
and user_region1 in (select asn_id from asn_group_info where asn_id in(${asnIds}) and is_used=0)
|
||||
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -115,6 +115,9 @@
|
||||
<result column="icmp_code" property="icmpCode" jdbcType="VARCHAR" />
|
||||
<result column="icmp_identifier" property="icmpIdentifier" jdbcType="VARCHAR" />
|
||||
<result column="header_type" property="headerType" jdbcType="VARCHAR" />
|
||||
<result column="payload_offset" property="payloadOffset" jdbcType="INTEGER" />
|
||||
<result column="payload_size" property="payloadSize" jdbcType="INTEGER" />
|
||||
<result column="payload_packet_direction" property="payloadPacketDirection" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<!-- APP字符串类配置映射 -->
|
||||
<resultMap id="AppStringFeatureCfgMap" type="com.nis.domain.configuration.AppStringFeatureCfg" >
|
||||
@@ -204,7 +207,7 @@
|
||||
r.ATTRIBUTE,r.LABLE,r.AREA_EFFECTIVE_IDS,r.FUNCTION_ID,r.CFG_TYPE,r.CFG_REGION_CODE,
|
||||
r.DISTRICT,r.CFG_KEYWORDS,r.EXPR_TYPE,r.MATCH_METHOD,r.IS_HEXBIN,r.DO_LOG,
|
||||
r.ver,r.ihl,r.tos,r.total_length,r.flags,r.fragment_offset,r.protocol,r.icmp_type,r.icmp_code,r.icmp_identifier,
|
||||
r.header_type
|
||||
r.header_type,r.payload_offset,r.payload_size,r.payload_packet_direction
|
||||
</sql>
|
||||
|
||||
<sql id="AppStringFeatureCfg_Column" >
|
||||
@@ -540,7 +543,8 @@
|
||||
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
|
||||
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,FUNCTION_ID,CFG_TYPE,CFG_REGION_CODE,
|
||||
DISTRICT,CFG_KEYWORDS,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN,DO_LOG,user_region1,user_region2,user_region3,user_region4,user_region5,
|
||||
ver,ihl,tos,total_length,flags,fragment_offset,protocol,icmp_type,icmp_code,icmp_identifier,header_type
|
||||
ver,ihl,tos,total_length,flags,fragment_offset,protocol,icmp_type,icmp_code,icmp_identifier,header_type,
|
||||
payload_offset,payload_size,payload_packet_direction
|
||||
)values (
|
||||
<include refid="AppCommonCfg_Value_List" />,
|
||||
#{cfgType,jdbcType=VARCHAR},#{cfgRegionCode,jdbcType=INTEGER},
|
||||
@@ -550,7 +554,8 @@
|
||||
#{userRegion3,jdbcType=VARCHAR},#{userRegion4,jdbcType=VARCHAR},#{userRegion5,jdbcType=VARCHAR},
|
||||
#{ver,jdbcType=VARCHAR},#{ihl,jdbcType=VARCHAR},#{tos,jdbcType=VARCHAR},#{totalLength,jdbcType=VARCHAR},
|
||||
#{flags,jdbcType=VARCHAR},#{fragmentOffset,jdbcType=VARCHAR},#{protocol,jdbcType=VARCHAR},#{icmpType,jdbcType=VARCHAR},
|
||||
#{icmpCode,jdbcType=VARCHAR},#{icmpIdentifier,jdbcType=VARCHAR},#{headerType,jdbcType=VARCHAR}
|
||||
#{icmpCode,jdbcType=VARCHAR},#{icmpIdentifier,jdbcType=VARCHAR},#{headerType,jdbcType=VARCHAR},
|
||||
#{payloadOffset,jdbcType=INTEGER},#{payloadSize,jdbcType=INTEGER},#{payloadPacketDirection,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
|
||||
@@ -562,7 +567,8 @@
|
||||
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
|
||||
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,FUNCTION_ID,CFG_TYPE,CFG_REGION_CODE,
|
||||
DISTRICT,CFG_KEYWORDS,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN,DO_LOG,user_region1,user_region2,user_region3,user_region4,user_region5,
|
||||
ver,ihl,tos,total_length,flags,fragment_offset,protocol,icmp_type,icmp_code,icmp_identifier,header_type
|
||||
ver,ihl,tos,total_length,flags,fragment_offset,protocol,icmp_type,icmp_code,icmp_identifier,header_type,
|
||||
payload_offset,payload_size,payload_packet_direction
|
||||
)values (
|
||||
<include refid="AppCommonCfg_Value_List" />,
|
||||
#{cfgType,jdbcType=VARCHAR},#{cfgRegionCode,jdbcType=INTEGER},
|
||||
@@ -572,7 +578,8 @@
|
||||
#{userRegion3,jdbcType=VARCHAR},#{userRegion4,jdbcType=VARCHAR},#{userRegion5,jdbcType=VARCHAR},
|
||||
#{ver,jdbcType=VARCHAR},#{ihl,jdbcType=VARCHAR},#{tos,jdbcType=VARCHAR},#{totalLength,jdbcType=VARCHAR},
|
||||
#{flags,jdbcType=VARCHAR},#{fragmentOffset,jdbcType=VARCHAR},#{protocol,jdbcType=VARCHAR},#{icmpType,jdbcType=VARCHAR},
|
||||
#{icmpCode,jdbcType=VARCHAR},#{icmpIdentifier,jdbcType=VARCHAR},#{headerType,jdbcType=VARCHAR}
|
||||
#{icmpCode,jdbcType=VARCHAR},#{icmpIdentifier,jdbcType=VARCHAR},#{headerType,jdbcType=VARCHAR},
|
||||
#{payloadOffset,jdbcType=INTEGER},#{payloadSize,jdbcType=INTEGER},#{payloadPacketDirection,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
<result column="dns_strategy_id" property="dnsStrategyId" jdbcType="INTEGER" />
|
||||
<result column="dns_strategy_name" property="dnsStrategyName" jdbcType="VARCHAR" />
|
||||
<result column="do_log" property="doLog" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="columns">
|
||||
@@ -44,7 +45,7 @@
|
||||
,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.area_effective_ids,r.function_id,r.cfg_region_code,r.dns_strategy_id
|
||||
,r.area_effective_ids,r.function_id,r.cfg_region_code,r.dns_strategy_id,r.do_log
|
||||
</sql>
|
||||
|
||||
<select id="findPage" resultMap="dnsIpCfgMap">
|
||||
@@ -239,7 +240,8 @@
|
||||
dest_ip_address,
|
||||
cfg_type,
|
||||
cfg_region_code,
|
||||
dns_strategy_id
|
||||
dns_strategy_id,
|
||||
do_log
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
@@ -272,7 +274,8 @@
|
||||
#{destIpAddress,jdbcType=VARCHAR},
|
||||
#{cfgType,jdbcType=VARCHAR},
|
||||
#{cfgRegionCode,jdbcType=INTEGER},
|
||||
#{dnsStrategyId,jdbcType=INTEGER}
|
||||
#{dnsStrategyId,jdbcType=INTEGER},
|
||||
#{doLog,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
|
||||
@@ -369,6 +372,9 @@
|
||||
</if>
|
||||
<if test="dnsStrategyId != null " >
|
||||
dns_strategy_id = #{dnsStrategyId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="doLog != null" >
|
||||
do_log = #{doLog,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
<result column="group_1_name" property="group1Name" jdbcType="VARCHAR" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="do_log" property="doLog" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
<sql id="DnsResStrategyColumns">
|
||||
r.cfg_id,r.cfg_desc,r.res_group_1_id,
|
||||
@@ -47,7 +48,7 @@
|
||||
,r.max_ttl,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.is_area_effective,r.classify,r.attribute,r.lable
|
||||
,r.is_area_effective,r.classify,r.attribute,r.lable,r.do_log
|
||||
,r.area_effective_ids,r.function_id,r.cfg_region_code,r.compile_id
|
||||
</sql>
|
||||
|
||||
@@ -229,7 +230,8 @@ LEFT JOIN dns_res_strategy r ON a.dns_strategy_id=r.res_group_1_id
|
||||
max_ttl,
|
||||
cfg_type,
|
||||
compile_Id,
|
||||
cfg_region_code
|
||||
cfg_region_code,
|
||||
do_log
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
@@ -263,7 +265,8 @@ LEFT JOIN dns_res_strategy r ON a.dns_strategy_id=r.res_group_1_id
|
||||
#{maxTtl,jdbcType=INTEGER},
|
||||
#{cfgType,jdbcType=VARCHAR},
|
||||
#{compileId,jdbcType=INTEGER},
|
||||
#{cfgRegionCode,jdbcType=INTEGER}
|
||||
#{cfgRegionCode,jdbcType=INTEGER},
|
||||
#{doLog,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
|
||||
@@ -358,6 +361,9 @@ LEFT JOIN dns_res_strategy r ON a.dns_strategy_id=r.res_group_1_id
|
||||
<if test="maxTtl != null" >
|
||||
max_ttl = #{maxTtl,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="doLog != null" >
|
||||
do_log = #{doLog,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
<where>
|
||||
|
||||
@@ -80,6 +80,7 @@
|
||||
<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="common_group_ids" property="commonGroupIds" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<resultMap id="ipPortMap" type="com.nis.domain.configuration.IpPortCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
@@ -198,7 +199,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.do_blacklist
|
||||
a.user_region2,a.user_region3,a.user_region4,a.user_region5,a.do_log,a.do_blacklist,a.common_group_ids
|
||||
</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
|
||||
@@ -812,6 +813,7 @@
|
||||
user_region5,
|
||||
do_log,
|
||||
do_blacklist
|
||||
,common_group_ids
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
@@ -839,7 +841,8 @@
|
||||
#{userRegion4,jdbcType=VARCHAR},
|
||||
#{userRegion5,jdbcType=VARCHAR},
|
||||
#{doLog,jdbcType=INTEGER},
|
||||
#{doBlackList,jdbcType=INTEGER}
|
||||
#{doBlackList,jdbcType=INTEGER},
|
||||
#{commonGroupIds,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="saveCfgIndexForBatch" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||
@@ -870,7 +873,8 @@
|
||||
user_region4,
|
||||
user_region5,
|
||||
do_log,
|
||||
do_blacklist
|
||||
do_blacklist,
|
||||
common_group_ids
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
@@ -898,7 +902,8 @@
|
||||
#{userRegion4,jdbcType=VARCHAR},
|
||||
#{userRegion5,jdbcType=VARCHAR},
|
||||
#{doLog,jdbcType=INTEGER},
|
||||
#{doBlackList,jdbcType=INTEGER}
|
||||
#{doBlackList,jdbcType=INTEGER},
|
||||
#{commonGroupIds,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<!-- insert ip_port_cfg表信息 -->
|
||||
@@ -990,6 +995,7 @@
|
||||
action = #{action,jdbcType=INTEGER},
|
||||
do_log = #{doLog,jdbcType=INTEGER},
|
||||
do_blacklist = #{doBlackList,jdbcType=INTEGER},
|
||||
common_group_ids = #{commonGroupIds,jdbcType=VARCHAR},
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
is_audit = #{isAudit,jdbcType=INTEGER},
|
||||
<if test="creatorId != null" >
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="do_log" property="doLog" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
<resultMap id="PxyObjTrustedCaCertMap" type="com.nis.domain.configuration.PxyObjTrustedCaCert" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
@@ -64,6 +65,7 @@
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="cancel_request_id" property="cancelRequestId" jdbcType="INTEGER" />
|
||||
<result column="do_log" property="doLog" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
<resultMap id="PxyObjTrustedCaCrlMap" type="com.nis.domain.configuration.PxyObjTrustedCaCrl" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
@@ -100,7 +102,7 @@
|
||||
,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.is_area_effective,r.classify,r.attribute,r.lable
|
||||
,r.area_effective_ids,r.function_id,r.cfg_region_code,r.compile_id,r.cancel_request_id
|
||||
,r.area_effective_ids,r.function_id,r.cfg_region_code,r.compile_id,r.cancel_request_id,r.do_log
|
||||
</sql>
|
||||
<sql id="PxyObjTrustedCaCrlColumns">
|
||||
r.cfg_id,r.cfg_desc
|
||||
@@ -131,7 +133,7 @@
|
||||
,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.is_area_effective,r.classify,r.attribute,r.lable
|
||||
,r.area_effective_ids,r.function_id,r.cfg_region_code,r.compile_id
|
||||
,r.area_effective_ids,r.function_id,r.cfg_region_code,r.compile_id,r.do_log
|
||||
</sql>
|
||||
|
||||
<!-- 查出所有 有效数据-->
|
||||
@@ -391,7 +393,8 @@
|
||||
alt_name,
|
||||
cfg_type,
|
||||
compile_Id,
|
||||
cfg_region_code
|
||||
cfg_region_code,
|
||||
do_log
|
||||
)values (
|
||||
#{cfgId,jdbcType=VARCHAR},
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
@@ -426,7 +429,8 @@
|
||||
#{altName,jdbcType=VARCHAR},
|
||||
#{cfgType,jdbcType=VARCHAR},
|
||||
#{compileId,jdbcType=INTEGER},
|
||||
#{cfgRegionCode,jdbcType=INTEGER}
|
||||
#{cfgRegionCode,jdbcType=INTEGER},
|
||||
#{doLog,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertPxyObjTrustedCaCert" parameterType="com.nis.domain.configuration.PxyObjTrustedCaCert" >
|
||||
@@ -454,7 +458,8 @@
|
||||
issuer,
|
||||
cfg_type,
|
||||
compile_Id,
|
||||
cfg_region_code
|
||||
cfg_region_code,
|
||||
do_log
|
||||
)values (
|
||||
#{cfgId,jdbcType=VARCHAR},
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
@@ -479,7 +484,8 @@
|
||||
#{issuer, jdbcType=VARCHAR},
|
||||
#{cfgType,jdbcType=VARCHAR},
|
||||
#{compileId,jdbcType=INTEGER},
|
||||
#{cfgRegionCode,jdbcType=INTEGER}
|
||||
#{cfgRegionCode,jdbcType=INTEGER},
|
||||
#{doLog,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
|
||||
@@ -546,6 +552,9 @@
|
||||
</if>
|
||||
<if test="issuer != null and issuer !=''" >
|
||||
issuer = #{issuer,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="doLog != null" >
|
||||
do_log = #{doLog,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
@@ -787,6 +796,9 @@
|
||||
<if test="altName != null and altName !=''" >
|
||||
alt_name = #{altName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="doLog != null" >
|
||||
do_log = #{doLog,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
<where>
|
||||
|
||||
@@ -180,8 +180,8 @@
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
0,
|
||||
0,
|
||||
#{isValid,jdbcType=INTEGER},
|
||||
#{isAudit,jdbcType=INTEGER},
|
||||
#{creatorId,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
#{editorId,jdbcType=INTEGER},
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.configuration.AsnKeywordCfg;
|
||||
import com.nis.domain.configuration.BaseCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
@@ -24,6 +25,7 @@ public interface StringCfgDao extends CrudDao<BaseStringCfg>{
|
||||
public List<BaseStringCfg> findList(BaseStringCfg entity) ;
|
||||
public int insert(BaseStringCfg entity) ;
|
||||
public int update(BaseStringCfg entity) ;
|
||||
public int updateAsnKeyword(BaseStringCfg entity) ;
|
||||
public int updateValid(BaseStringCfg entity) ;
|
||||
public int audit(BaseStringCfg entity) ;
|
||||
public int getIsValid(@Param("tableName")String tableName,@Param("cfgId")Long id);
|
||||
@@ -46,7 +48,7 @@ public interface StringCfgDao extends CrudDao<BaseStringCfg>{
|
||||
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 void deleteAsnKeyword(CfgIndexInfo entity);
|
||||
public void deleteAsnKeyword(BaseCfg entity);
|
||||
public List<NtcSubscribeIdCfg> findSubscribeIdCfgList(NtcSubscribeIdCfg ntcSubscribeIdCfg);
|
||||
public List<AsnKeywordCfg> findAsnKeywordCfgList(CfgIndexInfo entity);
|
||||
public void saveSubscribeIdCfg(NtcSubscribeIdCfg ntcSubscribeIdCfg);
|
||||
|
||||
@@ -483,6 +483,95 @@
|
||||
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
<update id="updateAsnKeyword" parameterType="com.nis.domain.configuration.BaseStringCfg" >
|
||||
update ${tableName}
|
||||
<set >
|
||||
<trim suffixOverrides=",">
|
||||
<if test="cfgDesc != null and cfgDesc != ''" >
|
||||
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
|
||||
</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="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="creatorId != null" >
|
||||
creator_id = #{creatorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createTime != null" >
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</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="serviceId != null" >
|
||||
service_id = #{serviceId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="requestId != null" >
|
||||
request_id = #{requestId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="compileId != null" >
|
||||
compile_id = #{compileId,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="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>
|
||||
<if test="areaEffectiveIds != null" >
|
||||
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="functionId != null" >
|
||||
function_id = #{functionId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="cfgRegionCode != null" >
|
||||
cfg_region_code = #{cfgRegionCode,jdbcType=INTEGER},
|
||||
</if>
|
||||
USER_REGION1=#{userRegion1,jdbcType=VARCHAR},
|
||||
USER_REGION2=#{userRegion2,jdbcType=VARCHAR},
|
||||
USER_REGION3=#{userRegion3,jdbcType=VARCHAR},
|
||||
USER_REGION4=#{userRegion4,jdbcType=VARCHAR},
|
||||
USER_REGION5=#{userRegion5,jdbcType=VARCHAR},
|
||||
</trim>
|
||||
</set>
|
||||
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
<update id="updateValid" parameterType="com.nis.domain.configuration.BaseStringCfg" >
|
||||
update ${tableName} set is_valid = #{isValid,jdbcType=INTEGER}, editor_id = #{editorId,jdbcType=INTEGER} , edit_time = #{editTime,jdbcType=TIMESTAMP} where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</update>
|
||||
@@ -752,7 +841,7 @@
|
||||
</if>
|
||||
</where>
|
||||
</delete>
|
||||
<delete id="deleteAsnKeyword" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||
<delete id="deleteAsnKeyword" parameterType="com.nis.domain.configuration.BaseCfg" >
|
||||
delete from asn_keyword_cfg
|
||||
<where>
|
||||
<if test="compileId != null" >
|
||||
|
||||
@@ -15,6 +15,7 @@ public interface ConfigGroupInfoDao extends CrudDao<ConfigGroupInfo>{
|
||||
void insertConfigGroupInfo(ConfigGroupInfo entity);
|
||||
int insertBatch(List<ConfigGroupInfo> list);
|
||||
void updateConfigGroupInfobyGroupId(ConfigGroupInfo entity);
|
||||
void updateAsnOrgGroupByGroupInfo(ConfigGroupInfo entity);
|
||||
ConfigGroupInfo getConfigGroupInfoByGroupId(Integer groupId);
|
||||
@Cacheable(value="asnNoCache",key="#asnNo")
|
||||
ConfigGroupInfo getInfoByAsnNo(@Param("asnId")Long asnNo);
|
||||
@@ -23,4 +24,6 @@ public interface ConfigGroupInfoDao extends CrudDao<ConfigGroupInfo>{
|
||||
//获取asn组织的groupId
|
||||
ConfigGroupInfo getAsnGroupByName(@Param("groupName")String groupName);
|
||||
int delAsnGroup(@Param("groupName")String groupName);
|
||||
void updateIsAuditAll(@Param("groupType")Integer groupType,@Param("isAuditAll")Integer isAuditAll,@Param("groupIds")List groupIds);
|
||||
void updateIsUsed(@Param("groupType")Integer groupType,@Param("isUsed")Integer isUsed,@Param("groupIds")List groupIds);
|
||||
}
|
||||
|
||||
@@ -10,11 +10,12 @@
|
||||
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
|
||||
<result column="group_type" property="groupType" jdbcType="INTEGER" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="asn_id" property="asnId" jdbcType="BIGINT" />
|
||||
<result column="is_audit_all" property="isAuditAll" jdbcType="INTEGER" />
|
||||
<result column="is_used" property="isUsed" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="columns">
|
||||
id,group_id,group_name,is_issued,insert_time,update_time,group_type,compile_id,asn_id
|
||||
id,group_id,group_name,is_issued,insert_time,update_time,group_type,compile_id,asn_id,is_audit_all
|
||||
</sql>
|
||||
<select id="findAllList" resultMap="configGroupInfoMap">
|
||||
select
|
||||
@@ -43,14 +44,14 @@
|
||||
</select>
|
||||
<!-- 新增配置分组信息 -->
|
||||
<insert id="insertConfigGroupInfo" parameterType="com.nis.domain.specific.ConfigGroupInfo" useGeneratedKeys="true">
|
||||
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 into config_group_info (id,group_id,group_name,is_issued,insert_time,group_type,compile_id,asn_id,is_audit_all,is_used)
|
||||
values(#{id},#{groupId},#{groupName},#{isIssued},now(),#{groupType},#{compileId},#{asnId},#{isAuditAll},#{isUsed})
|
||||
</insert>
|
||||
<insert id="insertBatch">
|
||||
insert into config_group_info (id,group_id,group_name,is_issued,insert_time,group_type,compile_id,asn_id)
|
||||
insert into config_group_info (id,group_id,group_name,is_issued,insert_time,group_type,compile_id,asn_id,is_audit_all,is_used)
|
||||
values
|
||||
<foreach collection ="list" item="info" separator =",">
|
||||
(#{info.id},#{info.groupId},#{info.groupName},#{info.isIssued},now(),#{info.groupType},#{info.compileId},#{info.asnId})
|
||||
(#{info.id},#{info.groupId},#{info.groupName},#{info.isIssued},now(),#{info.groupType},#{info.compileId},#{info.asnId},#{info.isAuditAll},#{info.isUsed})
|
||||
</foreach>
|
||||
</insert>
|
||||
<!-- 修改配置分组状态信息 -->
|
||||
@@ -62,16 +63,16 @@
|
||||
where group_id = #{groupId}
|
||||
</update>
|
||||
<select id="getInfoByAsnNo" resultType="com.nis.domain.specific.ConfigGroupInfo" parameterType="java.lang.Long">
|
||||
select id,group_id,group_name,is_issued,insert_time,update_time,group_type,compile_id,asn_id
|
||||
select id,group_id,group_name,is_issued,insert_time,update_time,group_type,compile_id,asn_id,is_audit_all,is_used
|
||||
from config_group_info c where c.asn_id= #{asnId} and c.group_type=4
|
||||
</select>
|
||||
<!-- 根据groupId查出配置分组信息 -->
|
||||
<select id="getConfigGroupInfoByGroupId" 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
|
||||
select id,group_id,group_name,is_issued,insert_time,update_time,group_type,compile_id,asn_id,is_audit_all,is_used
|
||||
from config_group_info where group_id= #{groupId}
|
||||
</select>
|
||||
<select id="getAsnGroupByName" resultType="com.nis.domain.specific.ConfigGroupInfo" parameterType="java.lang.String">
|
||||
select id,group_id,group_name,is_issued,insert_time,update_time,group_type,compile_id,asn_id
|
||||
select id,group_id,group_name,is_issued,insert_time,update_time,group_type,compile_id,asn_id,is_audit_all,is_used
|
||||
from config_group_info where group_type=4 and group_name= #{groupName}
|
||||
</select>
|
||||
<!-- <select id="findPolicyGroupInfosByType" resultType="com.nis.domain.specific.ConfigGroupInfo" parameterType="java.lang.Integer">
|
||||
@@ -87,4 +88,46 @@
|
||||
<delete id="delAsnGroup" parameterType="java.lang.String">
|
||||
delete from config_group_info where group_name=#{groupName} and group_type=4
|
||||
</delete>
|
||||
<update id="updateAsnOrgGroupByGroupInfo" parameterType="com.nis.domain.specific.ConfigGroupInfo">
|
||||
UPDATE config_group_info set is_issued = #{isIssued},update_time=now()
|
||||
<where>
|
||||
<if test="groupType != null">
|
||||
and group_type =#{groupType}
|
||||
</if>
|
||||
<if test="groupId != null ">
|
||||
and group_id =#{groupId}
|
||||
</if>
|
||||
<if test="groupName != null and groupName != ''">
|
||||
and group_name =#{groupName}
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
<update id="updateIsUsed" >
|
||||
UPDATE config_group_info set is_used = #{isUsed},update_time=now()
|
||||
<where>
|
||||
<if test="groupType != null">
|
||||
and group_type =#{groupType}
|
||||
</if>
|
||||
<if test="groupIds != null ">
|
||||
and group_id in
|
||||
<foreach collection ="groupIds" item="groupId" separator ="," open="(" close=")">
|
||||
#{groupId}
|
||||
</foreach >
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
<update id="updateIsAuditAll" >
|
||||
UPDATE config_group_info set is_audit_all = #{isAuditAll},update_time=now()
|
||||
<where>
|
||||
<if test="groupType != null">
|
||||
and group_type =#{groupType}
|
||||
</if>
|
||||
<if test="groupIds != null ">
|
||||
and group_id in
|
||||
<foreach collection ="groupIds" item="groupId" separator ="," open="(" close=")">
|
||||
#{groupId}
|
||||
</foreach >
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user