添加删除方法deleteByCompileIds,传入前台传入的compileIds串,批量删除区域IP时调用此方法

This commit is contained in:
wangxin
2018-06-14 16:55:54 +08:00
parent f5d1409dca
commit ba536b63d3
3 changed files with 5 additions and 10 deletions

View File

@@ -29,4 +29,5 @@ public interface IpCfgDao extends CrudDao<BaseIpCfg>{
public int getIsAudit(@Param("tableName")String tableName,@Param("cfgId")Long id);
public int getIsAudit(BaseIpCfg entity);
public int deleteByCompileId(BaseIpCfg entity);
public int deleteByCompileIds(@Param("user")long user,@Param("tableName")String tableName,@Param("compileIds")String compileIds);
}

View File

@@ -543,4 +543,7 @@
<update id="deleteByCompileId" parameterType="com.nis.domain.configuration.BaseIpCfg" >
update ${tableName} set is_valid = -1, editor_id = #{editorId,jdbcType=INTEGER} , edit_time = #{editTime,jdbcType=TIMESTAMP} where compile_id = #{compileId,jdbcType=INTEGER}
</update>
<update id="deleteByCompileIds" parameterType="com.nis.domain.configuration.BaseIpCfg" >
update ${tableName} set is_valid = -1, editor_id = #{user,jdbcType=INTEGER} , edit_time = NOW() where compile_id in (${compileIds})
</update>
</mapper>