被策略引用的地址池配置不可取消.
This commit is contained in:
@@ -46,8 +46,5 @@ public interface IpCfgDao extends CrudDao<BaseIpCfg>{
|
||||
public void updateCfgValid(BaseCfg entity);
|
||||
public void auditCfg(BaseCfg entity);
|
||||
public List<CfgIndexInfo> getIpCfgList(CfgIndexInfo entity);
|
||||
|
||||
// 校验地址池是否被策略引用
|
||||
public List<BaseIpCfg> checkAddrPoolIsUsed(@Param("addrPoolId")String addrPoolId);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1143,14 +1143,4 @@
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<select id="checkAddrPoolIsUsed" resultMap="BaseIpMap">
|
||||
SELECT
|
||||
<include refid="BaseIpCfg_Column_List_with_id" />
|
||||
FROM
|
||||
ip_port_cfg
|
||||
WHERE
|
||||
is_valid != -1 AND
|
||||
ir_type IS NOT NULL AND
|
||||
user_region2 = #{addrPoolId,jdbcType=VARCHAR}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -21,5 +21,8 @@ public interface IpMultiplexDao extends CrudDao<IpMultiplexDao>{
|
||||
void updatePolicyCfg(IpReusePolicyCfg entity);
|
||||
|
||||
String getUserType(@Param("userName")String userName);
|
||||
|
||||
// 校验地址池是否被引用
|
||||
List<IpReusePolicyCfg> checkAddrPoolIsUsed(@Param("addrPoolId")String addrPoolId);
|
||||
|
||||
}
|
||||
|
||||
@@ -311,4 +311,13 @@
|
||||
WHERE cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
|
||||
</update>
|
||||
|
||||
<select id="checkAddrPoolIsUsed" resultMap="policyMap">
|
||||
SELECT
|
||||
<include refid="policyColumns"/>
|
||||
FROM
|
||||
ip_reuse_policy_cfg r
|
||||
WHERE
|
||||
r.addr_pool_id = #{addrPoolId} AND r.is_valid != -1
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user