insert into c_app(
status_cd,app_id,black_list_ip,name,security_code,remark,while_list_ip
) values (
'0',#{appId},#{blackListIp},#{name},#{securityCode},#{remark},#{whileListIp}
)
insert into c_app(
app_id,black_list_ip,name,security_code,remark,status_cd,while_list_ip
) select t.app_id,t.black_list_ip,t.name,t.security_code,t.remark,'0',t.while_list_ip from business_app t where 1=1
and t.operate= 'ADD'
and t.app_id= #{appId}
and t.black_list_ip= #{blackListIp}
and t.name= #{name}
and t.security_code= #{securityCode}
and t.remark= #{remark}
and t.while_list_ip= #{whileListIp}
update c_app t set t.status_cd = #{statusCd}
, t.black_list_ip= #{blackListIp}
, t.name= #{name}
, t.security_code= #{securityCode}
, t.remark= #{remark}
, t.while_list_ip= #{whileListIp}
where 1=1
and t.app_id= #{appId}