@@ -190,6 +190,21 @@ public ResponseEntity<ApiResponse<MemberDto>> me() {
190190 );
191191 }
192192
193+ @ GetMapping ("/me/statistic" )
194+ @ Operation (summary = "회원 통계 확인" , description = "클리어한 미션 카운트" )
195+ public ResponseEntity <ApiResponse <StatisticDto >> meStatistic () {
196+ Member actor = rq .getActorFromDb ();
197+
198+ return ResponseEntity
199+ .status (HttpStatus .OK )
200+ .body (new ApiResponse <>(
201+ "200" ,
202+ "[Member] Success: 사용자 통계 확인 (%s)" .formatted (actor .getEmail ()),
203+ new StatisticDto (actor .getStatistic ())
204+ )
205+ );
206+ }
207+
193208 @ GetMapping ("/me/items" )
194209 @ Operation (summary = "보유한 아이템 확인" , description = "보유한 아이템 리스트 확인" )
195210 public ResponseEntity <ApiResponse <ItemListDto >> myItems () {
@@ -288,53 +303,56 @@ public ResponseEntity<ApiResponse<MemberDto>> unequipTitle() {
288303 );
289304 }
290305
291- @ PutMapping ("/obtain /item/{id}" )
292- @ Operation (summary = "[Test] 아이템 획득 " , description = "아이템 획득" )
293- public ResponseEntity <ApiResponse <MemberDto >> obtainItem (
306+ @ PutMapping ("/buy /item/{id}" )
307+ @ Operation (summary = "아이템 구매 " , description = "아이템 획득" )
308+ public ResponseEntity <ApiResponse <MemberDto >> buyItem (
294309 @ PathVariable String id
295310 ) {
296311 Member actor = rq .getActorFromDb ();
297- memberService .addItem (actor , Integer .parseInt (id ));
312+ memberService .buyItem (actor , Integer .parseInt (id ));
298313
299314 return ResponseEntity
300315 .status (HttpStatus .OK )
301316 .body (new ApiResponse <>(
302317 "200" ,
303- "[Member] Success: 아이템 획득" ,
318+ "[Member] Success: 아이템 구매 (%s)" . formatted ( id ) ,
304319 new MemberDto (actor )
305320 )
306321 );
307322 }
308323
309- @ PutMapping ("/obtain/title /{id}" )
310- @ Operation (summary = "[Test] 칭호 획득" , description = "칭호 획득" )
311- public ResponseEntity <ApiResponse <MemberDto >> obtainTitle (
324+ @ PutMapping ("/obtain/item /{id}" )
325+ @ Operation (summary = "[Test] 아이템 획득" , description = "아이템 획득" )
326+ public ResponseEntity <ApiResponse <MemberDto >> obtainItem (
312327 @ PathVariable String id
313328 ) {
314329 Member actor = rq .getActorFromDb ();
315- memberService .addTitle (actor , Integer .parseInt (id ));
330+ memberService .addItem (actor , Integer .parseInt (id ));
316331
317332 return ResponseEntity
318333 .status (HttpStatus .OK )
319334 .body (new ApiResponse <>(
320335 "200" ,
321- "[Member] Success: 칭호 획득" ,
336+ "[Member] Success: 아이템 획득" ,
322337 new MemberDto (actor )
323338 )
324339 );
325340 }
326341
327- @ GetMapping ("/me/statistic" )
328- @ Operation (summary = "회원 통계 확인" , description = "클리어한 미션 카운트" )
329- public ResponseEntity <ApiResponse <StatisticDto >> meStatistic () {
342+ @ PutMapping ("/obtain/title/{id}" )
343+ @ Operation (summary = "[Test] 칭호 획득" , description = "칭호 획득" )
344+ public ResponseEntity <ApiResponse <MemberDto >> obtainTitle (
345+ @ PathVariable String id
346+ ) {
330347 Member actor = rq .getActorFromDb ();
348+ memberService .addTitle (actor , Integer .parseInt (id ));
331349
332350 return ResponseEntity
333351 .status (HttpStatus .OK )
334352 .body (new ApiResponse <>(
335353 "200" ,
336- "[Member] Success: 사용자 통계 확인 (%s)" . formatted ( actor . getEmail ()) ,
337- new StatisticDto (actor . getStatistic () )
354+ "[Member] Success: 칭호 획득" ,
355+ new MemberDto (actor )
338356 )
339357 );
340358 }
0 commit comments