Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

public interface AgencyRepository extends JpaRepository<Agency,Long> {
long countByAgencyPicture(FileAttachment file);
Optional<Agency> findAgencyByAgencyNameAndAgencyEmail(String name, String email);
Optional<Agency> findAgencyByAgencyNameAndAgencyEmailAndShare(String name, String email,Boolean share);
List<Agency> findAgenciesByShare(boolean share);
Page<Agency> findAgenciesByShare(boolean share, Pageable pageable);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public void signup(String memberData,String agencyData, MultipartFile agencyPict
}

private Agency checkAgency(MemberRequest.SignupExistingAgencyDto agencyDto){
return agencyRepository.findAgencyByAgencyNameAndAgencyEmail(agencyDto.agencyName(),agencyDto.agencyEmail()).orElseThrow(
return agencyRepository.findAgencyByAgencyNameAndAgencyEmailAndShare(agencyDto.agencyName(),agencyDto.agencyEmail(),true).orElseThrow(
() -> new BaseException(ErrorCode.AGENCY_NOT_FOUND)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public record PostFileDto(
String fileId
){
public static PostFileDto from(FileAttachment file){
String url = "/api/v1/file/"+file.getFiletype().getFileType()+"/"+file.getFileId();
String url = "/api/v1/file/"+file.getFiletype().getFileType().toLowerCase()+"/"+file.getFileId();
return new PostFileDto(
file.getOriginalName(),
url,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public void updateCollege(List<College> colleges){
}

public String getImgUrl(){
if(this.schoolPicUrl==null){
if(this.schoolPicUrl==null || this.schoolPicUrl.isEmpty()){

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

isEmpty() 대신 isBlank()를 사용하면 코드가 더 견고해집니다. isEmpty()는 문자열의 길이가 0인지만 확인하지만, isBlank()는 공백(whitespace)으로만 이루어진 문자열도 비어있는 것으로 간주하여 처리할 수 있습니다. Java 11 이상을 사용하고 계시다면 isBlank()로 변경하는 것을 권장합니다.

Suggested change
if(this.schoolPicUrl==null || this.schoolPicUrl.isEmpty()){
if(this.schoolPicUrl==null || this.schoolPicUrl.isBlank()){

return "/api/v1/file/default/school";
}else{
return this.schoolPicUrl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,16 +407,14 @@ public SchoolResponse.PostDetailDto getDetailPostDto(Long postId){
increasePostView(postId);
SchoolPost schoolPost = loadPostById(postId);
SchoolResponse.SchoolPostDto dto = SchoolResponse.SchoolPostDto.from(schoolPost);
SchoolBoard schoolBoard = schoolPost.getSchoolBoard();
//fixme 수정하기 QueryDSL로
// SchoolPost beforePost = getBeforePostById(postId,schoolBoard);
// SchoolPost afterPost = getAfterPostById(postId,schoolBoard);

try{
SchoolPost beforePost = schoolPostQSDLRepository.findBeforePost(schoolPost);
SchoolPost afterPost = schoolPostQSDLRepository.findAfterPost(schoolPost);

return new SchoolResponse.PostDetailDto(dto,
return new SchoolResponse.PostDetailDto(
dto,
loadPostFileByPost(postId),
(beforePost==null)? null: SchoolResponse.SchoolPostSimpleDto.from(beforePost),
(afterPost==null)? null: SchoolResponse.SchoolPostSimpleDto.from(afterPost));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,54 +309,53 @@ public List<QuestionDto> getStudentTempalte(){
new QuestionDto(
null,
"hierarchy",
"학/석사 선택",
"本科/硕士选择",
"",
List.of(
// ====== Level 1 (학사 / 석사) ======

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

// ====== Level 1 (학사 / 석사) ====== 와 같이 코드 내에 한국어 주석이 남아있습니다. 중국어 현지화 작업의 일환으로, 다른 주석들(// ====== Level 2: 학사 계열 단과대학 ======, // ====== Level 3: ... 등)과 함께 중국어로 번역하거나, 코드만으로 의미가 충분히 전달된다면 제거하여 코드의 일관성과 가독성을 높이는 것이 좋겠습니다.

new OptionDto(0, null, "학사", null, null, "1-1", 1),
new OptionDto(0, null, "석사", null, null, "1-2", 1),
new OptionDto(0, null, "本科", null, null, "1-1", 1),
new OptionDto(0, null, "硕士", null, null, "1-2", 1),

// ====== Level 2: 학사 계열 단과대학 ======
new OptionDto(0, null, "소프트웨어융합대학", null, "1-1", "2-1", 2),
new OptionDto(0, null, "자연과학대학", null, "1-1", "2-2", 2),
new OptionDto(0, null, "软件融合学院", null, "1-1", "2-1", 2),
new OptionDto(0, null, "自然科学学院", null, "1-1", "2-2", 2),

// ====== Level 3: 소프트웨어융합대학 학과 ======
new OptionDto(0, null, "컴퓨터공학과", null, "2-1", "3-1", 3),
new OptionDto(0, null, "지능기전공학과", null, "2-1", "3-2", 3),
new OptionDto(0, null, "计算机工程系", null, "2-1", "3-1", 3),
new OptionDto(0, null, "智能机电工程系", null, "2-1", "3-2", 3),

// ====== Level 3: 자연과학대학 학과 ======
new OptionDto(0, null, "물리천문학과", null, "2-2", "3-3", 3),
new OptionDto(0, null, "수학통계학과", null, "2-2", "3-4", 3),
new OptionDto(0, null, "物理天文学系", null, "2-2", "3-3", 3),
new OptionDto(0, null, "数学统计学系", null, "2-2", "3-4", 3),

// ====== Level 2: 석사 계열 단과대학 ======
new OptionDto(0, null, "자연과학", null, "1-2", "2-3", 2),
new OptionDto(0, null, "공학", null, "1-2", "2-4", 2),
new OptionDto(0, null, "自然科学", null, "1-2", "2-3", 2),
new OptionDto(0, null, "工学", null, "1-2", "2-4", 2),

// ====== Level 3: 석사 계열 학과 ======
new OptionDto(0, null, "수학과", null, "2-3", "3-5", 3),
new OptionDto(0, null, "응용통계학과", null, "2-3", "3-6", 3),
new OptionDto(0, null, "건축공학과", null, "2-4", "3-7", 3),
new OptionDto(0, null, "건설환경공학과", null, "2-4", "3-8", 3)
new OptionDto(0, null, "数学系", null, "2-3", "3-5", 3),
new OptionDto(0, null, "应用统计学系", null, "2-3", "3-6", 3),
new OptionDto(0, null, "建筑工程系", null, "2-4", "3-7", 3),
new OptionDto(0, null, "建设环境工程系", null, "2-4", "3-8", 3)
),
0,
true,
"degreeZip"
)
,
new QuestionDto(null, "short", "중국어이름", "", null, 0, true, "chineseName"),
new QuestionDto(null, "short", "영문이름", "", null, 0, true, "englishName"),
new QuestionDto(null, "date", "생년월일", "", null, 0, true, "birthDate"),
new QuestionDto(null, "multiple", "성별", "", List.of(
new OptionDto(0, null, "남성", null,null,null,0),
new OptionDto(0, null, "여성", null,null,null,0)
),
new QuestionDto(null, "short", "中文姓名", "", null, 0, true, "chineseName"),
new QuestionDto(null, "short", "英文姓名", "", null, 0, true, "englishName"),
new QuestionDto(null, "date", "出生日期", "", null, 0, true, "birthDate"),
new QuestionDto(null, "multiple", "性别", "", List.of(
new OptionDto(0, null, "男", null, null, null, 0),
new OptionDto(0, null, "女", null, null, null, 0)
), 0, true, "gender"),

new QuestionDto(null, "short", "학생 메일", "", null, 0, true, "studentEmail"),
new QuestionDto(null, "short", "여권 번호", "", null, 0, true, "passportNumber"),
new QuestionDto(null, "short", "수험 번호", "", null, 0, true, "examNumber"),
new QuestionDto(null, "short", "유학원 담당자 위챗", "", null, 0, true, "agentWechat"),
new QuestionDto(null, "short", "유학원 담당자 이메일", "", null, 0, true, "agentEmail"),
new QuestionDto(null, "short", "긴급연락처", "", null, 0, true, "emergencyContactNum")
new QuestionDto(null, "short", "学生邮箱", "", null, 0, true, "studentEmail"),
new QuestionDto(null, "short", "护照号码", "", null, 0, true, "passportNumber"),
new QuestionDto(null, "short", "准考证号", "", null, 0, true, "examNumber"),
new QuestionDto(null, "short", "留学机构负责人微信", "", null, 0, true, "agentWechat"),
new QuestionDto(null, "short", "留学机构负责人邮箱", "", null, 0, true, "agentEmail"),
new QuestionDto(null, "short", "紧急联系方式", "", null, 0, true, "emergencyContactNum")
);
Comment on lines 309 to 359

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

설문 질문과 옵션에 대한 많은 중국어 문자열이 Java 코드에 하드코딩되어 있습니다. 이렇게 하면 향후 텍스트를 수정하거나 다른 언어를 추가할 때마다 코드를 변경하고 재배포해야 하므로 유지보수가 어렵습니다. 이러한 문자열들은 외부 리소스 파일(예: messages_zh.properties)로 분리하고, 코드에서는 해당 리소스의 키를 참조하여 값을 불러오는 방식을 사용하는 것이 좋습니다. 이를 통해 코드와 콘텐츠를 분리하여 관리 효율성을 높일 수 있습니다.

}

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/static/js/css/output.css

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions src/main/resources/templates/fragments/common/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,31 @@
<div>
<a href="#" class="text-2xl font-['Pacifico'] text-white">logo</a>
<p class="mt-4 text-gray-400">
당신의 꿈을 위한 완벽한 유학 가이드. 전 세계 유수의 대학교와
신뢰할 수 있는 유학원 정보를 한 곳에서 만나보세요. </p>
为你的梦想提供最完美的留学指南。汇聚全球知名大学与可信赖的留学机构信息,一站式尽在这里。
</p>
</div>
<div>
<h3 class="text-lg font-semibold mb-4">서비스</h3>
<h3 class="text-lg font-semibold mb-4">服务</h3>
<ul class="space-y-2">
<li><a th:href="@{/info}" class="text-gray-400 hover:text-white">유학 정보</a></li>
<li><a th:href="@{/school/list}" class="text-gray-400 hover:text-white">대학교 찾기</a></li>
<li><a th:href="@{/agency/list}" class="text-gray-400 hover:text-white">유학원 찾기</a></li>
<li><a th:href="@{/info}" class="text-gray-400 hover:text-white">留学信息</a></li>
<li><a th:href="@{/school/list}" class="text-gray-400 hover:text-white">查找大学</a></li>
<li><a th:href="@{/agency/list}" class="text-gray-400 hover:text-white">查找留学机构</a></li>
</ul>
</div>
<div>
<h3 class="text-lg font-semibold mb-4">회사 정보</h3>
<h3 class="text-lg font-semibold mb-4">公司信息</h3>
<ul class="space-y-2">
<li><a href="#" class="text-gray-400 hover:text-white">회사 소개</a></li>
<li><a href="#" class="text-gray-400 hover:text-white">이용약관</a></li>
<li><a href="#" class="text-gray-400 hover:text-white">개인정보처리방침</a></li>
<li><a href="#" class="text-gray-400 hover:text-white">公司介绍</a></li>
<li><a href="#" class="text-gray-400 hover:text-white">服务条款</a></li>
<li><a href="#" class="text-gray-400 hover:text-white">隐私政策</a></li>
</ul>
</div>
<div>
<h3 class="text-lg font-semibold mb-4">연락처</h3>
<h3 class="text-lg font-semibold mb-4">联系方式</h3>
<ul class="space-y-2">
<li class="flex items-center">
<i class="ri-map-pin-line mr-2"></i>
<span class="text-gray-400">서울특별시 강남구 테헤란로 123</span>
<span class="text-gray-400">首尔特别市 江南区 德黑兰路 123号</span>
</li>
<li class="flex items-center">
<i class="ri-phone-line mr-2"></i>
Expand All @@ -44,8 +44,8 @@ <h3 class="text-lg font-semibold mb-4">연락처</h3>
</div>
</div>
<div class="mt-12 pt-8 border-t border-gray-800 text-center text-gray-400 text-sm">
<p>© 2025 유학 정보 플랫폼. All rights reserved.</p>
<p>© 2025 留学信息平台。保留所有权利。</p>
</div>
</div>
</footer>
</html>
</html>
28 changes: 14 additions & 14 deletions src/main/resources/templates/fragments/common/nav-user.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
<a href="/home"
th:classappend="${requestURI == '/home' ? 'border-primary text-gray-900' : 'border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700'}"
class="inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">
首页
</a>

<!-- 대학교 드롭다운 (group-hover 및 group-focus-within 사용) -->
<div class="relative group">
<button th:classappend="${requestURI.startsWith('/school') ? 'border-primary text-gray-900' : 'border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700'}"
class="inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium h-full">
대학교
大学
<i class="ri-arrow-down-s-line ml-1 transition-transform duration-200 group-hover:rotate-180 group-focus-within:rotate-180"></i>
</button>
<div class="absolute top-full left-1/2 -translate-x-1/2 mt-1 bg-white rounded-lg shadow-lg py-2 w-48
Expand All @@ -40,13 +40,13 @@
<a href="/agency/list"
th:classappend="${requestURI.startsWith('/agency') ? 'border-primary text-gray-900' : 'border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700'}"
class="inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">
유학원
留学机构
</a>

<a th:if="${loginMember != null}" href="/survey/list"
th:classappend="${requestURI.startsWith('/survey') ? 'border-primary text-gray-900' : 'border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700'}"
class="inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">
설문조사
问卷调查
</a>
</div>
</div>
Expand All @@ -55,12 +55,12 @@
<div class="relative group">
<a href="/member/login" th:if="${loginMember == null}"
class="px-4 py-2 rounded-md whitespace-nowrap cursor-pointer bg-primary text-white transition-all duration-300 hover:bg-indigo-800">
로그인
登录
</a>

<button th:unless="${loginMember == null}"
class="size-[42px] flex items-center justify-center text-sm font-bold text-indigo-600 bg-indigo-200 rounded-full"
th:text="${loginMember.memberName.substring(0, 1)}">
th:text="${loginMember.memberName.substring(0, 1)}">
</button>
<div th:unless="${loginMember == null}"
class="absolute top-full right-0 mt-1 bg-white rounded-lg shadow-lg py-2 w-48
Expand All @@ -69,11 +69,11 @@
transition-all duration-200">
<button id="profile-button"
class="px-4 py-2 w-full text-gray text-left -700 hover:bg-gray-50 hover:text-primary">
마이페이지
个人中心
</button>
<button id="web-logout-button"
class="px-4 py-2 w-full text-gray text-left -700 hover:bg-gray-50 hover:text-primary">
로그아웃
退出登录
</button>
</div>
</div>
Expand All @@ -84,7 +84,7 @@
<button id="mobile-menu-button"
type="button"
class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-600 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-primary">
<span class="sr-only">메뉴 열기</span>
<span class="sr-only">打开菜单</span>
<i class="ri-menu-line ri-lg"></i>
</button>
</div>
Expand All @@ -97,11 +97,11 @@
th:if="${!requestURI.startsWith('/profile')}">

<div class="pt-2 pb-3 space-y-1">
<a href="/home" class="block pl-4 pr-4 py-2 text-gray-700 hover:bg-gray-100"></a>
<a href="/home" class="block pl-4 pr-4 py-2 text-gray-700 hover:bg-gray-100">首页</a>

<button id="mobile-university-button"
class="w-full flex justify-between items-center pl-4 pr-4 py-2 text-gray-700 hover:bg-gray-100">
대학교
大学
<i class="ri-arrow-down-s-line transition-transform"></i>
</button>

Expand All @@ -112,9 +112,9 @@
class="block text-gray-600 hover:text-primary"></a>
</div>

<a href="/agency/list" class="block pl-4 pr-4 py-2 text-gray-700 hover:bg-gray-100">유학원</a>
<a href="/agency/list" class="block pl-4 pr-4 py-2 text-gray-700 hover:bg-gray-100">留学机构</a>
<a th:if="${loginMember != null}" href="/survey/list"
class="block pl-4 pr-4 py-2 text-gray-700 hover:bg-gray-100">설문조사</a>
class="block pl-4 pr-4 py-2 text-gray-700 hover:bg-gray-100">问卷调查</a>
</div>
</div>
</nav>
</nav>
10 changes: 5 additions & 5 deletions src/main/resources/templates/fragments/common/pagination.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
<!-- '이전' 버튼 -->
<a th:if="${page.hasPrevious()}" th:href="@{''.toString() (page=${page.number - 1})}"
class="px-3 py-1 rounded border text-sm text-gray-700 hover:bg-gray-100 transition-colors">
이전
上一页
</a>
<span th:if="${!page.hasPrevious()}" class="px-3 py-1 rounded border text-sm text-gray-400 cursor-not-allowed">
이전
上一页
</span>

<!-- 페이지 번호 버튼 -->
Expand All @@ -41,11 +41,11 @@
<!-- '다음' 버튼 -->
<a th:if="${page.hasNext()}" th:href="@{''.toString() (page=${page.number + 1})}"
class="px-3 py-1 rounded border text-sm text-gray-700 hover:bg-gray-100 transition-colors">
다음
下一页
</a>
<span th:if="${!page.hasNext()}" class="px-3 py-1 rounded border text-sm text-gray-400 cursor-not-allowed">
다음
下一页
</span>
</div>

</html>
</html>
Loading