feat(server): 完成 P2 后端能力(支付幂等、委派回收、OCR异步、审计)

这个提交包含在:
2026-02-07 21:54:29 +08:00
父节点 7ea25e9d72
当前提交 c4df9a419a
共修改 23 个文件,包含 2102 行新增和 70 行删除
+22
查看文件
@@ -0,0 +1,22 @@
const { runTencentVatOcr } = require("./tencent");
function isOcrEnabledForType(config, ocrType) {
return config.ocrProvider === "tencent" && ocrType === "vat";
}
async function runOcrForInvoice({ config, ocrType, imageBase64 }) {
if (config.ocrProvider !== "tencent") {
throw new Error(`Unsupported OCR provider: ${config.ocrProvider}`);
}
if (ocrType !== "vat") {
throw new Error(`Unsupported OCR type: ${ocrType}`);
}
return runTencentVatOcr(config, imageBase64);
}
module.exports = {
isOcrEnabledForType,
runOcrForInvoice,
};