Merge pull request 'master' (#40) from master into develop
Reviewed-on: #40
This commit is contained in:
@@ -39,6 +39,13 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
public class ListHeaderService {
|
public class ListHeaderService {
|
||||||
|
|
||||||
private static final int FIRST_COMMON_HEADER_ID = 101;
|
private static final int FIRST_COMMON_HEADER_ID = 101;
|
||||||
|
private static final Set<ListHeaderType> INTERVIEWER_EDIT_RESTRICTED_HEADER_TYPES = Set.of(
|
||||||
|
ListHeaderType.SID,
|
||||||
|
ListHeaderType.IS_USE,
|
||||||
|
ListHeaderType.OUTSOURCE,
|
||||||
|
ListHeaderType.CONTACT_INTERVIEWER,
|
||||||
|
ListHeaderType.FIELD_INTERVIEWER
|
||||||
|
);
|
||||||
|
|
||||||
private final ListHeaderRepository listHeaderRepository;
|
private final ListHeaderRepository listHeaderRepository;
|
||||||
private final ListItemRepository listItemRepository;
|
private final ListItemRepository listItemRepository;
|
||||||
@@ -196,6 +203,14 @@ public class ListHeaderService {
|
|||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public void updateListHeader(Long prjctIdx, List<ListHeaderDto> headerList, String regUser, LocalDateTime regDt){
|
public void updateListHeader(Long prjctIdx, List<ListHeaderDto> headerList, String regUser, LocalDateTime regDt){
|
||||||
|
for (ListHeaderDto header : headerList) {
|
||||||
|
if (Boolean.TRUE.equals(header.getUseIntrvwerEdit())
|
||||||
|
&& INTERVIEWER_EDIT_RESTRICTED_HEADER_TYPES.contains(header.getListHderTy())) {
|
||||||
|
throw BusinessException.badRequest("INVALID_INTERVIEWER_EDIT",
|
||||||
|
"SID, 사용 허용, 외주사, 컨택원, 면접원 헤더는 면접원 수정을 허용할 수 없습니다.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//upload에서의 header upsert와 분리하기 위한 래핑 메서드
|
//upload에서의 header upsert와 분리하기 위한 래핑 메서드
|
||||||
upsertHeader(prjctIdx, headerList, regUser, regDt);
|
upsertHeader(prjctIdx, headerList, regUser, regDt);
|
||||||
listContentItemService.refreshListContentItem(prjctIdx, headerList);
|
listContentItemService.refreshListContentItem(prjctIdx, headerList);
|
||||||
|
|||||||
Reference in New Issue
Block a user