18 lines
609 B
TypeScript
18 lines
609 B
TypeScript
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();
|
||
}
|
||
};
|