Skip to content

Commit

Permalink
Weekly 9 포인트 api method 변경 (#204)
Browse files Browse the repository at this point in the history
* Weekly/8/issue#144 동시성 제어 (#189)

* Feat: RedissonConfig 설정

* Feat: Redisson Lock 구현(임시)

* Fix: RaceCondition 테스트 오류 수정

1. RedissonLock의 value로 hostId만 넘기기
2. RaceConditionTest를 SpringBootTest로 테스트
3. BeforeEach로 Redis 초기화

* Refactor: GroupMember 조회 fetch join 적용

* Refactor: random GroupMember 조회 fetch join 적용

* Refactor: 방문자 조회수 비동기 로직 추가

* Feat: 질문 지목 시 count 증가 동시성 제어

* Refactor: merge weekly9

* Refactor: 누락된 코드 추가

* Refactor: 누락된 코드 추가

* Refactor: 코드 수정

* Refactor: redissonClient 제거

* Refactor: redis 설정 변경

* Refactor: redis 설정 변경

* HotFix: 이미지 파일 resize 비율 조정

* Refactor: RedissonClient 사용 테스트 ActiveProfile 설정

* Refactor: RedissonClient 사용 테스트 Profile 설정

* Fix: Profile() 메서드에 적용

* Fix: ProfileIntegrationTest, RaceConditionTest 주석처리

* Fix: 충돌 해결

* Refactor: Random Question Response 수정

* Chore: 불필요한 Import 제거

* Import: 충돌 해결

---------

Co-authored-by: hjinshin <gudwls818@gmail.com>
Co-authored-by: Kwon Da woon <82216606+momnpa333@users.noreply.github.com>

* Refactor: 알림 타임아웃 수정

* Refactor: 프로필 질문 createdAt 형식 변경

* Fix: 포인트 결제 method 변경

---------

Co-authored-by: yso8296 <66588512+yso8296@users.noreply.github.com>
Co-authored-by: Kwon Da woon <82216606+momnpa333@users.noreply.github.com>
  • Loading branch information
3 people authored Nov 9, 2024
1 parent 56208ff commit 05e9100
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package supernova.whokie.pointrecord.controller;

import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import lombok.RequiredArgsConstructor;
import org.springframework.data.domain.Page;
Expand All @@ -10,12 +9,14 @@
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import supernova.whokie.global.annotation.Authenticate;
import supernova.whokie.global.dto.GlobalResponse;
import supernova.whokie.global.dto.PagingResponse;
import supernova.whokie.pointrecord.PointRecordOption;
import supernova.whokie.pointrecord.controller.dto.PointRecordRequest;
import supernova.whokie.pointrecord.controller.dto.PointRecordResponse;
import supernova.whokie.pointrecord.sevice.PointRecordService;
import supernova.whokie.pointrecord.sevice.dto.PointRecordCommand;
Expand All @@ -31,12 +32,12 @@ public class PointRecordController {

private final PointRecordService pointRecordService;

@PostMapping("/purchase")
@GetMapping("/purchase")
public ResponseEntity<Void> purchasePoint(
@Authenticate Long userId,
@RequestBody @Valid PointRecordRequest.Purchase request
@RequestParam("point") int point
) {
PointRecordModel.ReadyInfo readyInfo = pointRecordService.readyPurchasePoint(userId, request.point());
PointRecordModel.ReadyInfo readyInfo = pointRecordService.readyPurchasePoint(userId, point);

return ResponseEntity.status(HttpStatus.SEE_OTHER)
.header("location", readyInfo.nextRedirectPcUrl())
Expand Down

0 comments on commit 05e9100

Please sign in to comment.