summaryrefslogtreecommitdiff
path: root/lib/vendor-regular-registrations/handlers.ts
diff options
context:
space:
mode:
authorjoonhoekim <26rote@gmail.com>2025-11-07 15:29:36 +0900
committerjoonhoekim <26rote@gmail.com>2025-11-07 15:29:36 +0900
commita78f26bc52a2ff032a8103f36a2a660cefa9fb64 (patch)
treed7e3d3cdd771ec86174678ab44298afcd26e0660 /lib/vendor-regular-registrations/handlers.ts
parent8daa2aeee017c642d2fd171094cf5d442966eb12 (diff)
(김준회) 정규벤더 등록요청 결재 연결, 공통컴포넌트(미리보기) 연결, MDG 송신 공통함수 사용처리
Diffstat (limited to 'lib/vendor-regular-registrations/handlers.ts')
-rw-r--r--lib/vendor-regular-registrations/handlers.ts11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/vendor-regular-registrations/handlers.ts b/lib/vendor-regular-registrations/handlers.ts
index 7490d81a..262d37ab 100644
--- a/lib/vendor-regular-registrations/handlers.ts
+++ b/lib/vendor-regular-registrations/handlers.ts
@@ -25,18 +25,25 @@ import { vendorAdditionalInfo, vendorRegularRegistrations } from '@/db/schema/ve
export async function registerVendorInternal(payload: {
registrationId: number;
requestData: RegistrationRequestData;
+ currentUser?: { // Cronjob 환경을 위한 유저 정보
+ id: string | number;
+ name?: string | null;
+ email?: string | null;
+ nonsapUserId?: string | null;
+ };
}) {
debugLog('[VendorRegistrationHandler] 정규업체 등록 핸들러 시작', {
registrationId: payload.registrationId,
companyName: payload.requestData.companyNameKor,
+ hasCurrentUser: !!payload.currentUser,
});
try {
// 1. MDG로 정규업체 등록 요청 데이터 전송
+ // sendSingleVendorToMDG 함수를 사용하여 vendors 테이블에서 데이터를 자동으로 조회
debugLog('[VendorRegistrationHandler] sendRegistrationRequestToMDG 호출');
const mdgResult = await sendRegistrationRequestToMDG(
- payload.registrationId,
- payload.requestData
+ payload.registrationId
);
if (!mdgResult.success) {