@@ -7,7 +7,14 @@
|
||||
audit_id, event_type, key_id, object_id, status, row_count, error_code, message, created_at
|
||||
) VALUES (
|
||||
cb_ords_probe_audit_seq.NEXTVAL,
|
||||
#{eventType}, #{keyId}, #{objectId}, #{status}, #{rowCount}, #{errorCode}, #{message}, SYSTIMESTAMP
|
||||
#{eventType,jdbcType=VARCHAR},
|
||||
#{keyId,jdbcType=NUMERIC},
|
||||
#{objectId,jdbcType=NUMERIC},
|
||||
#{status,jdbcType=VARCHAR},
|
||||
#{rowCount,jdbcType=NUMERIC},
|
||||
#{errorCode,jdbcType=VARCHAR},
|
||||
#{message,jdbcType=VARCHAR},
|
||||
SYSTIMESTAMP
|
||||
)
|
||||
</insert>
|
||||
</mapper>
|
||||
|
||||
@@ -26,18 +26,24 @@
|
||||
INSERT INTO cb_agent_bearer_key (
|
||||
key_id, user_id, key_prefix, key_hash, expires_at, revoked_at, description
|
||||
) VALUES (
|
||||
#{keyId}, #{userId}, #{keyPrefix}, #{keyHash}, #{expiresAt}, #{revokedAt}, #{description}
|
||||
#{keyId,jdbcType=NUMERIC},
|
||||
#{userId,jdbcType=NUMERIC},
|
||||
#{keyPrefix,jdbcType=VARCHAR},
|
||||
#{keyHash,jdbcType=VARCHAR},
|
||||
#{expiresAt,jdbcType=TIMESTAMP},
|
||||
#{revokedAt,jdbcType=TIMESTAMP},
|
||||
#{description,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="revokeToken">
|
||||
UPDATE cb_agent_bearer_key
|
||||
SET revoked_at = #{revokedAt},
|
||||
SET revoked_at = #{revokedAt,jdbcType=TIMESTAMP},
|
||||
description = CASE
|
||||
WHEN #{reason} IS NULL THEN description
|
||||
ELSE SUBSTR(COALESCE(description, '') || ' revoked: ' || #{reason}, 1, 200)
|
||||
WHEN #{reason,jdbcType=VARCHAR} IS NULL THEN description
|
||||
ELSE SUBSTR(COALESCE(description, '') || ' revoked: ' || #{reason,jdbcType=VARCHAR}, 1, 200)
|
||||
END
|
||||
WHERE key_id = #{keyId}
|
||||
WHERE key_id = #{keyId,jdbcType=NUMERIC}
|
||||
AND revoked_at IS NULL
|
||||
</update>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user