Skip to content

Commit 5340f85

Browse files
committed
[Fix]스킬서버-ListCard items null 오류 수정
1 parent 12ae0e4 commit 5340f85

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

src/main/java/com/example/Jinus/controller/v2/NoticeControllerV2.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public String responseDepartmentNotice(@RequestBody RequestDto requestDto) {
5555
if (departmentId != -1) {
5656
return existUserReturnNotice(departmentEng, departmentId);
5757
} else {
58-
return doesNotExistUserReturnBlock(departmentId);
58+
return doesNotExistUserReturnBlock();
5959
}
6060
}
6161

@@ -106,7 +106,7 @@ public String thereIsNoCategory() {
106106
}
107107

108108
// 사용자 학과 정보가 없는 경우 학과인증 블록 리턴 예외처리
109-
public String doesNotExistUserReturnBlock(int departmentId) {
109+
public String doesNotExistUserReturnBlock() {
110110
List<ButtonDto> buttonList = new ArrayList<>();
111111
// 블록 버튼 생성
112112
ButtonDto buttonDto = new ButtonDto("학과 등록", "block", null,"66cf0c8ae5715f75b254dfea");

src/main/java/com/example/Jinus/repository/v2/notice/NoticeCategoryRepositoryV2.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import java.util.List;
99

1010
public interface NoticeCategoryRepositoryV2 extends JpaRepository<NoticeCategoryEntity, Integer> {
11-
@Query("SELECT n FROM NoticeCategoryEntity n WHERE n.departmentId = :departmentId")
11+
@Query("SELECT n FROM NoticeCategoryEntity n" +
12+
" WHERE n.departmentId = :departmentId AND n.lastNttSn != 0")
1213
List<NoticeCategoryEntity> findCategoryListByDepartmentId(@Param("departmentId")int departmentId);
1314
}

src/main/java/com/example/Jinus/service/v2/notice/NoticeServiceV2.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,13 @@
22

33
import com.example.Jinus.dto.response.ButtonDto;
44
import com.example.Jinus.dto.response.LinkItemDto;
5-
import com.example.Jinus.dto.response.ListCardDto;
65
import com.example.Jinus.dto.response.ListItemDto;
76
import com.example.Jinus.entity.notice.NoticeEntity;
87
import com.example.Jinus.repository.v2.notice.NoticeRepositoryV2;
9-
import org.springframework.beans.factory.annotation.Autowired;
108
import org.springframework.stereotype.Service;
119

1210
import java.util.ArrayList;
13-
import java.util.HashMap;
1411
import java.util.List;
15-
import java.util.Map;
16-
17-
import static java.lang.String.valueOf;
1812

1913
@Service
2014
public class NoticeServiceV2 {

0 commit comments

Comments
 (0)