Skip to content
This repository has been archived by the owner on Aug 13, 2022. It is now read-only.

[#11] 사용자가 추가한 언어에 대한 레벨을 변경할 수 있는 기능 구현하기 #25

Closed
3 tasks done
msugo1 opened this issue Feb 26, 2021 · 0 comments · Fixed by #28
Closed
3 tasks done

Comments

@msugo1
Copy link
Collaborator

msugo1 commented Feb 26, 2021

📖 구현이 필요한 항목

🔖 언어레벨 변경 기능 로직 구현하기

  • 사용자가 추가한 언어 중에서 status 가 모국어(NATIVE) 인 언어를 제외한 다른 언어들의 레벨을 변경할 수 있는 기능 구현하기

🔖 위의 로직을 테스트하기 위한 테스트 작성하기

  • (성공 케이스)

  • (실패 케이스)

@msugo1 msugo1 closed this as completed in #28 Mar 1, 2021
msugo1 pushed a commit that referenced this issue Mar 14, 2021
Model 관련

* BlockUserListRequest 클래스 추가

- 현재 사용자 아이디, 차단 목록 페이지 위치, 그리고 한 페이지에
  출력할 아이디 개수의 제한 숫자를 멤버 변수로 갖는 인스턴스를 생성할
  클래스 추가

Controller 계층 관련

* BlockUserController

- 현재 로그인 중인 사용자의 차단 사용자 목록을 불러오는 요청을 받을
  `getBlockUserList` 메소드 추가

Service 계층 관련

* BlockUserService

- 현재 사용자의 차단 목록을 불러오는 비즈니스 로직을 처리할
  `getBlockUserList` 메소드 추가

- `@Transactional(readOnly=true)를 붙여서 Slave DB에서 내용을 읽어오도록
  설정

Mapper 계층 관련

* BlockUserMapper

- DB에서 차단 사용자 목록을 불러 올 `getBlockUserList` 메소드 추가

* BlockUserMapper.xml

- 위의 내용을 처리할 쿼리문 추가

Util 관련

* Pagination

- 차단 목록에 대한 max per page 멤버변수 추가

테스트 관련

- 포스트맨을 사용해 위의 로직 테스트
msugo1 pushed a commit that referenced this issue Mar 14, 2021
Enum 관련

* AlarmTypes 클래스 추가

- Alarm 관련 타입 상수를 담을 클래스

- DB에 저장 시 정수로, DB에서 꺼낼 때는 정식 명칭을 가진 상수로의 자동
  변환을 위해 `TypeHandler` 구현 및 MyBatisConfig에 추가

Mapper 계층 관련

* AlarmMapper 인터페이스 추가

- 알람 추가 기능에 대한 로직 처리 후 이를 DB에 반영하기 위한
  `insertAlarm` 메소드 추가

* AlarmMapper.xml 추가

- 위의 사항을 처리할 쿼리문 작성

Service 계층 관련

* AlarmService 클래스 추가

- 알람 추가 기능 요청에 대한 비즈니스 로직을 처리할 `addAlarm` 메소드 추가

- 알람 추가 요청을 받으면 보내는 대상과 받을 대상 그리고 알람 타입을
  매핑해서 `Alarm 클래스의 인스턴스 생성` 후 Mapper로 넘김

* FriendService

- AlarmService 주입 및 알람 추가가 필요한 메소드`(친구추가 요청, 친구수락 요청)들에addAlarm 코드 추가

테스트 관련

- 전체적인 내용을 포스트맨을 활용해 테스트
msugo1 pushed a commit that referenced this issue Mar 18, 2021
- Merge branch 'feature/22' into feature/25

- `feature/22`에서구현한 페이징 계산식을 가져와서 `feature/25`에도 반영
msugo1 added a commit that referenced this issue Mar 18, 2021
[#25] 사용자 차단 목록 불러오기 기능 구현
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant