增加删除所有配置规则功能.
This commit is contained in:
@@ -4,6 +4,8 @@ package com.nis.web.dao;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.SysOffice;
|
||||
|
||||
@MyBatisDao
|
||||
@@ -27,6 +29,8 @@ public interface SysOfficeDao extends TreeDao<SysOffice> {
|
||||
List<SysOffice> selectOfficeForDeptment(Map map);
|
||||
|
||||
List<SysOffice> selectOfficeForLetter(Map<String, Object> hmap);
|
||||
|
||||
void clearPolicies(@Param("tableName")String tableName);
|
||||
|
||||
|
||||
}
|
||||
@@ -327,5 +327,10 @@
|
||||
<if test="dbName == 'mysql'">CONCAT('%,', #{id}, ',%')</if>
|
||||
</update>
|
||||
|
||||
<update id="clearPolicies" parameterType="java.lang.String">
|
||||
UPDATE ${tableName}
|
||||
SET is_valid = -1, is_audit = 0
|
||||
WHERE is_valid != -1
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -30,5 +30,6 @@ public interface AsnGroupInfoDao extends CrudDao<AsnGroupInfo> {
|
||||
Long getCount();
|
||||
void modifyIssuedIp(AsnGroupInfo info);
|
||||
void updateIpNum(@Param("v4Num")long v4Num,@Param("v6Num")long v6Num,@Param("groupId")Integer groupId);
|
||||
List<Object[]> getASNIPNum(@Param("asnNo")Integer asnNo);
|
||||
List<Object[]> getASNIPNum(@Param("asnNo")Integer asnNo);
|
||||
void reLoadGroupInfo();
|
||||
}
|
||||
@@ -290,5 +290,18 @@
|
||||
</update>
|
||||
<select id="getASNIPNum" resultType="map">
|
||||
select v4_num,v6_num from asn_group_info where asn_id=#{asnNo}
|
||||
</select>
|
||||
</select>
|
||||
|
||||
<update id="reLoadGroupInfo">
|
||||
UPDATE asn_group_info SET
|
||||
issued_ips = 0,
|
||||
is_used = 0,
|
||||
org_group_id = null,
|
||||
region_id = 0,
|
||||
v4_num = 0,
|
||||
v6_num = 0,
|
||||
only_group_id = null
|
||||
WHERE is_valid != -1
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -23,4 +23,5 @@ public interface ConfigGroupInfoDao extends CrudDao<ConfigGroupInfo>{
|
||||
//获取asn组织的groupId
|
||||
ConfigGroupInfo getAsnGroupByName(@Param("groupName")String groupName);
|
||||
int delAsnGroup(@Param("groupName")String groupName);
|
||||
void reLoadGroupInfo();
|
||||
}
|
||||
|
||||
@@ -90,4 +90,8 @@
|
||||
<delete id="delAsnGroup" parameterType="java.lang.String">
|
||||
delete from config_group_info where group_name=#{groupName} and group_type=4
|
||||
</delete>
|
||||
|
||||
<delete id="reLoadGroupInfo">
|
||||
DELETE FROM config_group_info WHERE group_type = 1
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user