(1)修复in() sql中 使用了#导致的bug,#修改为$
(2)asn 策略组删除时判断其下有没有新增的ip,如果有,则不允许删除
This commit is contained in:
@@ -14,6 +14,7 @@ public interface AsnIpCfgDao extends CrudDao<AsnIpCfg>{
|
||||
public void updateValid(@Param("isValid")Integer isValid,@Param("ids")String ids);
|
||||
public void updateIssued(AsnIpCfg cfg);
|
||||
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<Integer> findOtherIps(@Param("groupId")Integer groupId,@Param("cfgId")Integer cfgId);
|
||||
|
||||
@@ -198,7 +198,7 @@
|
||||
select
|
||||
<include refid="columns"></include>
|
||||
from asn_ip_cfg r
|
||||
where r.cfg_id in (#{ids})
|
||||
where r.cfg_id in (${ids}) and is_valid !=-1
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.nis.domain.basics.AsnIpCfg" >
|
||||
@@ -374,7 +374,7 @@
|
||||
</where>
|
||||
</update>
|
||||
<update id="updateValid" parameterType="com.nis.domain.basics.AsnIpCfg" >
|
||||
update asn_ip_cfg set is_valid=#{isValid} where cfg_id in (#{ids})
|
||||
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
|
||||
@@ -383,5 +383,8 @@
|
||||
<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 2
|
||||
</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 2
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user