数据不存在时插入
INSERT INTO yk_member_relation (
id,
member_id,
yk_member_id,
create_time
)
SELECT
#{id,jdbcType=BIGINT},#{memberId,jdbcType=BIGINT},#{ykMemberId,jdbcType=BIGINT},#{createTime,jdbcType=TIMESTAMP}
FROM
DUAL
WHERE
NOT EXISTS (
SELECT
member_id,
yk_member_id
FROM
yk_member_relation
WHERE
member_id = #{memberId,jdbcType=BIGINT} and yk_member_id = #{ykMemberId,jdbcType=BIGINT} )