Files
smart_grid_iot/server/src/task/icc_customer_sync.task.ts
T

18 lines
609 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import type { BuiltinJob } from "./job_registry";
/**
* 客户信息同步任务:从 ICC 平台拉取 org_base 组织并按 iccCode 幂等新增/变更客户,
* 写 icc_sync_log。默认每 10 分钟执行一次。
*/
export const iccCustomerSyncJob: BuiltinJob = {
jobKey: "icc_customer_sync",
jobName: "客户信息同步",
description: "从 ICC 平台拉取 org_base 组织数据并按 iccCode 幂等新增/变更客户(写 icc_sync_log)",
defaultCron: "*/10 * * * *",
defaultParams: {},
paramFields: [],
handler: async (_params, ctx) => {
return ctx.runtime.syncIccCustomers();
}
};