diff --git a/src/main/java/com/caliverse/admin/domain/api/GameController.java b/src/main/java/com/caliverse/admin/domain/api/GameController.java new file mode 100644 index 0000000..8db9ff4 --- /dev/null +++ b/src/main/java/com/caliverse/admin/domain/api/GameController.java @@ -0,0 +1,77 @@ +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 getGameSettingList( + @RequestParam Map requestParam){ + return ResponseEntity.ok().body( battleEventService.getBattleEventList(requestParam)); + } + + @GetMapping("/setting/detail/{id}") + public ResponseEntity getGameSettingDetail( + @PathVariable("id") Long id){ + return ResponseEntity.ok().body( battleEventService.getBattleEventDetail(id)); + } + + @PostMapping("/setting") + public ResponseEntity postGameSetting( + @RequestBody BattleEventRequest battleEventRequest){ + + return ResponseEntity.ok().body(battleEventService.postBattleEvent(battleEventRequest)); + } + + @PutMapping("/setting/{id}") + public ResponseEntity updateGameSetting( + @PathVariable("id")Long id, @RequestBody BattleEventRequest battleEventRequest){ + + return ResponseEntity.ok().body(battleEventService.updateBattleEvent(id, battleEventRequest)); + } + + @GetMapping("/match/list") + public ResponseEntity getGameMatchList( + @RequestParam Map requestParam){ + return ResponseEntity.ok().body( battleEventService.getBattleEventList(requestParam)); + } + + @GetMapping("/match/detail/{id}") + public ResponseEntity getGameMatchDetail( + @PathVariable("id") Long id){ + return ResponseEntity.ok().body( battleEventService.getBattleEventDetail(id)); + } + + @PostMapping("/match") + public ResponseEntity postGameMatch( + @RequestBody BattleEventRequest battleEventRequest){ + + return ResponseEntity.ok().body(battleEventService.postBattleEvent(battleEventRequest)); + } + + @PutMapping("/match/{id}") + public ResponseEntity updateGameMatch( + @PathVariable("id")Long id, @RequestBody BattleEventRequest battleEventRequest){ + + return ResponseEntity.ok().body(battleEventService.updateBattleEvent(id, battleEventRequest)); + } + + @DeleteMapping("/match/delete") + public ResponseEntity deleteGameMatch( + @RequestBody BattleEventRequest battleEventRequest){ + + return ResponseEntity.ok().body(battleEventService.deleteBattleEvent(battleEventRequest)); + } +} diff --git a/src/main/java/com/caliverse/admin/domain/api/LogController.java b/src/main/java/com/caliverse/admin/domain/api/LogController.java index 5b41cb4..d54aa62 100644 --- a/src/main/java/com/caliverse/admin/domain/api/LogController.java +++ b/src/main/java/com/caliverse/admin/domain/api/LogController.java @@ -60,4 +60,28 @@ public class LogController { @RequestBody LogGameRequest logGameRequest){ logService.currencyExcelExport(response, logGameRequest); } + + @GetMapping("/item/detail/list") + public ResponseEntity itemDetailList( + @RequestParam Map requestParams){ + return ResponseEntity.ok().body( logService.getItemDetailLogList(requestParams)); + } + + @PostMapping("/item/detail/excel-export") + public void itemDetailExcelExport(HttpServletResponse response, + @RequestBody LogGameRequest logGameRequest){ + logService.itemDetailExcelExport(response, logGameRequest); + } + + @GetMapping("/currency-item/list") + public ResponseEntity currencyItemList( + @RequestParam Map requestParams){ + return ResponseEntity.ok().body( logService.getCurrencyItemLogList(requestParams)); + } + + @PostMapping("/currency-item/excel-export") + public void currencyItemExcelExport(HttpServletResponse response, + @RequestBody LogGameRequest logGameRequest){ + logService.currencyItemExcelExport(response, logGameRequest); + } } diff --git a/src/main/java/com/caliverse/admin/domain/entity/EQuestType.java b/src/main/java/com/caliverse/admin/domain/entity/EQuestType.java new file mode 100644 index 0000000..fde8ade --- /dev/null +++ b/src/main/java/com/caliverse/admin/domain/entity/EQuestType.java @@ -0,0 +1,11 @@ +package com.caliverse.admin.domain.entity; + +public enum EQuestType { + NONE, + EPIC, + TUTORIAL, + NORMAL, + UGQ + ; + +} diff --git a/src/main/java/com/caliverse/admin/domain/entity/GameModeSetting.java b/src/main/java/com/caliverse/admin/domain/entity/GameModeSetting.java new file mode 100644 index 0000000..ae46562 --- /dev/null +++ b/src/main/java/com/caliverse/admin/domain/entity/GameModeSetting.java @@ -0,0 +1,35 @@ +package com.caliverse.admin.domain.entity; +import com.caliverse.admin.domain.entity.metaEnum.EJoinInProgressType; +import com.caliverse.admin.domain.entity.metaEnum.ETeamAssignmentType; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Getter; +import lombok.Setter; + +import java.util.List; + + +@Getter @Setter +public class GameModeSetting { + private Integer id; + private String desc; + @JsonProperty("mmr_check") + private boolean mmrCheck; + @JsonProperty("party_match_player_count_able_array") + private List partyMatchPlayerCountAbleArray; + @JsonProperty("match_wait_time_sec") + private Integer matchWaitTimeSec; + @JsonProperty("game_mode_mmr_id") + private Integer gameModeMmrID; + @JsonProperty("match_retry_count") + private Integer matchRetryCount; + @JsonProperty("mmr_expansion_phase") + private Integer mmrExpansionPhase; + @JsonProperty("team_assignment") + private ETeamAssignmentType teamAssignment; + @JsonProperty("join_in_progress") + private EJoinInProgressType joinInProgress; + @JsonProperty("join_in_max_time_sec") + private Integer joinInMaxTimeSec; + @JsonProperty("entrance_closing_time") + private Integer entranceClosingTime; +} diff --git a/src/main/java/com/caliverse/admin/domain/entity/HISTORYTYPEDETAIL.java b/src/main/java/com/caliverse/admin/domain/entity/HISTORYTYPEDETAIL.java index 96f4940..85c2c8f 100644 --- a/src/main/java/com/caliverse/admin/domain/entity/HISTORYTYPEDETAIL.java +++ b/src/main/java/com/caliverse/admin/domain/entity/HISTORYTYPEDETAIL.java @@ -63,6 +63,8 @@ public enum HISTORYTYPEDETAIL { NICKNAME_UPDATE("닉네임 수정"), DATA_INIT_ADD("데이터 초기화 등록"), SYSTEM_META_MAIL_DELETE("시스템 메타 메일 삭제"), + QUEST_UPDATE("퀘스트 수정"), + QUEST_DELETE("퀘스트 삭제"), ; private String historyTypeDetail; HISTORYTYPEDETAIL(String type) { diff --git a/src/main/java/com/caliverse/admin/domain/entity/STATUSTYPE.java b/src/main/java/com/caliverse/admin/domain/entity/STATUSTYPE.java new file mode 100644 index 0000000..c14bb1c --- /dev/null +++ b/src/main/java/com/caliverse/admin/domain/entity/STATUSTYPE.java @@ -0,0 +1,11 @@ +package com.caliverse.admin.domain.entity; + +public enum STATUSTYPE { + WAIT, + FAIL, + SUCCESS, + RUNNING, + FINISH, + COMPLETE + ; +} diff --git a/src/main/java/com/caliverse/admin/domain/request/LogGameRequest.java b/src/main/java/com/caliverse/admin/domain/request/LogGameRequest.java index f8c81be..032859f 100644 --- a/src/main/java/com/caliverse/admin/domain/request/LogGameRequest.java +++ b/src/main/java/com/caliverse/admin/domain/request/LogGameRequest.java @@ -2,6 +2,7 @@ package com.caliverse.admin.domain.request; import com.caliverse.admin.domain.entity.common.SearchUserType; import com.caliverse.admin.dynamodb.entity.EAmountDeltaType; +import com.caliverse.admin.dynamodb.entity.ECountDeltaType; import com.caliverse.admin.dynamodb.entity.ECurrencyType; import com.caliverse.admin.logs.entity.LogAction; import com.caliverse.admin.logs.entity.LogDomain; @@ -28,10 +29,19 @@ public class LogGameRequest { private LogDomain logDomain; @JsonProperty("tran_id") private String tranId; + //currency @JsonProperty("currency_type") private ECurrencyType currencyType; @JsonProperty("amount_delta_type") private EAmountDeltaType amountDeltaType; + //item + @JsonProperty("count_delta_type") + private ECountDeltaType countDeltaType; + @JsonProperty("item_type_large") + private String itemTypeLarge; + @JsonProperty("item_type_small") + private String itemTypeSmall; + @JsonProperty("start_dt") private LocalDateTime startDt; @JsonProperty("end_dt") diff --git a/src/main/java/com/caliverse/admin/domain/response/LogResponse.java b/src/main/java/com/caliverse/admin/domain/response/LogResponse.java index 6ac6163..402e536 100644 --- a/src/main/java/com/caliverse/admin/domain/response/LogResponse.java +++ b/src/main/java/com/caliverse/admin/domain/response/LogResponse.java @@ -1,6 +1,8 @@ package com.caliverse.admin.domain.response; import com.caliverse.admin.Indicators.entity.CurrencyDetailLogInfo; +import com.caliverse.admin.Indicators.entity.CurrencyItemLogInfo; +import com.caliverse.admin.Indicators.entity.ItemDetailLogInfo; import com.caliverse.admin.domain.entity.log.GenericLog; import com.caliverse.admin.logs.Indicatordomain.GenericMongoLog; import com.fasterxml.jackson.annotation.JsonInclude; @@ -39,6 +41,10 @@ public class LogResponse { private List currencyList; @JsonProperty("currency_detail_list") private List currencyDetailList; + @JsonProperty("item_detail_list") + private List itemDetailList; + @JsonProperty("currency_item_list") + private List currencyItemList; private int total; @JsonProperty("total_all") @@ -72,4 +78,29 @@ public class LogResponse { private Integer totalCurrencies; } + @Data + @Builder + public static class itemLog { + private String logDay; + private String accountId; + private String userGuid; + private String userNickname; + private Double sapphireAcquired; + private Double sapphireConsumed; + private Double sapphireNet; + private Double goldAcquired; + private Double goldConsumed; + private Double goldNet; + private Double caliumAcquired; + private Double caliumConsumed; + private Double caliumNet; + private Double beamAcquired; + private Double beamConsumed; + private Double beamNet; + private Double rubyAcquired; + private Double rubyConsumed; + private Double rubyNet; + private Integer totalCurrencies; + } + } diff --git a/src/main/java/com/caliverse/admin/domain/response/UsersResponse.java b/src/main/java/com/caliverse/admin/domain/response/UsersResponse.java index a10bff2..011921e 100644 --- a/src/main/java/com/caliverse/admin/domain/response/UsersResponse.java +++ b/src/main/java/com/caliverse/admin/domain/response/UsersResponse.java @@ -129,13 +129,13 @@ public class UsersResponse { @JsonProperty("character_id") private String characterId; //기본 외형 - private String basicstyle; + private Integer basicstyle; //체형 타입 - private String bodyshape; + private Integer bodyshape; //헤어스타일 - private String hairstyle; + private Integer hairstyle; //얼굴 커스터마이징 - private int[] facesCustomizing; + private List facesCustomizing; } @Data @@ -319,7 +319,7 @@ public class UsersResponse { private String type; @JsonProperty("current_task_num") private Integer currentTaskNum; - private String status; + private Integer status; private List detailQuest; } @Data