Merge branch 'logistream' of http://39.117.244.52:3000/kjs/ERP-node into logi

; Please enter a commit message to explain why this merge is necessary,
; especially if it merges an updated upstream into a topic branch.
;
; Lines starting with ';' will be ignored, and an empty message aborts
; the commit.
This commit is contained in:
leeheejin 2025-12-01 12:27:52 +09:00
commit e6760329bc
1 changed files with 17 additions and 5 deletions

View File

@ -170,7 +170,8 @@ export class AuthService {
[userInfo.company_code || "ILSHIN"]
);
const companyName = companyResult.length > 0 ? companyResult[0].company_name : undefined;
const companyName =
companyResult.length > 0 ? companyResult[0].company_name : undefined;
// DB에서 조회한 원본 사용자 정보 상세 로그
//console.log("🔍 AuthService - DB 원본 사용자 정보:", {
@ -358,7 +359,15 @@ export class AuthService {
vehicleType?: string;
}): Promise<{ success: boolean; message?: string }> {
try {
const { userId, password, userName, phoneNumber, licenseNumber, vehicleNumber, vehicleType } = data;
const {
userId,
password,
userName,
phoneNumber,
licenseNumber,
vehicleNumber,
vehicleType,
} = data;
// 1. 중복 사용자 확인
const existingUser = await query<any>(
@ -386,9 +395,12 @@ export class AuthService {
};
}
// 3. 비밀번호 암호화
const bcrypt = require("bcryptjs");
const hashedPassword = await bcrypt.hash(password, 10);
// 3. 비밀번호 암호화 (MD5 - 기존 시스템 호환)
const crypto = require("crypto");
const hashedPassword = crypto
.createHash("md5")
.update(password)
.digest("hex");
// 4. 사용자 정보 저장 (user_info)
await query(