- 약관 유형에 개인정보수집동의서(PRIVACY_COLLECT) 항목 추가
- 관리화면 약관 유형 표시 시 '(사용안함)' 라벨 추가 처리 - 약관 유형 라벨 변환 로직 PortalTermsManService로 이동 및 적용
This commit is contained in:
+1
-1
@@ -60,7 +60,7 @@ public class PortalTermsManController extends BaseAnnotationController {
|
||||
.map(type -> {
|
||||
ComboVo vo = new ComboVo();
|
||||
vo.setCode(type.name());
|
||||
vo.setCodename(type.getDescription());
|
||||
vo.setCodename(PortalTermsManService.displayLabel(type));
|
||||
return vo;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -49,6 +50,26 @@ public class PortalTermsManService extends BaseService {
|
||||
this.fileService = fileService;
|
||||
}
|
||||
|
||||
/** 관리 화면에서 '(사용안함)'으로 표시할(=신규 등록에 더 이상 쓰지 않는) 약관 유형 */
|
||||
private static final Set<AgreementType> DEPRECATED_AGREEMENT_TYPES = EnumSet.of(
|
||||
AgreementType.PRIVACY_POLICY,
|
||||
AgreementType.PRIVACY_COLLECT_IND,
|
||||
AgreementType.PRIVACY_COLLECT_ORG);
|
||||
|
||||
/**
|
||||
* 관리 화면(콤보/목록)에 표시할 약관 유형 라벨.
|
||||
* 개인정보처리방침 및 개인용/법인용 개인정보수집동의서는 신규 통합 유형 {@link AgreementType#PRIVACY_COLLECT} 등으로
|
||||
* 대체될 예정이므로 '(사용안함)'을 덧붙여 안내한다.
|
||||
* enum 자체의 description은 포털 사용자 화면(AgreementsController#agreementTitle)에서도 쓰이므로 변경하지 않는다.
|
||||
*/
|
||||
public static String displayLabel(AgreementType type) {
|
||||
String label = type.getDescription();
|
||||
if (DEPRECATED_AGREEMENT_TYPES.contains(type)) {
|
||||
label += "(사용안함)";
|
||||
}
|
||||
return label;
|
||||
}
|
||||
|
||||
private String findName(String userId) {
|
||||
if (StringUtils.isBlank(userId)) {
|
||||
return "";
|
||||
@@ -66,7 +87,7 @@ public class PortalTermsManService extends BaseService {
|
||||
PortalTermsUI portalTermsUI = portalTermsUIMapper.toVo(agreements);
|
||||
portalTermsUI.setCreatedByName(findName(agreements.getCreatedBy()));
|
||||
portalTermsUI.setLastModifiedByName(findName(agreements.getLastModifiedBy()));
|
||||
portalTermsUI.setName(agreements.getAgreementsType().getDescription());
|
||||
portalTermsUI.setName(displayLabel(agreements.getAgreementsType()));
|
||||
return portalTermsUI;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user