Files
operationSystem-back/src/main/java/com/caliverse/admin/domain/api/GameController.java
bcjang e5430526ae item dw batch 추가
게임로그 아이템 조회 API
게임로그 재화(아이템) 조회 API
엑셀 export 예외 필드 추가
2025-07-13 11:49:59 +09:00

78 lines
3.0 KiB
Java

package com.caliverse.admin.domain.api;
import com.caliverse.admin.domain.request.BattleEventRequest;
import com.caliverse.admin.domain.response.BattleEventResponse;
import com.caliverse.admin.domain.service.BattleEventService;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
@Tag(name = "게임", description = "게임 api")
@RestController
@RequiredArgsConstructor
@RequestMapping("/api/v1/game")
public class GameController {
private final BattleEventService battleEventService;
@GetMapping("/setting/list")
public ResponseEntity<BattleEventResponse> getGameSettingList(
@RequestParam Map<String, String> requestParam){
return ResponseEntity.ok().body( battleEventService.getBattleEventList(requestParam));
}
@GetMapping("/setting/detail/{id}")
public ResponseEntity<BattleEventResponse> getGameSettingDetail(
@PathVariable("id") Long id){
return ResponseEntity.ok().body( battleEventService.getBattleEventDetail(id));
}
@PostMapping("/setting")
public ResponseEntity<BattleEventResponse> postGameSetting(
@RequestBody BattleEventRequest battleEventRequest){
return ResponseEntity.ok().body(battleEventService.postBattleEvent(battleEventRequest));
}
@PutMapping("/setting/{id}")
public ResponseEntity<BattleEventResponse> updateGameSetting(
@PathVariable("id")Long id, @RequestBody BattleEventRequest battleEventRequest){
return ResponseEntity.ok().body(battleEventService.updateBattleEvent(id, battleEventRequest));
}
@GetMapping("/match/list")
public ResponseEntity<BattleEventResponse> getGameMatchList(
@RequestParam Map<String, String> requestParam){
return ResponseEntity.ok().body( battleEventService.getBattleEventList(requestParam));
}
@GetMapping("/match/detail/{id}")
public ResponseEntity<BattleEventResponse> getGameMatchDetail(
@PathVariable("id") Long id){
return ResponseEntity.ok().body( battleEventService.getBattleEventDetail(id));
}
@PostMapping("/match")
public ResponseEntity<BattleEventResponse> postGameMatch(
@RequestBody BattleEventRequest battleEventRequest){
return ResponseEntity.ok().body(battleEventService.postBattleEvent(battleEventRequest));
}
@PutMapping("/match/{id}")
public ResponseEntity<BattleEventResponse> updateGameMatch(
@PathVariable("id")Long id, @RequestBody BattleEventRequest battleEventRequest){
return ResponseEntity.ok().body(battleEventService.updateBattleEvent(id, battleEventRequest));
}
@DeleteMapping("/match/delete")
public ResponseEntity<BattleEventResponse> deleteGameMatch(
@RequestBody BattleEventRequest battleEventRequest){
return ResponseEntity.ok().body(battleEventService.deleteBattleEvent(battleEventRequest));
}
}