260303_01_ENH: user 파트 오류 수정

This commit is contained in:
2026-03-03 16:24:39 +09:00
parent a6e1567b93
commit e897178edb
2 changed files with 7 additions and 2 deletions

View File

@@ -3,6 +3,8 @@ package com.kri.contact.server.common.consts;
public final class ContactConstant {
public static final String DEFAULT_COMPANY_NAME = "KRI";
public static final String DEFAULT_USER_TEAM = "S101";
public static final int OUTSOURCE_USER_ROLE = 4000;
public static final int FIELDWORK_USER_ROLE = 9000;
private ContactConstant() {

View File

@@ -1,5 +1,6 @@
package com.kri.contact.server.persistence.entity;
import com.kri.contact.server.common.consts.ContactConstant;
import com.kri.contact.server.dto.UserInfoDto;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
@@ -55,9 +56,10 @@ public class TUserEntity {
@Size(max = 32)
@NotNull
@Builder.Default
@ColumnDefault("'S101'")
@Column(name = "user_team", nullable = false, length = 32, updatable = false)
private String userTeam;
private String userTeam = "S101";
@NotNull
@Column(name = "user_role", nullable = false)
@@ -87,6 +89,7 @@ public class TUserEntity {
@NotNull
@ColumnDefault("0")
@Builder.Default
@Column(name = "is_del", nullable = false)
private Boolean del = false;
@@ -106,7 +109,7 @@ public class TUserEntity {
.userTeam(
dto.getUserTeam() != null && !dto.getUserTeam().isBlank()
? dto.getUserTeam()
: "S101" // DB 기본값과 맞춰서 디폴트 세팅
: ContactConstant.DEFAULT_USER_TEAM
)
.userRole(dto.getUserRole())
.memo(dto.getMemo() != null ? dto.getMemo() : "")