<update id="synch" parameterType="com.model.PolicyBkQw">
IF EXISTS
(
select _tmp.pindex as c from t_policy_bk_qw _tmp with(nolock,index=u_index_pindex) where _tmp.pindex = #{pindex,jdbcType=VARCHAR}
)
BEGIN
update t_policy_bk_qw set state=#{state,jdbcType=CHAR}
,updatetime = #{updatetime,jdbcType=TIMESTAMP}
,seatnum = #{seatnum,jdbcType=INTEGER}
where pindex = #{pindex,jdbcType=VARCHAR}
END
ELSE
BEGIN
INSERT INTO t_policy_bk_qw (pindex,[state],updatetime,seatnum) VALUES(
#{pindex,jdbcType=VARCHAR}
,#{state,jdbcType=CHAR}
,#{updatetime,jdbcType=TIMESTAMP}
,#{seatnum,jdbcType=INTEGER}
)
END
</update>
void synch(PolicyBkQw policyBkQw)throws SQLException;