r.CFG_ID,r.ADDR_POOL_ID,r.IP_TOTAL,r.AVAILABLE_IP_TOTAL,r.ACTION,r.IS_VALID,r.IS_AUDIT,
r.CFG_REGION_CODE,r.CFG_TYPE,r.FUNCTION_ID,r.SERVICE_ID,r.COMPILE_ID,r.REQUEST_ID,
r.CLASSIFY,r.ATTRIBUTE,r.LABLE,
r.CREATOR_ID,r.CREATE_TIME,r.EDITOR_ID,r.EDIT_TIME,r.AUDITOR_ID,r.AUDIT_TIME,
r.DESCRIPTION,r.CANCEL_REQUEST_ID,r.IS_AREA_EFFECTIVE,r.AREA_EFFECTIVE_IDS,
r.USER_REGION1,r.USER_REGION2,r.USER_REGION3,r.USER_REGION4,r.USER_REGION5
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port
,a.protocol,a.protocol_id,a.direction,a.cfg_type,a.action,a.dest_port,a.dest_ip_address
,a.is_valid,a.is_audit,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.cfg_region_code
INSERT INTO ip_reuse_ip_cfg (
CFG_DESC,
ACTION,
IS_VALID,
IS_AUDIT,
CREATOR_ID,
CREATE_TIME,
EDITOR_ID,
EDIT_TIME,
AUDITOR_ID,
AUDIT_TIME,
SERVICE_ID,
REQUEST_ID,
COMPILE_ID,
IS_AREA_EFFECTIVE,
CLASSIFY,
ATTRIBUTE,
LABLE,
AREA_EFFECTIVE_IDS,
function_id,
ip_type,
src_ip_address,
ip_pattern,
port_pattern,
src_port,
protocol,
protocol_id,
direction,
dest_port,
dest_ip_address,
cfg_type,
cfg_region_code,
user_region1,
user_region2,
user_region3,
user_region4,
user_region5
)VALUES (
#{cfgDesc,jdbcType=VARCHAR},
#{action,jdbcType=INTEGER},
0,
0,
#{creatorId,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP},
#{editorId,jdbcType=INTEGER},
#{editTime,jdbcType=TIMESTAMP},
#{auditorId,jdbcType=INTEGER},
#{auditTime,jdbcType=TIMESTAMP},
#{serviceId,jdbcType=INTEGER},
#{requestId,jdbcType=INTEGER},
#{compileId,jdbcType=INTEGER},
#{isAreaEffective,jdbcType=INTEGER},
#{classify,jdbcType=VARCHAR},
#{attribute,jdbcType=VARCHAR},
#{lable,jdbcType=VARCHAR},
#{areaEffectiveIds,jdbcType=VARCHAR},
#{functionId,jdbcType=INTEGER},
#{ipType,jdbcType=INTEGER},
#{srcIpAddress,jdbcType=VARCHAR},
#{ipPattern,jdbcType=INTEGER},
#{portPattern,jdbcType=INTEGER},
#{srcPort,jdbcType=VARCHAR},
#{protocol,jdbcType=INTEGER},
#{protocolId,jdbcType=INTEGER},
#{direction,jdbcType=INTEGER},
#{destPort,jdbcType=VARCHAR},
#{destIpAddress,jdbcType=VARCHAR},
#{cfgType,jdbcType=VARCHAR},
#{cfgRegionCode,jdbcType=INTEGER},
#{userRegion1,jdbcType=VARCHAR},
#{userRegion2,jdbcType=VARCHAR},
#{userRegion3,jdbcType=VARCHAR},
#{userRegion4,jdbcType=VARCHAR},
#{userRegion5,jdbcType=VARCHAR}
)
INSERT INTO ip_reuse_addr_pool(
addr_pool_id,
addr_pool_name,
ip_total,
available_ip_total,
action,
is_valid,
is_audit,
cfg_type,
cfg_region_code,
function_id,
service_id,
compile_id,
is_area_effective,
area_effective_ids,
request_id,
classify,
attribute,
lable,
creator_id,
create_time,
editor_id,
edit_time,
auditor_id,
audit_time,
description,
user_region1,
user_region2,
user_region3,
user_region4,
user_region5
)VALUES (
#{addrPoolId,jdbcType=INTEGER},
#{addrPoolName,jdbcType=VARCHAR},
#{ipTotal,jdbcType=INTEGER},
#{availableIpTotal,jdbcType=INTEGER},
#{action,jdbcType=INTEGER},
0,
0,
#{cfgType,jdbcType=VARCHAR},
#{cfgRegionCode,jdbcType=INTEGER},
#{functionId,jdbcType=INTEGER},
#{serviceId,jdbcType=INTEGER},
#{compileId,jdbcType=INTEGER},
#{isAreaEffective,jdbcType=INTEGER},
#{areaEffectiveIds,jdbcType=VARCHAR},
#{requestId,jdbcType=INTEGER},
#{classify,jdbcType=VARCHAR},
#{attribute,jdbcType=VARCHAR},
#{lable,jdbcType=VARCHAR},
#{creatorId,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP},
#{editorId,jdbcType=INTEGER},
#{editTime,jdbcType=TIMESTAMP},
#{auditorId,jdbcType=INTEGER},
#{auditTime,jdbcType=TIMESTAMP},
#{description,jdbcType=VARCHAR},
#{userRegion1,jdbcType=VARCHAR},
#{userRegion2,jdbcType=VARCHAR},
#{userRegion3,jdbcType=VARCHAR},
#{userRegion4,jdbcType=VARCHAR},
#{userRegion5,jdbcType=VARCHAR}
)
DELETE FROM ip_reuse_ip_cfg WHERE user_region1 = #{addrPoolId}
update ip_reuse_addr_pool
addr_pool_id = #{addrPoolId,jdbcType=INTEGER},
ip_total = #{ipTotal,jdbcType=INTEGER},
available_ip_total = #{availableIpTotal,jdbcType=INTEGER},
action = #{action,jdbcType=INTEGER},
is_valid = #{isValid,jdbcType=INTEGER},
is_audit = #{isAudit,jdbcType=INTEGER},
creator_id = #{creatorId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
editor_id = #{editorId,jdbcType=INTEGER},
edit_time = #{editTime,jdbcType=TIMESTAMP},
auditor_id = #{auditorId,jdbcType=INTEGER},
audit_time = #{auditTime,jdbcType=TIMESTAMP},
service_id = #{serviceId,jdbcType=INTEGER},
request_id = #{requestId,jdbcType=INTEGER},
is_area_effective = #{isAreaEffective,jdbcType=INTEGER},
classify = #{classify,jdbcType=VARCHAR},
attribute = #{attribute,jdbcType=VARCHAR},
lable = #{lable,jdbcType=VARCHAR},
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
function_id = #{functionId,jdbcType=INTEGER},
description = #{description,jdbcType=VARCHAR},
where cfg_id = #{cfgId,jdbcType=BIGINT}