insert into renting_appointment(
msg,tenant_tel,tenant_name,appointment_time,appointment_room_id,appointment_id,remark,state,tenant_sex,store_id,
room_id,renting_id
) values (
#{msg},#{tenantTel},#{tenantName},#{appointmentTime},#{appointmentRoomId},#{appointmentId},#{remark},#{state},
#{tenantSex},#{storeId},#{roomId},#{rentingId}
)
update renting_appointment t set t.status_cd = #{statusCd}
,t.b_id = #{newBId}
, t.msg= #{msg}
, t.tenant_tel= #{tenantTel}
, t.tenant_name= #{tenantName}
, t.appointment_time= #{appointmentTime}
, t.appointment_room_id= #{appointmentRoomId}
, t.remark= #{remark}
, t.state= #{state}
, t.tenant_sex= #{tenantSex}
, t.store_id= #{storeId}
, t.room_id= #{roomId}
,t.renting_id= #{rentingId}
where 1=1
and t.appointment_id= #{appointmentId}