insert into application_key(
application_key_id,id_card,sex,type_flag,machine_id,type_cd,name,tel,start_time,state,end_time,community_id,pwd,age
) values (
#{applicationKeyId},#{idCard},#{sex},#{typeFlag},#{machineId},#{typeCd},#{name},#{tel},#{startTime},#{state},#{endTime},#{communityId},#{pwd},#{age}
)
update application_key t set t.status_cd = #{statusCd}
,t.b_id = #{newBId}
, t.id_card= #{idCard}
, t.sex= #{sex}
, t.type_flag= #{typeFlag}
, t.machine_id= #{machineId}
, t.type_cd= #{typeCd}
, t.name= #{name}
, t.tel= #{tel}
, t.start_time= #{startTime}
, t.state= #{state}
, t.end_time= #{endTime}
, t.community_id= #{communityId}
, t.pwd= #{pwd}
, t.age= #{age}
where 1=1
and t.application_key_id= #{applicationKeyId}