Compare commits
19 Commits
492394d3a0
...
51c5709a79
| Author | SHA1 | Date | |
|---|---|---|---|
| 51c5709a79 | |||
| d16ee97d98 | |||
| 287dca3534 | |||
| 728b1abebc | |||
| 60f84112c6 | |||
| 6f3263f36a | |||
| 77c7870201 | |||
| 3b76682616 | |||
| 5a3a5eaf41 | |||
| 950a6a6817 | |||
| d74c1b67e3 | |||
| a5f21f6000 | |||
| 5c7782de7a | |||
| 4d7d4bb266 | |||
| 779085b2f1 | |||
| 8c71af93f3 | |||
| fea7a7f750 | |||
| 2e54329ee2 | |||
| d75c259350 |
@@ -18,7 +18,7 @@ pipeline {
|
||||
steps {
|
||||
script {
|
||||
sh 'chmod +x gradlew' //gradle 권한 설정
|
||||
sh './gradlew clean build -x test -Pprofile=dev' //빌드 test는 하지않는다
|
||||
sh '/var/lib/jenkins/workspace/Trunk-Admintool-Dev-BackEnd/gradlew clean build -x test -Pprofile=dev' //빌드 test는 하지않는다
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,7 @@ pipeline {
|
||||
stage('Gradle Build') {
|
||||
steps {
|
||||
script {
|
||||
sh 'chmod +x gradlew' //gradle 권한 설정
|
||||
sh './gradlew clean build -x test -Pprofile=live' //빌드 test는 하지않는다
|
||||
sh '/var/lib/jenkins/workspace/Product-Admintool-Live-BackEnd-Full/gradlew clean build -x test -Pprofile=live' //빌드 test는 하지않는다
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
76
Jenkinsfile.live.metadata
Normal file
76
Jenkinsfile.live.metadata
Normal file
@@ -0,0 +1,76 @@
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
environment {
|
||||
META_FOLDER = 'metadata/**'
|
||||
REMOTE_META_FOLDER = 'admintool'
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('MetaData Checkout'){
|
||||
steps{
|
||||
checkout([$class: 'SubversionSCM',
|
||||
additionalCredentials: [],
|
||||
excludedCommitMessages: '',
|
||||
excludedRegions: '',
|
||||
excludedRevprop: '',
|
||||
excludedUsers: '',
|
||||
filterChangelog: false,
|
||||
ignoreDirPropChanges: false,
|
||||
includedRegions: '',
|
||||
locations: [
|
||||
[
|
||||
cancelProcessOnExternalsFail: true,
|
||||
credentialsId: 'jenkins-build',
|
||||
depthOption: 'infinity',
|
||||
ignoreExternalsOption: true,
|
||||
local: 'metadata',
|
||||
remote: 'svn://10.20.20.9/branches/Product/DataAssets/MS2/JSON@HEAD'
|
||||
]
|
||||
],
|
||||
quietOperation: true,
|
||||
workspaceUpdater: [$class: 'UpdateUpdater']
|
||||
])
|
||||
}
|
||||
}
|
||||
stage('SSH Tunneling Start') {
|
||||
steps {
|
||||
script {
|
||||
sh 'rm -rf ${WORKSPACE}/metadata/.svn'
|
||||
sh 'rm -rf ${WORKSPACE}/metadata/QuestScript'
|
||||
sh '/home/admintool/ssh-tunneling-live.sh start'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Transfer MeataData'){
|
||||
steps{
|
||||
sshPublisher(
|
||||
publishers: [
|
||||
sshPublisherDesc(
|
||||
configName: 'live-backend',
|
||||
transfers: [
|
||||
sshTransfer(
|
||||
sourceFiles: "${META_FOLDER}",
|
||||
remoteDirectory: "${REMOTE_META_FOLDER}",
|
||||
execCommand: """
|
||||
echo 'metadata Transfer Complete'
|
||||
""",
|
||||
execTimeout: 120000
|
||||
)
|
||||
],
|
||||
usePromotionTimestamp: false,
|
||||
verbose: true
|
||||
)
|
||||
]
|
||||
)
|
||||
}
|
||||
}
|
||||
stage('SSH Tunneling Stop') {
|
||||
steps {
|
||||
script {
|
||||
sh '/home/admintool/ssh-tunneling-live.sh stop; /home/admintool/ssh-tunneling-live.sh status'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,8 +17,7 @@ pipeline {
|
||||
stage('Gradle Build') {
|
||||
steps {
|
||||
script {
|
||||
sh 'chmod +x gradlew' //gradle 권한 설정
|
||||
sh './gradlew clean build -x test -Pprofile=live' //빌드 test는 하지않는다
|
||||
sh '/var/lib/jenkins/workspace/Product-Admintool-Live-BackEnd/gradlew clean build -x test -Pprofile=live' //빌드 test는 하지않는다
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,7 @@ pipeline {
|
||||
stage('Gradle Build') {
|
||||
steps {
|
||||
script {
|
||||
sh 'chmod +x gradlew' //gradle 권한 설정
|
||||
sh './gradlew clean build -x test -Pprofile=qa' //빌드 test는 하지않는다
|
||||
sh '/var/lib/jenkins/workspace/Stable-Admintool-QA-BackEnd-Full/gradlew clean build -x test -Pprofile=qa' //빌드 test는 하지않는다
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
99
Jenkinsfile.qa.metadata
Normal file
99
Jenkinsfile.qa.metadata
Normal file
@@ -0,0 +1,99 @@
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
environment {
|
||||
META_FOLDER = 'metadata/**'
|
||||
REMOTE_META_FOLDER = 'admintool'
|
||||
DOCKER_NAME = 'admintool-back-qa'
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('MetaData Checkout'){
|
||||
steps{
|
||||
checkout([$class: 'SubversionSCM',
|
||||
additionalCredentials: [],
|
||||
excludedCommitMessages: '',
|
||||
excludedRegions: '',
|
||||
excludedRevprop: '',
|
||||
excludedUsers: '',
|
||||
filterChangelog: false,
|
||||
ignoreDirPropChanges: false,
|
||||
includedRegions: '',
|
||||
locations: [
|
||||
[
|
||||
cancelProcessOnExternalsFail: true,
|
||||
credentialsId: 'jenkins-build',
|
||||
depthOption: 'infinity',
|
||||
ignoreExternalsOption: true,
|
||||
local: 'metadata',
|
||||
remote: 'svn://10.20.20.9/branches/Stable/DataAssets/MS2/JSON@HEAD'
|
||||
]
|
||||
],
|
||||
quietOperation: true,
|
||||
workspaceUpdater: [$class: 'UpdateUpdater']
|
||||
])
|
||||
}
|
||||
}
|
||||
stage('SSH Tunneling Start') {
|
||||
steps {
|
||||
script {
|
||||
sh 'rm -rf ${WORKSPACE}/metadata/.svn'
|
||||
sh 'rm -rf ${WORKSPACE}/metadata/QuestScript'
|
||||
sh '/home/admintool/ssh-tunneling-qa.sh start'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Transfer MeataData'){
|
||||
steps{
|
||||
sshPublisher(
|
||||
publishers: [
|
||||
sshPublisherDesc(
|
||||
configName: 'qa-backend',
|
||||
transfers: [
|
||||
sshTransfer(
|
||||
sourceFiles: "${META_FOLDER}",
|
||||
remoteDirectory: "${REMOTE_META_FOLDER}",
|
||||
execCommand: """
|
||||
echo 'metadata Transfer Complete'
|
||||
""",
|
||||
execTimeout: 120000
|
||||
)
|
||||
],
|
||||
usePromotionTimestamp: false,
|
||||
verbose: true
|
||||
)
|
||||
]
|
||||
)
|
||||
}
|
||||
}
|
||||
stage('Docker Container Restart'){
|
||||
steps{
|
||||
// aws command
|
||||
sshPublisher(
|
||||
publishers: [
|
||||
sshPublisherDesc(
|
||||
configName: 'qa-backend',
|
||||
transfers: [
|
||||
sshTransfer(
|
||||
execCommand: """
|
||||
docker restart ${DOCKER_NAME}
|
||||
""",
|
||||
execTimeout: 120000
|
||||
)
|
||||
],
|
||||
usePromotionTimestamp: false,
|
||||
verbose: true
|
||||
)
|
||||
]
|
||||
)
|
||||
}
|
||||
}
|
||||
stage('SSH Tunneling Stop') {
|
||||
steps {
|
||||
script {
|
||||
sh '/home/admintool/ssh-tunneling-qa.sh stop; /home/admintool/ssh-tunneling-qa.sh status'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,8 +17,7 @@ pipeline {
|
||||
stage('Gradle Build') {
|
||||
steps {
|
||||
script {
|
||||
sh 'chmod +x gradlew' //gradle 권한 설정
|
||||
sh './gradlew clean build -x test -Pprofile=qa' //빌드 test는 하지않는다
|
||||
sh '/var/lib/jenkins/workspace/Stable-Admintool-QA-BackEnd/gradlew clean build -x test -Pprofile=qa' //빌드 test는 하지않는다
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,7 @@ pipeline {
|
||||
stage('Gradle Build') {
|
||||
steps {
|
||||
script {
|
||||
sh 'chmod +x gradlew' //gradle 권한 설정
|
||||
sh './gradlew clean build -x test -Pprofile=stage' //빌드 test는 하지않는다
|
||||
sh '/var/lib/jenkins/workspace/Product-Admintool-Stage-Backend-Full/gradlew clean build -x test -Pprofile=stage' //빌드 test는 하지않는다
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
99
Jenkinsfile.stage.metadata
Normal file
99
Jenkinsfile.stage.metadata
Normal file
@@ -0,0 +1,99 @@
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
environment {
|
||||
META_FOLDER = 'metadata/**'
|
||||
REMOTE_META_FOLDER = 'admintool'
|
||||
DOCKER_NAME = 'admintool-back-stage'
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('MetaData Checkout'){
|
||||
steps{
|
||||
checkout([$class: 'SubversionSCM',
|
||||
additionalCredentials: [],
|
||||
excludedCommitMessages: '',
|
||||
excludedRegions: '',
|
||||
excludedRevprop: '',
|
||||
excludedUsers: '',
|
||||
filterChangelog: false,
|
||||
ignoreDirPropChanges: false,
|
||||
includedRegions: '',
|
||||
locations: [
|
||||
[
|
||||
cancelProcessOnExternalsFail: true,
|
||||
credentialsId: 'jenkins-build',
|
||||
depthOption: 'infinity',
|
||||
ignoreExternalsOption: true,
|
||||
local: 'metadata',
|
||||
remote: 'svn://10.20.20.9/branches/Product/DataAssets/MS2/JSON@HEAD'
|
||||
]
|
||||
],
|
||||
quietOperation: true,
|
||||
workspaceUpdater: [$class: 'UpdateUpdater']
|
||||
])
|
||||
}
|
||||
}
|
||||
stage('SSH Tunneling Start') {
|
||||
steps {
|
||||
script {
|
||||
sh 'rm -rf ${WORKSPACE}/metadata/.svn'
|
||||
sh 'rm -rf ${WORKSPACE}/metadata/QuestScript'
|
||||
sh '/home/admintool/ssh-tunneling-stage.sh start'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Transfer MeataData'){
|
||||
steps{
|
||||
sshPublisher(
|
||||
publishers: [
|
||||
sshPublisherDesc(
|
||||
configName: 'stage-backend',
|
||||
transfers: [
|
||||
sshTransfer(
|
||||
sourceFiles: "${META_FOLDER}",
|
||||
remoteDirectory: "${REMOTE_META_FOLDER}",
|
||||
execCommand: """
|
||||
echo 'metadata Transfer Complete'
|
||||
""",
|
||||
execTimeout: 120000
|
||||
)
|
||||
],
|
||||
usePromotionTimestamp: false,
|
||||
verbose: true
|
||||
)
|
||||
]
|
||||
)
|
||||
}
|
||||
}
|
||||
stage('Docker Container Restart'){
|
||||
steps{
|
||||
// aws command
|
||||
sshPublisher(
|
||||
publishers: [
|
||||
sshPublisherDesc(
|
||||
configName: 'stage-backend',
|
||||
transfers: [
|
||||
sshTransfer(
|
||||
execCommand: """
|
||||
docker restart ${DOCKER_NAME}
|
||||
""",
|
||||
execTimeout: 120000
|
||||
)
|
||||
],
|
||||
usePromotionTimestamp: false,
|
||||
verbose: true
|
||||
)
|
||||
]
|
||||
)
|
||||
}
|
||||
}
|
||||
stage('SSH Tunneling Stop') {
|
||||
steps {
|
||||
script {
|
||||
sh '/home/admintool/ssh-tunneling-stage.sh stop; /home/admintool/ssh-tunneling-stage.sh status'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,8 +17,7 @@ pipeline {
|
||||
stage('Gradle Build') {
|
||||
steps {
|
||||
script {
|
||||
sh 'chmod +x gradlew' //gradle 권한 설정
|
||||
sh './gradlew clean build -x test -Pprofile=stage' //빌드 test는 하지않는다
|
||||
sh '/var/lib/jenkins/workspace/Product-Admintool-Stage-Backend/gradlew clean build -x test -Pprofile=stage' //빌드 test는 하지않는다
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class MessageHandlerService {
|
||||
"",
|
||||
"sendUserKickMessage",
|
||||
serverName,
|
||||
user_kick_builder
|
||||
user_kick_builder.build()
|
||||
);
|
||||
}catch(Exception e){
|
||||
log.error(e.getMessage());
|
||||
@@ -96,7 +96,7 @@ public class MessageHandlerService {
|
||||
"",
|
||||
"sendNoticeMessage",
|
||||
serverList.toString(),
|
||||
noticeBuilder
|
||||
noticeBuilder.build()
|
||||
);
|
||||
}catch (Exception e){
|
||||
log.error(e.getMessage());
|
||||
@@ -138,7 +138,7 @@ public class MessageHandlerService {
|
||||
"",
|
||||
"sendMailMessage",
|
||||
serverName,
|
||||
mail_builder
|
||||
mail_builder.build()
|
||||
);
|
||||
}catch (Exception e){
|
||||
log.error(e.getMessage());
|
||||
@@ -166,7 +166,7 @@ public class MessageHandlerService {
|
||||
"",
|
||||
"sendBannerMessage",
|
||||
serverName,
|
||||
banner_builder
|
||||
banner_builder.build()
|
||||
);
|
||||
}catch(Exception e){
|
||||
log.error(e.getMessage());
|
||||
@@ -197,7 +197,7 @@ public class MessageHandlerService {
|
||||
"",
|
||||
"sendQuestTaskCompleteMessage",
|
||||
serverName,
|
||||
quest_task_builder
|
||||
quest_task_builder.build()
|
||||
);
|
||||
}catch(Exception e){
|
||||
log.error(e.getMessage());
|
||||
@@ -210,5 +210,32 @@ public class MessageHandlerService {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public void sendRankingScheduleMessage(String serverName){
|
||||
try {
|
||||
var ranking_schedule_builder = ServerMessage.MOS2GS_NTF_UPDATE_RANKING_SCHEDULE.newBuilder();
|
||||
|
||||
rabbitMqService.SendMessage(ranking_schedule_builder.build(), serverName);
|
||||
|
||||
log.info("Send Ranking Schedule Message to Server: {}", serverName);
|
||||
|
||||
logMessage(
|
||||
LogStatus.SUCCESS,
|
||||
"",
|
||||
"sendRankingScheduleMessage",
|
||||
serverName,
|
||||
ranking_schedule_builder.build()
|
||||
);
|
||||
}catch(Exception e){
|
||||
log.error(e.getMessage());
|
||||
logMessage(
|
||||
LogStatus.FAILURE,
|
||||
String.format("Ranking Schedule Fail error: %s", e.getMessage()),
|
||||
"sendRankingScheduleMessage",
|
||||
serverName,
|
||||
null
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1309,6 +1309,21 @@ public interface ServerMessageOrBuilder extends
|
||||
*/
|
||||
com.caliverse.admin.domain.RabbitMq.message.ServerMessage.MOS2GS_NTF_QUEST_TASK_FORCE_COMPLETEOrBuilder getNtfQuestTaskForceCompleteOrBuilder();
|
||||
|
||||
/**
|
||||
* <code>.ServerMessage.MOS2GS_NTF_UPDATE_RANKING_SCHEDULE ntfUpdateRankingSchedule = 93;</code>
|
||||
* @return Whether the ntfUpdateRankingSchedule field is set.
|
||||
*/
|
||||
boolean hasNtfUpdateRankingSchedule();
|
||||
/**
|
||||
* <code>.ServerMessage.MOS2GS_NTF_UPDATE_RANKING_SCHEDULE ntfUpdateRankingSchedule = 93;</code>
|
||||
* @return The ntfUpdateRankingSchedule.
|
||||
*/
|
||||
com.caliverse.admin.domain.RabbitMq.message.ServerMessage.MOS2GS_NTF_UPDATE_RANKING_SCHEDULE getNtfUpdateRankingSchedule();
|
||||
/**
|
||||
* <code>.ServerMessage.MOS2GS_NTF_UPDATE_RANKING_SCHEDULE ntfUpdateRankingSchedule = 93;</code>
|
||||
*/
|
||||
com.caliverse.admin.domain.RabbitMq.message.ServerMessage.MOS2GS_NTF_UPDATE_RANKING_SCHEDULEOrBuilder getNtfUpdateRankingScheduleOrBuilder();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
*========================================================
|
||||
@@ -1414,36 +1429,6 @@ public interface ServerMessageOrBuilder extends
|
||||
*/
|
||||
com.caliverse.admin.domain.RabbitMq.message.ServerMessage.MS2GS_NTF_MATCH_RESULTOrBuilder getNtfMatchResultOrBuilder();
|
||||
|
||||
/**
|
||||
* <code>.ServerMessage.GS2MS_REQ_MATCH_ROOM_INFO reqMatchRoomInfo = 110007;</code>
|
||||
* @return Whether the reqMatchRoomInfo field is set.
|
||||
*/
|
||||
boolean hasReqMatchRoomInfo();
|
||||
/**
|
||||
* <code>.ServerMessage.GS2MS_REQ_MATCH_ROOM_INFO reqMatchRoomInfo = 110007;</code>
|
||||
* @return The reqMatchRoomInfo.
|
||||
*/
|
||||
com.caliverse.admin.domain.RabbitMq.message.ServerMessage.GS2MS_REQ_MATCH_ROOM_INFO getReqMatchRoomInfo();
|
||||
/**
|
||||
* <code>.ServerMessage.GS2MS_REQ_MATCH_ROOM_INFO reqMatchRoomInfo = 110007;</code>
|
||||
*/
|
||||
com.caliverse.admin.domain.RabbitMq.message.ServerMessage.GS2MS_REQ_MATCH_ROOM_INFOOrBuilder getReqMatchRoomInfoOrBuilder();
|
||||
|
||||
/**
|
||||
* <code>.ServerMessage.MS2GS_ACK_MATCH_ROOM_INFO ackMatchRoomInfo = 110008;</code>
|
||||
* @return Whether the ackMatchRoomInfo field is set.
|
||||
*/
|
||||
boolean hasAckMatchRoomInfo();
|
||||
/**
|
||||
* <code>.ServerMessage.MS2GS_ACK_MATCH_ROOM_INFO ackMatchRoomInfo = 110008;</code>
|
||||
* @return The ackMatchRoomInfo.
|
||||
*/
|
||||
com.caliverse.admin.domain.RabbitMq.message.ServerMessage.MS2GS_ACK_MATCH_ROOM_INFO getAckMatchRoomInfo();
|
||||
/**
|
||||
* <code>.ServerMessage.MS2GS_ACK_MATCH_ROOM_INFO ackMatchRoomInfo = 110008;</code>
|
||||
*/
|
||||
com.caliverse.admin.domain.RabbitMq.message.ServerMessage.MS2GS_ACK_MATCH_ROOM_INFOOrBuilder getAckMatchRoomInfoOrBuilder();
|
||||
|
||||
/**
|
||||
* <code>.ServerMessage.GS2MS_NTF_MATCH_CHANGE_GAME_STATE ntfMatchChangeGameState = 110011;</code>
|
||||
* @return Whether the ntfMatchChangeGameState field is set.
|
||||
|
||||
@@ -504,6 +504,11 @@ public final class ServerMessageOuterClass {
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_ServerMessage_MOS2GS_NTF_QUEST_TASK_FORCE_COMPLETE_fieldAccessorTable;
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_ServerMessage_MOS2GS_NTF_UPDATE_RANKING_SCHEDULE_descriptor;
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_ServerMessage_MOS2GS_NTF_UPDATE_RANKING_SCHEDULE_fieldAccessorTable;
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_ServerMessage_GS2C_NTF_MATCH_STATUS_descriptor;
|
||||
static final
|
||||
@@ -539,16 +544,6 @@ public final class ServerMessageOuterClass {
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_ServerMessage_MS2GS_NTF_MATCH_RESULT_fieldAccessorTable;
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_ServerMessage_GS2MS_REQ_MATCH_ROOM_INFO_descriptor;
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_ServerMessage_GS2MS_REQ_MATCH_ROOM_INFO_fieldAccessorTable;
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_ServerMessage_MS2GS_ACK_MATCH_ROOM_INFO_descriptor;
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_ServerMessage_MS2GS_ACK_MATCH_ROOM_INFO_fieldAccessorTable;
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_ServerMessage_GS2MS_NTF_MATCH_GAME_QUIT_descriptor;
|
||||
static final
|
||||
@@ -559,11 +554,6 @@ public final class ServerMessageOuterClass {
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_ServerMessage_GS2MS_NTF_MATCH_GAME_JOIN_fieldAccessorTable;
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_ServerMessage_GS2MS_NTF_MATCH_GAME_DESTROY_descriptor;
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_ServerMessage_GS2MS_NTF_MATCH_GAME_DESTROY_fieldAccessorTable;
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_ServerMessage_GS2MS_NTF_MATCH_CHANGE_GAME_STATE_descriptor;
|
||||
static final
|
||||
@@ -591,7 +581,7 @@ public final class ServerMessageOuterClass {
|
||||
"\n\023ServerMessage.proto\032\037google/protobuf/t" +
|
||||
"imestamp.proto\032\023Define_Common.proto\032\023Def" +
|
||||
"ine_Result.proto\032\033Define_ProgramVersion." +
|
||||
"proto\032\021Game_Define.proto\"\332\213\001\n\rServerMess" +
|
||||
"proto\032\021Game_Define.proto\"\360\211\001\n\rServerMess" +
|
||||
"age\022/\n\013messageTime\030\001 \001(\0132\032.google.protob" +
|
||||
"uf.Timestamp\022\025\n\rmessageSender\030\002 \001(\t\022#\n\004c" +
|
||||
"hat\030\003 \001(\0132\023.ServerMessage.ChatH\000\022)\n\007kick" +
|
||||
@@ -749,298 +739,292 @@ public final class ServerMessageOuterClass {
|
||||
"\030[ \001(\0132\'.ServerMessage.MOS2GS_NTF_UPDATE" +
|
||||
"_BANNERH\000\022X\n\031ntfQuestTaskForceComplete\030\\" +
|
||||
" \001(\01323.ServerMessage.MOS2GS_NTF_QUEST_TA" +
|
||||
"SK_FORCE_COMPLETEH\000\022C\n\017reqMatchReserve\030\261" +
|
||||
"\333\006 \001(\0132&.ServerMessage.GS2MS_REQ_MATCH_R" +
|
||||
"ESERVEH\000\022C\n\017ackMatchReserve\030\262\333\006 \001(\0132&.Se" +
|
||||
"rverMessage.MS2GS_ACK_MATCH_RESERVEH\000\022A\n" +
|
||||
"\016reqMatchCancel\030\263\333\006 \001(\0132%.ServerMessage." +
|
||||
"GS2MS_REQ_MATCH_CANCELH\000\022A\n\016ackMatchCanc" +
|
||||
"el\030\264\333\006 \001(\0132%.ServerMessage.MS2GS_ACK_MAT" +
|
||||
"CH_CANCELH\000\022A\n\016ntfMatchStatus\030\265\333\006 \001(\0132%." +
|
||||
"ServerMessage.MS2GS_NTF_MATCH_STATUSH\000\022A" +
|
||||
"\n\016ntfMatchResult\030\266\333\006 \001(\0132%.ServerMessage" +
|
||||
".MS2GS_NTF_MATCH_RESULTH\000\022F\n\020reqMatchRoo" +
|
||||
"mInfo\030\267\333\006 \001(\0132(.ServerMessage.GS2MS_REQ_" +
|
||||
"MATCH_ROOM_INFOH\000\022F\n\020ackMatchRoomInfo\030\270\333" +
|
||||
"\006 \001(\0132(.ServerMessage.MS2GS_ACK_MATCH_RO" +
|
||||
"OM_INFOH\000\022U\n\027ntfMatchChangeGameState\030\273\333\006" +
|
||||
" \001(\01320.ServerMessage.GS2MS_NTF_MATCH_CHA" +
|
||||
"NGE_GAME_STATEH\000\022F\n\020ntfMatchGameQuit\030\274\333\006" +
|
||||
" \001(\0132(.ServerMessage.GS2MS_NTF_MATCH_GAM" +
|
||||
"E_QUITH\000\022F\n\020ntfMatchGameJoin\030\275\333\006 \001(\0132(.S" +
|
||||
"erverMessage.GS2MS_NTF_MATCH_GAME_JOINH\000" +
|
||||
"\022U\n\027ntfMatchGameJoinReserve\030\276\333\006 \001(\01320.Se" +
|
||||
"rverMessage.MS2GS_NTF_MATCH_GAME_JOIN_RE" +
|
||||
"SERVEH\000\022F\n\020ntfMatchCheatCmd\030\303\333\006 \001(\0132(.Se" +
|
||||
"rverMessage.GS2MS_NTF_MATCH_CHEAT_CMDH\000\032" +
|
||||
"\207\001\n\004Chat\022\027\n\004type\030\001 \001(\0162\t.ChatType\022\026\n\016sen" +
|
||||
"derNickName\030\002 \001(\t\022\024\n\014receiverGuid\030\003 \001(\t\022" +
|
||||
"\'\n\rreceiverstate\030\004 \001(\0162\020.PlayerStateType" +
|
||||
"\022\017\n\007message\030\005 \001(\t\032&\n\007KickReq\022\r\n\005reqId\030\001 " +
|
||||
"\001(\005\022\014\n\004name\030\002 \001(\t\032I\n\007KickRes\022\r\n\005reqId\030\001 " +
|
||||
"\001(\005\022!\n\007errCode\030\002 \001(\0162\020.ServerErrorCode\022\014" +
|
||||
"\n\004name\030\003 \001(\t\032\024\n\022GetServerConfigReq\032I\n\022Ge" +
|
||||
"tServerConfigRes\022\022\n\nserverType\030\001 \001(\005\022\017\n\007" +
|
||||
"worldId\030\002 \001(\005\022\016\n\006region\030\003 \001(\005\032\025\n\023WhiteLi" +
|
||||
"stUpdateNoti\032\025\n\023BlackListUpdateNoti\032%\n\rI" +
|
||||
"nspectionReq\022\024\n\014isInspection\030\001 \001(\005\032/\n\022Re" +
|
||||
"adyForDistroyReq\022\031\n\021isReadyForDistroy\030\001 " +
|
||||
"\001(\005\032*\n\026ManagerServerActiveReq\022\020\n\010isActiv" +
|
||||
"e\030\001 \001(\005\032*\n\026ManagerServerActiveRes\022\020\n\010isA" +
|
||||
"ctive\030\001 \001(\005\032(\n\025ChangeServerConfigReq\022\017\n\007" +
|
||||
"maxUser\030\001 \001(\005\032\027\n\025AllKickNormalUserNoti\032&" +
|
||||
"\n\017ReceiveMailNoti\022\023\n\013accountGuid\030\001 \001(\t\032\254" +
|
||||
"\001\n\032AwsAutoScaleGroupOptionReq\022\034\n\024scaleOu" +
|
||||
"tPlusConstant\030\001 \001(\005\022\030\n\020scaleInCondition\030" +
|
||||
"\002 \001(\005\022\031\n\021scaleOutCondition\030\003 \001(\005\022\022\n\nserv" +
|
||||
"erName\030\004 \001(\t\022\020\n\010groupMin\030\005 \001(\005\022\025\n\rgroupC" +
|
||||
"apacity\030\006 \001(\005\032\034\n\032AwsAutoScaleGroupOption" +
|
||||
"Res\032N\n ExchangeMannequinDisplayItemNoti\022" +
|
||||
"\022\n\nanchorGuid\030\001 \001(\t\022\026\n\016displayItemIds\030\002 " +
|
||||
"\003(\005\032G\n\tSacleInfo\022\027\n\017ServerGroupName\030\001 \001(" +
|
||||
"\t\022\017\n\007MinSize\030\002 \001(\005\022\020\n\010CapaCity\030\003 \001(\005\032\032\n\030" +
|
||||
"GetAwsAutoScaleOptionReq\032\263\001\n\030GetAwsAutoS" +
|
||||
"caleOptionRes\022\034\n\024scaleOutPlusConstant\030\001 " +
|
||||
"\001(\005\022\030\n\020scaleInCondition\030\002 \001(\005\022\031\n\021scaleOu" +
|
||||
"tCondition\030\003 \001(\005\0222\n\020instanceInfoList\030\004 \003" +
|
||||
"(\0132\030.ServerMessage.SacleInfo\022\020\n\010isActive" +
|
||||
"\030\005 \001(\005\032^\n\027InviteFriendToMyHomeReq\022\023\n\013inv" +
|
||||
"iterGuid\030\001 \001(\t\022\027\n\017inviterNickName\030\002 \001(\t\022" +
|
||||
"\025\n\rinviterRoomId\030\003 \001(\t\032\275\001\n\017ToFiendNotiBa" +
|
||||
"se\022\020\n\010senderId\030\001 \001(\t\022\022\n\nsenderGuid\030\002 \001(\t" +
|
||||
"\022\026\n\016senderNickName\030\003 \001(\t\022\023\n\013senderState\030" +
|
||||
"\004 \001(\005\022\023\n\013senderMapId\030\005 \001(\005\022\022\n\nreceiverId" +
|
||||
"\030\006 \001(\t\022\024\n\014receiverGuid\030\007 \001(\t\022\030\n\020receiver" +
|
||||
"NickName\030\010 \001(\t\032\224\001\n\020InviteMyHomeBase\022\020\n\010s" +
|
||||
"enderId\030\001 \001(\t\022\022\n\nsenderGuid\030\002 \001(\t\022\026\n\016sen" +
|
||||
"derNickName\030\003 \001(\t\022\022\n\nreceiverId\030\004 \001(\t\022\024\n" +
|
||||
"\014receiverGuid\030\005 \001(\t\022\030\n\020receiverNickName\030" +
|
||||
"\006 \001(\t\032n\n\021LoginNotiToFriend\0220\n\010baseInfo\030\001" +
|
||||
" \001(\0132\036.ServerMessage.ToFiendNotiBase\022\'\n\014" +
|
||||
"locationInfo\030\002 \001(\0132\021.UserLocationInfo\032F\n" +
|
||||
"\022LogoutNotiToFriend\0220\n\010baseInfo\030\001 \001(\0132\036." +
|
||||
"ServerMessage.ToFiendNotiBase\032n\n\021StateNo" +
|
||||
"tiToFriend\0220\n\010baseInfo\030\001 \001(\0132\036.ServerMes" +
|
||||
"sage.ToFiendNotiBase\022\'\n\014locationInfo\030\002 \001" +
|
||||
"(\0132\021.UserLocationInfo\032\335\001\n\027ReceiveInviteM" +
|
||||
"yHomeNoti\0221\n\010baseInfo\030\001 \001(\0132\037.ServerMess" +
|
||||
"age.InviteMyHomeBase\022\027\n\017inviterMyHomeId\030" +
|
||||
"\002 \001(\t\022.\n\nexpireTime\030\003 \001(\0132\032.google.proto" +
|
||||
"buf.Timestamp\0223\n\017replyExpireTime\030\004 \001(\0132\032" +
|
||||
".google.protobuf.Timestamp\022\021\n\tuniqueKey\030" +
|
||||
"\005 \001(\t\032Z\n\025ReplyInviteMyhomeNoti\022\026\n\016accept" +
|
||||
"OrRefuse\030\001 \001(\005\022\022\n\nreceiverId\030\002 \001(\t\022\025\n\rre" +
|
||||
"plyUserGuid\030\003 \001(\t\032?\n\027KickFromFriendsHome" +
|
||||
"Noti\022\022\n\nkickerGuid\030\001 \001(\t\022\020\n\010kickerId\030\002 \001" +
|
||||
"(\t\032s\n\021FriendRequestInfo\022\014\n\004guid\030\001 \001(\t\022\020\n" +
|
||||
"\010nickName\030\002 \001(\t\022\r\n\005isNew\030\003 \001(\005\022/\n\013reques" +
|
||||
"tTime\030\004 \001(\0132\032.google.protobuf.Timestamp\032" +
|
||||
"^\n\021FriendRequestNoti\0225\n\013requestInfo\030\001 \001(" +
|
||||
"\0132 .ServerMessage.FriendRequestInfo\022\022\n\nr" +
|
||||
"eceiverId\030\002 \001(\t\032\222\001\n\020FriendAcceptNoti\022\020\n\010" +
|
||||
"senderId\030\001 \001(\t\022\022\n\nsenderGuid\030\002 \001(\t\022\026\n\016se" +
|
||||
"nderNickName\030\003 \001(\t\022\026\n\016acceptOrRefuse\030\004 \001" +
|
||||
"(\005\022\022\n\nreceiverId\030\005 \001(\t\022\024\n\014receiverGuid\030\006" +
|
||||
" \001(\t\032z\n\020FriendDeleteNoti\022\020\n\010senderId\030\001 \001" +
|
||||
"(\t\022\022\n\nsenderGuid\030\002 \001(\t\022\026\n\016senderNickName" +
|
||||
"\030\003 \001(\t\022\022\n\nreceiverId\030\004 \001(\t\022\024\n\014receiverGu" +
|
||||
"id\030\005 \001(\t\032\201\001\n\027CancelFriendRequestNoti\022\020\n\010" +
|
||||
"senderId\030\001 \001(\t\022\022\n\nsenderGuid\030\002 \001(\t\022\026\n\016se" +
|
||||
"nderNickName\030\003 \001(\t\022\022\n\nreceiverId\030\004 \001(\t\022\024" +
|
||||
"\n\014receiverGuid\030\005 \001(\t\032\035\n\033KickedFromFriend" +
|
||||
"sMyHomeNoti\032\227\001\n%GS2GS_REQ_RESERVATION_EN" +
|
||||
"TER_TO_SERVER\022!\n\010moveType\030\001 \001(\0162\017.Server" +
|
||||
"MoveType\022\031\n\021requestServerName\030\002 \001(\t\022\027\n\017r" +
|
||||
"equestUserGuid\030\003 \001(\t\022\027\n\017summonPartyGuid\030" +
|
||||
"\004 \001(\t\032|\n%GS2GS_ACK_RESERVATION_ENTER_TO_" +
|
||||
"SERVER\022\027\n\006result\030\001 \001(\0132\007.Result\022\033\n\023reser" +
|
||||
"vationUserGuid\030\002 \001(\t\022\035\n\025reservationServe" +
|
||||
"rName\030\003 \001(\t\032\\\n&GS2GS_REQ_RESERVATION_CAN" +
|
||||
"CEL_TO_SERVER\022\031\n\021requestServerName\030\001 \001(\t" +
|
||||
"\022\027\n\017requestUserGuid\030\002 \001(\t\032A\n&GS2GS_ACK_R" +
|
||||
"ESERVATION_CANCEL_TO_SERVER\022\027\n\017requestUs" +
|
||||
"erGuid\030\001 \001(\t\0326\n\034GS2GS_NTF_RETURN_USER_LO" +
|
||||
"GOUT\022\026\n\016returnUserGuid\030\001 \001(\t\032R\n\034GS2C_NTF" +
|
||||
"_FRIEND_LEAVING_HOME\022\014\n\004guid\030\001 \001(\t\022\020\n\010ni" +
|
||||
"ckName\030\002 \001(\t\022\022\n\nreceiverId\030\003 \001(\t\032B\n\023GS2C" +
|
||||
"_NTF_PARTY_INFO\022\021\n\tpartyGuid\030\001 \001(\t\022\030\n\020pa" +
|
||||
"rtyMemberGuids\030\002 \003(\t\032x\n\023GS2C_NTF_PARTY_C" +
|
||||
"HAT\022\021\n\tpartyGuid\030\001 \001(\t\022\027\n\017partySenderGui" +
|
||||
"d\030\002 \001(\t\022\033\n\023partySenderNickname\030\003 \001(\t\022\030\n\020" +
|
||||
"partySendMessage\030\004 \001(\t\032\214\001\n\034GS2C_NTF_PART" +
|
||||
"Y_INVITE_RESULT\022#\n\terrorCode\030\001 \001(\0162\020.Ser" +
|
||||
"verErrorCode\022\027\n\017invitePartyGuid\030\002 \001(\t\022\026\n" +
|
||||
"\016inviteHostGuid\030\003 \001(\t\022\026\n\016inviteUserGuid\030" +
|
||||
"\004 \001(\t\0322\n\026GS2C_NTF_DESTROY_PARTY\022\030\n\020destr" +
|
||||
"oyPartyGuid\030\001 \001(\t\032a\n\017InvitePartyNoti\022\026\n\016" +
|
||||
"inviteUserGuid\030\001 \001(\t\022\035\n\025invitePartyLeade" +
|
||||
"rGuid\030\002 \001(\t\022\027\n\017invitePartyGuid\030\003 \001(\t\032~\n\024" +
|
||||
"ReplyInvitePartyNoti\022\027\n\017invitePartyGuid\030" +
|
||||
"\001 \001(\t\022\026\n\016inviteUserGuid\030\002 \001(\t\022\032\n\022inviteU" +
|
||||
"serNickname\030\003 \001(\t\022\031\n\006result\030\004 \001(\0162\t.Bool" +
|
||||
"Type\032L\n\017CreatePartyNoti\022 \n\030joinPartyMemb" +
|
||||
"erAccountId\030\001 \001(\t\022\027\n\017createPartyGuid\030\002 \001" +
|
||||
"(\t\032E\n\023JoinPartyMemberNoti\022\021\n\tpartyGuid\030\001" +
|
||||
" \001(\t\022\033\n\023joinPartyMemberInfo\030\002 \001(\t\032_\n\024Lea" +
|
||||
"vePartyMemberNoti\022\021\n\tpartyGuid\030\001 \001(\t\022\032\n\022" +
|
||||
"leavePartyUserGuid\030\002 \001(\t\022\030\n\005isBan\030\003 \001(\0162" +
|
||||
"\t.BoolType\032a\n\031ChangePartyServerNameNoti\022" +
|
||||
"\021\n\tpartyGuid\030\001 \001(\t\022\035\n\nisAddition\030\002 \001(\0162\t" +
|
||||
".BoolType\022\022\n\nServerName\030\003 \001(\t\032H\n\031RemoveP" +
|
||||
"artyServerNameNoti\022\021\n\tpartyGuid\030\001 \001(\t\022\030\n" +
|
||||
"\020removeServerName\030\002 \001(\t\032F\n\025ChangePartyLe" +
|
||||
"aderNoti\022\021\n\tpartyGuid\030\001 \001(\t\022\032\n\022newPartyL" +
|
||||
"eaderGuid\030\002 \001(\t\032@\n\025ExchangePartyNameNoti" +
|
||||
"\022\021\n\tpartyGuid\030\001 \001(\t\022\024\n\014newPartyName\030\002 \001(" +
|
||||
"\t\0324\n\031JoiningPartyFlagResetNoti\022\027\n\017target" +
|
||||
"AccountId\030\001 \001(\t\032X\n\033ExchangePartyMemberMa" +
|
||||
"rkNoti\022\021\n\tpartyGuid\030\001 \001(\t\022\026\n\016memberUserG" +
|
||||
"uid\030\002 \001(\t\022\016\n\006markId\030\003 \001(\005\0328\n\014BanPartyNot" +
|
||||
"i\022\021\n\tpartyGuid\030\001 \001(\t\022\025\n\rbanMemberGuid\030\002 " +
|
||||
"\001(\t\032{\n\025SummonPartyMemberNoti\022\027\n\017summonPa" +
|
||||
"rtyGuid\030\001 \001(\t\022\026\n\016summonUserGuid\030\002 \001(\t\022\030\n" +
|
||||
"\020summonServerName\030\003 \001(\t\022\027\n\tsummonPos\030\004 \001" +
|
||||
"(\0132\004.Pos\032{\n\032ReplySummonPartyMemberNoti\022\027" +
|
||||
"\n\017summonPartyGuid\030\001 \001(\t\022\026\n\016summonUserGui" +
|
||||
"d\030\002 \001(\t\022,\n\006result\030\003 \001(\0162\034.SummonPartyMem" +
|
||||
"berResultType\032\020\n\016NoticeChatNoti\032\020\n\016Syste" +
|
||||
"mMailNoti\032h\n\rPartyVoteNoti\022\021\n\tpartyGuid\030" +
|
||||
"\001 \001(\t\022\021\n\tvoteTitle\030\002 \001(\t\0221\n\rvoteStartTim" +
|
||||
"e\030\003 \001(\0132\032.google.protobuf.Timestamp\032X\n\022R" +
|
||||
"eplyPartyVoteNoti\022\021\n\tpartyGuid\030\001 \001(\t\022\026\n\016" +
|
||||
"partyVoterGuid\030\002 \001(\t\022\027\n\004vote\030\003 \001(\0162\t.Vot" +
|
||||
"eType\032u\n\023PartyVoteResultNoti\022\021\n\tpartyGui" +
|
||||
"d\030\001 \001(\t\022\021\n\tvoteTitle\030\002 \001(\t\022\022\n\nresultTrue" +
|
||||
"\030\003 \001(\005\022\023\n\013resultFalse\030\004 \001(\005\022\017\n\007abstain\030\005" +
|
||||
" \001(\005\032*\n\025PartyInstanceInfoNoti\022\021\n\tpartyGu" +
|
||||
"id\030\001 \001(\t\032`\n\017SessionInfoNoti\022\022\n\ninstanceI" +
|
||||
"d\030\001 \001(\t\022\024\n\014sessionCount\030\002 \001(\005\022\022\n\nserverT" +
|
||||
"ype\030\003 \001(\005\022\017\n\007worldId\030\004 \001(\005\032O\n\033CancelSumm" +
|
||||
"onPartyMemberNoti\022\021\n\tpartyGuid\030\001 \001(\t\022\035\n\025" +
|
||||
"cancelSummonUserGuids\030\002 \003(\t\032E\n\027PartyMemb" +
|
||||
"erLocationNoti\022\021\n\tpartyGuid\030\001 \001(\t\022\027\n\017par" +
|
||||
"tyMemberGuid\030\002 \001(\t\032I\n\034GS2GS_NTF_CLEAR_PA" +
|
||||
"RTY_SUMMON\022\021\n\tpartyGuid\030\001 \001(\t\022\026\n\016memberU" +
|
||||
"serGuid\030\002 \001(\t\032O\n\"GS2GS_NTF_DELETE_PARTY_" +
|
||||
"INVITE_SEND\022\021\n\tpartyGuid\030\001 \001(\t\022\026\n\016invite" +
|
||||
"UserGuid\030\002 \001(\t\032\263\001\n\024GS2GS_NTF_CRAFT_HELP\022" +
|
||||
"\016\n\006roomId\030\001 \001(\t\022\023\n\013anchor_guid\030\002 \001(\t\0223\n\017" +
|
||||
"craftFinishTime\030\003 \001(\0132\032.google.protobuf." +
|
||||
"Timestamp\022\021\n\townerGuid\030\004 \001(\t\022\030\n\020ownerHel" +
|
||||
"pedCount\030\005 \001(\005\022\024\n\014helpUserName\030\006 \001(\t\032`\n\031" +
|
||||
"GS2GS_NTF_EXCHANGE_MYHOME\022\016\n\006roomId\030\001 \001(" +
|
||||
"\t\022\022\n\nmyhomeGuid\030\002 \001(\t\022\037\n\nmyhomeInfo\030\003 \001(" +
|
||||
"\0132\013.MyHomeInfo\032 \n\036GS2GS_NTF_UGC_NPC_RANK" +
|
||||
"_REFRESH\032O\n%GS2GS_NTF_MYHOME_HOST_ENTER_" +
|
||||
"EDIT_ROOM\022\016\n\006roomId\030\001 \001(\t\022\026\n\016exceptUserG" +
|
||||
"uid\030\002 \001(\t\032l\n\024MOS2GS_NTF_USER_KICK\022\020\n\010use" +
|
||||
"rGuid\030\001 \001(\t\022+\n\020logoutReasonType\030\002 \001(\0162\021." +
|
||||
"LogoutReasonType\022\025\n\rkickReasonMsg\030\003 \001(\t\032" +
|
||||
"\316\001\n\024MOS2GS_NTF_MAIL_SEND\022\020\n\010userGuid\030\001 \001" +
|
||||
"(\t\022\020\n\010mailType\030\002 \001(\t\022\033\n\010itemList\030\003 \003(\0132\t" +
|
||||
".MailItem\022&\n\005title\030\004 \003(\0132\027.OperationSyst" +
|
||||
"emMessage\022$\n\003msg\030\005 \003(\0132\027.OperationSystem" +
|
||||
"Message\022\'\n\006sender\030\006 \003(\0132\027.OperationSyste" +
|
||||
"mMessage\032\203\001\n\026MOS2GS_NTF_NOTICE_CHAT\022\022\n\nn" +
|
||||
"oticeType\030\001 \003(\t\022,\n\013chatMessage\030\002 \003(\0132\027.O" +
|
||||
"perationSystemMessage\022\'\n\006sender\030\003 \003(\0132\027." +
|
||||
"OperationSystemMessage\032q\n\026GS2MQS_NTF_FAR" +
|
||||
"MING_END\022\020\n\010userGuid\030\001 \001(\t\022\'\n\016farmingSum" +
|
||||
"mary\030\005 \001(\0132\017.FarmingSummary\022\034\n\tisApplyDb" +
|
||||
"\030\006 \001(\0162\t.BoolType\032v\n\036GS2MQS_NTF_BEACON_C" +
|
||||
"OMPACT_SYNC\022\020\n\010userGuid\030\001 \001(\t\022%\n\rugcNpcC" +
|
||||
"ompact\030\005 \001(\0132\016.UgcNpcCompact\022\033\n\023locatedI" +
|
||||
"nstanceGuid\030\006 \001(\t\032}\n\024GS2GS_NTF_RENT_FLOO" +
|
||||
"R\022\030\n\020exceptServerName\030\001 \001(\t\0223\n\024rentFloor" +
|
||||
"RequestInfo\030\002 \001(\0132\025.RentFloorRequestInfo" +
|
||||
"\022\026\n\016instanceMetaId\030\003 \001(\005\032w\n#GS2GS_NTF_MO" +
|
||||
"DIFY_FLOOR_LINKED_INFOS\022\030\n\020exceptServerN" +
|
||||
"ame\030\001 \001(\t\0226\n\026modifyFloorLinkedInfos\030\002 \003(" +
|
||||
"\0132\026.ModifyFloorLinkedInfo\032g\n\'OS2GS_REQ_C" +
|
||||
"REATE_CALIUM_CONTENT_STORAGE\022\031\n\021requestS" +
|
||||
"erverName\030\001 \001(\t\022\021\n\tcontentId\030\002 \001(\t\022\016\n\006ca" +
|
||||
"lium\030\003 \001(\001\032B\n\'OS2GS_ACK_CREATE_CALIUM_CO" +
|
||||
"NTENT_STORAGE\022\027\n\006result\030\001 \001(\0132\007.Result\032&" +
|
||||
"\n$GS2GS_NTF_CHANGE_CALIUM_STORAGE_INFO\032T" +
|
||||
"\n\032GS2GS_NTF_MODIFY_LAND_INFO\022\030\n\020exceptSe" +
|
||||
"rverName\030\001 \001(\t\022\034\n\tlandInfos\030\002 \003(\0132\t.Land" +
|
||||
"Info\032`\n\036GS2GS_NTF_MODIFY_BUILDING_INFO\022\030" +
|
||||
"\n\020exceptServerName\030\001 \001(\t\022$\n\rbuildingInfo" +
|
||||
"s\030\002 \003(\0132\r.BuildingInfo\032\364\001\n GS2GS_NTF_MOD" +
|
||||
"IFY_BUILDING_PROFIT\022\030\n\020exceptServerName\030" +
|
||||
"\001 \001(\t\022\026\n\016buildingMetaId\030\002 \001(\005\022W\n\014floorPr" +
|
||||
"ofits\030\003 \003(\0132A.ServerMessage.GS2GS_NTF_MO" +
|
||||
"DIFY_BUILDING_PROFIT.FloorProfitsEntry\032E" +
|
||||
"\n\021FloorProfitsEntry\022\013\n\003key\030\001 \001(\005\022\037\n\005valu" +
|
||||
"e\030\002 \001(\0132\020.FloorProfitInfo:\0028\001\032\200\002\n,GS2GS_" +
|
||||
"NTF_LAND_AUCTION_HIGHEST_BIDDER_CHANGE\022\030" +
|
||||
"\n\020receiverUserGuid\030\001 \001(\t\022(\n\025hasReceivedR" +
|
||||
"efundMail\030\002 \001(\0162\t.BoolType\022\022\n\nlandMetaId" +
|
||||
"\030\003 \001(\005\022#\n\014currencyType\030\005 \001(\0162\r.CurrencyT" +
|
||||
"ype\022\027\n\017highestBidPrice\030\006 \001(\001\022\032\n\022highestB" +
|
||||
"idUserGuid\030\007 \001(\t\022\036\n\026highestBidUserNickna" +
|
||||
"me\030\010 \001(\t\032\251\001\n\"GS2GS_NTF_LAND_AUCTION_WINN" +
|
||||
"ING_BID\022\027\n\017winningUserGuid\030\001 \001(\t\022\033\n\023winn" +
|
||||
"ingUserNickname\030\002 \001(\t\022\022\n\nlandMetaId\030\005 \001(" +
|
||||
"\005\022\027\n\017buildingMetaIds\030\006 \003(\005\022 \n\risNewRecvM" +
|
||||
"ail\030\007 \001(\0162\t.BoolType\032>\n\"GS2GS_NTF_LAND_A" +
|
||||
"UCTION_RESERVATION\022\030\n\020toAddActivitings\030\001" +
|
||||
" \003(\005\032\356\001\n%GS2GS_NTF_ADD_BUILDING_PROFIT_H" +
|
||||
"ISTORY\022\030\n\020exceptServerName\030\001 \001(\t\022\026\n\016buil" +
|
||||
"dingMetaId\030\002 \001(\005\022\r\n\005floor\030\003 \001(\005\022.\n\nprofi",
|
||||
"tTime\030\004 \001(\0132\032.google.protobuf.Timestamp\022" +
|
||||
"-\n\021profitHistoryType\030\005 \001(\0162\022.ProfitHisto" +
|
||||
"ryType\022%\n\013floorProfit\030\006 \001(\0132\020.FloorProfi" +
|
||||
"tInfo\032\306\001\n%GS2GS_NTF_ADD_BUILDING_RENTAL_" +
|
||||
"HISTORY\022\030\n\020exceptServerName\030\001 \001(\t\022\026\n\016bui" +
|
||||
"ldingMetaId\030\002 \001(\005\022\r\n\005floor\030\003 \001(\005\022\026\n\016rent" +
|
||||
"eeUserGuid\030\004 \001(\t\022.\n\nrentalTime\030\005 \001(\0132\032.g" +
|
||||
"oogle.protobuf.Timestamp\022\024\n\014rentalPeriod" +
|
||||
"\030\006 \001(\005\0326\n\034GS2GS_NTF_UPDATE_SOLD_RECORD\022\026" +
|
||||
"\n\016targetUserGuid\030\001 \001(\t\032{\n!GS2GS_NTF_UPDA" +
|
||||
"TE_BEACON_SHOP_ITEM\022\026\n\016targetUserGuid\030\001 " +
|
||||
"\001(\t\022\030\n\020targetBeaconGuid\030\002 \001(\t\022$\n\021hasBeac" +
|
||||
"onShopItem\030\003 \001(\0162\t.BoolType\032\032\n\030MOS2GS_NT" +
|
||||
"F_UPDATE_BANNER\032j\n$MOS2GS_NTF_QUEST_TASK" +
|
||||
"_FORCE_COMPLETE\022\r\n\005reqId\030\001 \001(\005\022\021\n\taccoun" +
|
||||
"tId\030\002 \001(\t\022\020\n\010questKey\030\003 \001(\t\022\016\n\006taskId\030\004 " +
|
||||
"\001(\005\032B\n\025GS2C_NTF_MATCH_STATUS\022)\n\017matchSta" +
|
||||
"tusInfo\030\001 \001(\0132\020.MatchStatusInfo\032Q\n\027GS2MS" +
|
||||
"_REQ_MATCH_RESERVE\022\017\n\007traceId\030\001 \001(\t\022%\n\rm" +
|
||||
"atchUserInfo\030\002 \001(\0132\016.MatchUserInfo\032\243\001\n\027M" +
|
||||
"S2GS_ACK_MATCH_RESERVE\022\017\n\007traceId\030\001 \001(\t\022" +
|
||||
"#\n\terrorCode\030\002 \001(\0162\020.ServerErrorCode\022\'\n\017" +
|
||||
"matchPlayerInfo\030\003 \001(\0132\016.MatchUserInfo\022)\n" +
|
||||
"\017matchStatusInfo\030\004 \001(\0132\020.MatchStatusInfo" +
|
||||
"\032z\n\026GS2MS_REQ_MATCH_CANCEL\022\017\n\007traceId\030\001 " +
|
||||
"\001(\t\022\022\n\nserverName\030\002 \001(\t\022\020\n\010userGuid\030\003 \001(" +
|
||||
"\t\022)\n\017matchCancelType\030\004 \001(\0162\020.MatchCancel" +
|
||||
"Type\032\213\001\n\026MS2GS_ACK_MATCH_CANCEL\022\017\n\007trace" +
|
||||
"Id\030\001 \001(\t\022#\n\terrorCode\030\002 \001(\0162\020.ServerErro" +
|
||||
"rCode\022\020\n\010userGuid\030\003 \001(\t\022)\n\017matchCancelTy" +
|
||||
"pe\030\004 \001(\0162\020.MatchCancelType\032U\n\026MS2GS_NTF_" +
|
||||
"MATCH_STATUS\022\020\n\010userGuid\030\001 \001(\t\022)\n\017matchS" +
|
||||
"tatusInfo\030\002 \001(\0132\020.MatchStatusInfo\032\223\001\n\026MS" +
|
||||
"2GS_NTF_MATCH_RESULT\022%\n\013matchStatus\030\001 \001(" +
|
||||
"\0162\020.MatchStatusType\022%\n\rmatchUserInfo\030\002 \001" +
|
||||
"(\0132\016.MatchUserInfo\022\024\n\014matchRoomKey\030\003 \001(\t" +
|
||||
"\022\025\n\rmatchUpTeamId\030\004 \001(\t\032P\n\031GS2MS_REQ_MAT" +
|
||||
"CH_ROOM_INFO\022\022\n\nserverName\030\001 \001(\t\022\017\n\007trac" +
|
||||
"eId\030\002 \001(\t\022\016\n\006roomId\030\003 \001(\t\032S\n\031MS2GS_ACK_M" +
|
||||
"ATCH_ROOM_INFO\022\017\n\007traceId\030\001 \001(\t\022%\n\rmatch" +
|
||||
"RoomInfo\030\002 \001(\0132\016.MatchRoomInfo\032=\n\031GS2MS_" +
|
||||
"NTF_MATCH_GAME_QUIT\022\016\n\006roomId\030\001 \001(\t\022\020\n\010u" +
|
||||
"serGuid\030\002 \001(\t\032=\n\031GS2MS_NTF_MATCH_GAME_JO" +
|
||||
"IN\022\016\n\006roomId\030\001 \001(\t\022\020\n\010userGuid\030\002 \001(\t\032.\n\034" +
|
||||
"GS2MS_NTF_MATCH_GAME_DESTROY\022\016\n\006roomId\030\001" +
|
||||
" \001(\t\032W\n!GS2MS_NTF_MATCH_CHANGE_GAME_STAT" +
|
||||
"E\022\016\n\006roomId\030\001 \001(\t\022\"\n\005state\030\002 \001(\0162\023.Match" +
|
||||
"GameStateType\032U\n!MS2GS_NTF_MATCH_GAME_JO" +
|
||||
"IN_RESERVE\022\020\n\010userGuid\030\001 \001(\t\022\016\n\006roomId\030\002" +
|
||||
" \001(\t\022\016\n\006teamId\030\003 \001(\t\032)\n\031GS2MS_NTF_MATCH_" +
|
||||
"CHEAT_CMD\022\014\n\004args\030\001 \003(\tB\005\n\003msgB/\n+com.ca" +
|
||||
"liverse.admin.domain.RabbitMq.messageP\001b" +
|
||||
"\006proto3"
|
||||
"SK_FORCE_COMPLETEH\000\022U\n\030ntfUpdateRankingS" +
|
||||
"chedule\030] \001(\01321.ServerMessage.MOS2GS_NTF" +
|
||||
"_UPDATE_RANKING_SCHEDULEH\000\022C\n\017reqMatchRe" +
|
||||
"serve\030\261\333\006 \001(\0132&.ServerMessage.GS2MS_REQ_" +
|
||||
"MATCH_RESERVEH\000\022C\n\017ackMatchReserve\030\262\333\006 \001" +
|
||||
"(\0132&.ServerMessage.MS2GS_ACK_MATCH_RESER" +
|
||||
"VEH\000\022A\n\016reqMatchCancel\030\263\333\006 \001(\0132%.ServerM" +
|
||||
"essage.GS2MS_REQ_MATCH_CANCELH\000\022A\n\016ackMa" +
|
||||
"tchCancel\030\264\333\006 \001(\0132%.ServerMessage.MS2GS_" +
|
||||
"ACK_MATCH_CANCELH\000\022A\n\016ntfMatchStatus\030\265\333\006" +
|
||||
" \001(\0132%.ServerMessage.MS2GS_NTF_MATCH_STA" +
|
||||
"TUSH\000\022A\n\016ntfMatchResult\030\266\333\006 \001(\0132%.Server" +
|
||||
"Message.MS2GS_NTF_MATCH_RESULTH\000\022U\n\027ntfM" +
|
||||
"atchChangeGameState\030\273\333\006 \001(\01320.ServerMess" +
|
||||
"age.GS2MS_NTF_MATCH_CHANGE_GAME_STATEH\000\022" +
|
||||
"F\n\020ntfMatchGameQuit\030\274\333\006 \001(\0132(.ServerMess" +
|
||||
"age.GS2MS_NTF_MATCH_GAME_QUITH\000\022F\n\020ntfMa" +
|
||||
"tchGameJoin\030\275\333\006 \001(\0132(.ServerMessage.GS2M" +
|
||||
"S_NTF_MATCH_GAME_JOINH\000\022U\n\027ntfMatchGameJ" +
|
||||
"oinReserve\030\276\333\006 \001(\01320.ServerMessage.MS2GS" +
|
||||
"_NTF_MATCH_GAME_JOIN_RESERVEH\000\022F\n\020ntfMat" +
|
||||
"chCheatCmd\030\303\333\006 \001(\0132(.ServerMessage.GS2MS" +
|
||||
"_NTF_MATCH_CHEAT_CMDH\000\032\207\001\n\004Chat\022\027\n\004type\030" +
|
||||
"\001 \001(\0162\t.ChatType\022\026\n\016senderNickName\030\002 \001(\t" +
|
||||
"\022\024\n\014receiverGuid\030\003 \001(\t\022\'\n\rreceiverstate\030" +
|
||||
"\004 \001(\0162\020.PlayerStateType\022\017\n\007message\030\005 \001(\t" +
|
||||
"\032&\n\007KickReq\022\r\n\005reqId\030\001 \001(\005\022\014\n\004name\030\002 \001(\t" +
|
||||
"\032I\n\007KickRes\022\r\n\005reqId\030\001 \001(\005\022!\n\007errCode\030\002 " +
|
||||
"\001(\0162\020.ServerErrorCode\022\014\n\004name\030\003 \001(\t\032\024\n\022G" +
|
||||
"etServerConfigReq\032I\n\022GetServerConfigRes\022" +
|
||||
"\022\n\nserverType\030\001 \001(\005\022\017\n\007worldId\030\002 \001(\005\022\016\n\006" +
|
||||
"region\030\003 \001(\005\032\025\n\023WhiteListUpdateNoti\032\025\n\023B" +
|
||||
"lackListUpdateNoti\032%\n\rInspectionReq\022\024\n\014i" +
|
||||
"sInspection\030\001 \001(\005\032/\n\022ReadyForDistroyReq\022" +
|
||||
"\031\n\021isReadyForDistroy\030\001 \001(\005\032*\n\026ManagerSer" +
|
||||
"verActiveReq\022\020\n\010isActive\030\001 \001(\005\032*\n\026Manage" +
|
||||
"rServerActiveRes\022\020\n\010isActive\030\001 \001(\005\032(\n\025Ch" +
|
||||
"angeServerConfigReq\022\017\n\007maxUser\030\001 \001(\005\032\027\n\025" +
|
||||
"AllKickNormalUserNoti\032&\n\017ReceiveMailNoti" +
|
||||
"\022\023\n\013accountGuid\030\001 \001(\t\032\254\001\n\032AwsAutoScaleGr" +
|
||||
"oupOptionReq\022\034\n\024scaleOutPlusConstant\030\001 \001" +
|
||||
"(\005\022\030\n\020scaleInCondition\030\002 \001(\005\022\031\n\021scaleOut" +
|
||||
"Condition\030\003 \001(\005\022\022\n\nserverName\030\004 \001(\t\022\020\n\010g" +
|
||||
"roupMin\030\005 \001(\005\022\025\n\rgroupCapacity\030\006 \001(\005\032\034\n\032" +
|
||||
"AwsAutoScaleGroupOptionRes\032N\n ExchangeMa" +
|
||||
"nnequinDisplayItemNoti\022\022\n\nanchorGuid\030\001 \001" +
|
||||
"(\t\022\026\n\016displayItemIds\030\002 \003(\005\032G\n\tSacleInfo\022" +
|
||||
"\027\n\017ServerGroupName\030\001 \001(\t\022\017\n\007MinSize\030\002 \001(" +
|
||||
"\005\022\020\n\010CapaCity\030\003 \001(\005\032\032\n\030GetAwsAutoScaleOp" +
|
||||
"tionReq\032\263\001\n\030GetAwsAutoScaleOptionRes\022\034\n\024" +
|
||||
"scaleOutPlusConstant\030\001 \001(\005\022\030\n\020scaleInCon" +
|
||||
"dition\030\002 \001(\005\022\031\n\021scaleOutCondition\030\003 \001(\005\022" +
|
||||
"2\n\020instanceInfoList\030\004 \003(\0132\030.ServerMessag" +
|
||||
"e.SacleInfo\022\020\n\010isActive\030\005 \001(\005\032^\n\027InviteF" +
|
||||
"riendToMyHomeReq\022\023\n\013inviterGuid\030\001 \001(\t\022\027\n" +
|
||||
"\017inviterNickName\030\002 \001(\t\022\025\n\rinviterRoomId\030" +
|
||||
"\003 \001(\t\032\275\001\n\017ToFiendNotiBase\022\020\n\010senderId\030\001 " +
|
||||
"\001(\t\022\022\n\nsenderGuid\030\002 \001(\t\022\026\n\016senderNickNam" +
|
||||
"e\030\003 \001(\t\022\023\n\013senderState\030\004 \001(\005\022\023\n\013senderMa" +
|
||||
"pId\030\005 \001(\005\022\022\n\nreceiverId\030\006 \001(\t\022\024\n\014receive" +
|
||||
"rGuid\030\007 \001(\t\022\030\n\020receiverNickName\030\010 \001(\t\032\224\001" +
|
||||
"\n\020InviteMyHomeBase\022\020\n\010senderId\030\001 \001(\t\022\022\n\n" +
|
||||
"senderGuid\030\002 \001(\t\022\026\n\016senderNickName\030\003 \001(\t" +
|
||||
"\022\022\n\nreceiverId\030\004 \001(\t\022\024\n\014receiverGuid\030\005 \001" +
|
||||
"(\t\022\030\n\020receiverNickName\030\006 \001(\t\032n\n\021LoginNot" +
|
||||
"iToFriend\0220\n\010baseInfo\030\001 \001(\0132\036.ServerMess" +
|
||||
"age.ToFiendNotiBase\022\'\n\014locationInfo\030\002 \001(" +
|
||||
"\0132\021.UserLocationInfo\032F\n\022LogoutNotiToFrie" +
|
||||
"nd\0220\n\010baseInfo\030\001 \001(\0132\036.ServerMessage.ToF" +
|
||||
"iendNotiBase\032n\n\021StateNotiToFriend\0220\n\010bas" +
|
||||
"eInfo\030\001 \001(\0132\036.ServerMessage.ToFiendNotiB" +
|
||||
"ase\022\'\n\014locationInfo\030\002 \001(\0132\021.UserLocation" +
|
||||
"Info\032\335\001\n\027ReceiveInviteMyHomeNoti\0221\n\010base" +
|
||||
"Info\030\001 \001(\0132\037.ServerMessage.InviteMyHomeB" +
|
||||
"ase\022\027\n\017inviterMyHomeId\030\002 \001(\t\022.\n\nexpireTi" +
|
||||
"me\030\003 \001(\0132\032.google.protobuf.Timestamp\0223\n\017" +
|
||||
"replyExpireTime\030\004 \001(\0132\032.google.protobuf." +
|
||||
"Timestamp\022\021\n\tuniqueKey\030\005 \001(\t\032Z\n\025ReplyInv" +
|
||||
"iteMyhomeNoti\022\026\n\016acceptOrRefuse\030\001 \001(\005\022\022\n" +
|
||||
"\nreceiverId\030\002 \001(\t\022\025\n\rreplyUserGuid\030\003 \001(\t" +
|
||||
"\032?\n\027KickFromFriendsHomeNoti\022\022\n\nkickerGui" +
|
||||
"d\030\001 \001(\t\022\020\n\010kickerId\030\002 \001(\t\032s\n\021FriendReque" +
|
||||
"stInfo\022\014\n\004guid\030\001 \001(\t\022\020\n\010nickName\030\002 \001(\t\022\r" +
|
||||
"\n\005isNew\030\003 \001(\005\022/\n\013requestTime\030\004 \001(\0132\032.goo" +
|
||||
"gle.protobuf.Timestamp\032^\n\021FriendRequestN" +
|
||||
"oti\0225\n\013requestInfo\030\001 \001(\0132 .ServerMessage" +
|
||||
".FriendRequestInfo\022\022\n\nreceiverId\030\002 \001(\t\032\222" +
|
||||
"\001\n\020FriendAcceptNoti\022\020\n\010senderId\030\001 \001(\t\022\022\n" +
|
||||
"\nsenderGuid\030\002 \001(\t\022\026\n\016senderNickName\030\003 \001(" +
|
||||
"\t\022\026\n\016acceptOrRefuse\030\004 \001(\005\022\022\n\nreceiverId\030" +
|
||||
"\005 \001(\t\022\024\n\014receiverGuid\030\006 \001(\t\032z\n\020FriendDel" +
|
||||
"eteNoti\022\020\n\010senderId\030\001 \001(\t\022\022\n\nsenderGuid\030" +
|
||||
"\002 \001(\t\022\026\n\016senderNickName\030\003 \001(\t\022\022\n\nreceive" +
|
||||
"rId\030\004 \001(\t\022\024\n\014receiverGuid\030\005 \001(\t\032\201\001\n\027Canc" +
|
||||
"elFriendRequestNoti\022\020\n\010senderId\030\001 \001(\t\022\022\n" +
|
||||
"\nsenderGuid\030\002 \001(\t\022\026\n\016senderNickName\030\003 \001(" +
|
||||
"\t\022\022\n\nreceiverId\030\004 \001(\t\022\024\n\014receiverGuid\030\005 " +
|
||||
"\001(\t\032\035\n\033KickedFromFriendsMyHomeNoti\032\227\001\n%G" +
|
||||
"S2GS_REQ_RESERVATION_ENTER_TO_SERVER\022!\n\010" +
|
||||
"moveType\030\001 \001(\0162\017.ServerMoveType\022\031\n\021reque" +
|
||||
"stServerName\030\002 \001(\t\022\027\n\017requestUserGuid\030\003 " +
|
||||
"\001(\t\022\027\n\017summonPartyGuid\030\004 \001(\t\032|\n%GS2GS_AC" +
|
||||
"K_RESERVATION_ENTER_TO_SERVER\022\027\n\006result\030" +
|
||||
"\001 \001(\0132\007.Result\022\033\n\023reservationUserGuid\030\002 " +
|
||||
"\001(\t\022\035\n\025reservationServerName\030\003 \001(\t\032\\\n&GS" +
|
||||
"2GS_REQ_RESERVATION_CANCEL_TO_SERVER\022\031\n\021" +
|
||||
"requestServerName\030\001 \001(\t\022\027\n\017requestUserGu" +
|
||||
"id\030\002 \001(\t\032A\n&GS2GS_ACK_RESERVATION_CANCEL" +
|
||||
"_TO_SERVER\022\027\n\017requestUserGuid\030\001 \001(\t\0326\n\034G" +
|
||||
"S2GS_NTF_RETURN_USER_LOGOUT\022\026\n\016returnUse" +
|
||||
"rGuid\030\001 \001(\t\032R\n\034GS2C_NTF_FRIEND_LEAVING_H" +
|
||||
"OME\022\014\n\004guid\030\001 \001(\t\022\020\n\010nickName\030\002 \001(\t\022\022\n\nr" +
|
||||
"eceiverId\030\003 \001(\t\032B\n\023GS2C_NTF_PARTY_INFO\022\021" +
|
||||
"\n\tpartyGuid\030\001 \001(\t\022\030\n\020partyMemberGuids\030\002 " +
|
||||
"\003(\t\032x\n\023GS2C_NTF_PARTY_CHAT\022\021\n\tpartyGuid\030" +
|
||||
"\001 \001(\t\022\027\n\017partySenderGuid\030\002 \001(\t\022\033\n\023partyS" +
|
||||
"enderNickname\030\003 \001(\t\022\030\n\020partySendMessage\030" +
|
||||
"\004 \001(\t\032\214\001\n\034GS2C_NTF_PARTY_INVITE_RESULT\022#" +
|
||||
"\n\terrorCode\030\001 \001(\0162\020.ServerErrorCode\022\027\n\017i" +
|
||||
"nvitePartyGuid\030\002 \001(\t\022\026\n\016inviteHostGuid\030\003" +
|
||||
" \001(\t\022\026\n\016inviteUserGuid\030\004 \001(\t\0322\n\026GS2C_NTF" +
|
||||
"_DESTROY_PARTY\022\030\n\020destroyPartyGuid\030\001 \001(\t" +
|
||||
"\032a\n\017InvitePartyNoti\022\026\n\016inviteUserGuid\030\001 " +
|
||||
"\001(\t\022\035\n\025invitePartyLeaderGuid\030\002 \001(\t\022\027\n\017in" +
|
||||
"vitePartyGuid\030\003 \001(\t\032~\n\024ReplyInvitePartyN" +
|
||||
"oti\022\027\n\017invitePartyGuid\030\001 \001(\t\022\026\n\016inviteUs" +
|
||||
"erGuid\030\002 \001(\t\022\032\n\022inviteUserNickname\030\003 \001(\t" +
|
||||
"\022\031\n\006result\030\004 \001(\0162\t.BoolType\032L\n\017CreatePar" +
|
||||
"tyNoti\022 \n\030joinPartyMemberAccountId\030\001 \001(\t" +
|
||||
"\022\027\n\017createPartyGuid\030\002 \001(\t\032E\n\023JoinPartyMe" +
|
||||
"mberNoti\022\021\n\tpartyGuid\030\001 \001(\t\022\033\n\023joinParty" +
|
||||
"MemberInfo\030\002 \001(\t\032_\n\024LeavePartyMemberNoti" +
|
||||
"\022\021\n\tpartyGuid\030\001 \001(\t\022\032\n\022leavePartyUserGui" +
|
||||
"d\030\002 \001(\t\022\030\n\005isBan\030\003 \001(\0162\t.BoolType\032a\n\031Cha" +
|
||||
"ngePartyServerNameNoti\022\021\n\tpartyGuid\030\001 \001(" +
|
||||
"\t\022\035\n\nisAddition\030\002 \001(\0162\t.BoolType\022\022\n\nServ" +
|
||||
"erName\030\003 \001(\t\032H\n\031RemovePartyServerNameNot" +
|
||||
"i\022\021\n\tpartyGuid\030\001 \001(\t\022\030\n\020removeServerName" +
|
||||
"\030\002 \001(\t\032F\n\025ChangePartyLeaderNoti\022\021\n\tparty" +
|
||||
"Guid\030\001 \001(\t\022\032\n\022newPartyLeaderGuid\030\002 \001(\t\032@" +
|
||||
"\n\025ExchangePartyNameNoti\022\021\n\tpartyGuid\030\001 \001" +
|
||||
"(\t\022\024\n\014newPartyName\030\002 \001(\t\0324\n\031JoiningParty" +
|
||||
"FlagResetNoti\022\027\n\017targetAccountId\030\001 \001(\t\032X" +
|
||||
"\n\033ExchangePartyMemberMarkNoti\022\021\n\tpartyGu" +
|
||||
"id\030\001 \001(\t\022\026\n\016memberUserGuid\030\002 \001(\t\022\016\n\006mark" +
|
||||
"Id\030\003 \001(\005\0328\n\014BanPartyNoti\022\021\n\tpartyGuid\030\001 " +
|
||||
"\001(\t\022\025\n\rbanMemberGuid\030\002 \001(\t\032{\n\025SummonPart" +
|
||||
"yMemberNoti\022\027\n\017summonPartyGuid\030\001 \001(\t\022\026\n\016" +
|
||||
"summonUserGuid\030\002 \001(\t\022\030\n\020summonServerName" +
|
||||
"\030\003 \001(\t\022\027\n\tsummonPos\030\004 \001(\0132\004.Pos\032{\n\032Reply" +
|
||||
"SummonPartyMemberNoti\022\027\n\017summonPartyGuid" +
|
||||
"\030\001 \001(\t\022\026\n\016summonUserGuid\030\002 \001(\t\022,\n\006result" +
|
||||
"\030\003 \001(\0162\034.SummonPartyMemberResultType\032\020\n\016" +
|
||||
"NoticeChatNoti\032\020\n\016SystemMailNoti\032h\n\rPart" +
|
||||
"yVoteNoti\022\021\n\tpartyGuid\030\001 \001(\t\022\021\n\tvoteTitl" +
|
||||
"e\030\002 \001(\t\0221\n\rvoteStartTime\030\003 \001(\0132\032.google." +
|
||||
"protobuf.Timestamp\032X\n\022ReplyPartyVoteNoti" +
|
||||
"\022\021\n\tpartyGuid\030\001 \001(\t\022\026\n\016partyVoterGuid\030\002 " +
|
||||
"\001(\t\022\027\n\004vote\030\003 \001(\0162\t.VoteType\032u\n\023PartyVot" +
|
||||
"eResultNoti\022\021\n\tpartyGuid\030\001 \001(\t\022\021\n\tvoteTi" +
|
||||
"tle\030\002 \001(\t\022\022\n\nresultTrue\030\003 \001(\005\022\023\n\013resultF" +
|
||||
"alse\030\004 \001(\005\022\017\n\007abstain\030\005 \001(\005\032*\n\025PartyInst" +
|
||||
"anceInfoNoti\022\021\n\tpartyGuid\030\001 \001(\t\032`\n\017Sessi" +
|
||||
"onInfoNoti\022\022\n\ninstanceId\030\001 \001(\t\022\024\n\014sessio" +
|
||||
"nCount\030\002 \001(\005\022\022\n\nserverType\030\003 \001(\005\022\017\n\007worl" +
|
||||
"dId\030\004 \001(\005\032O\n\033CancelSummonPartyMemberNoti" +
|
||||
"\022\021\n\tpartyGuid\030\001 \001(\t\022\035\n\025cancelSummonUserG" +
|
||||
"uids\030\002 \003(\t\032E\n\027PartyMemberLocationNoti\022\021\n" +
|
||||
"\tpartyGuid\030\001 \001(\t\022\027\n\017partyMemberGuid\030\002 \001(" +
|
||||
"\t\032I\n\034GS2GS_NTF_CLEAR_PARTY_SUMMON\022\021\n\tpar" +
|
||||
"tyGuid\030\001 \001(\t\022\026\n\016memberUserGuid\030\002 \001(\t\032O\n\"" +
|
||||
"GS2GS_NTF_DELETE_PARTY_INVITE_SEND\022\021\n\tpa" +
|
||||
"rtyGuid\030\001 \001(\t\022\026\n\016inviteUserGuid\030\002 \001(\t\032\263\001" +
|
||||
"\n\024GS2GS_NTF_CRAFT_HELP\022\016\n\006roomId\030\001 \001(\t\022\023" +
|
||||
"\n\013anchor_guid\030\002 \001(\t\0223\n\017craftFinishTime\030\003" +
|
||||
" \001(\0132\032.google.protobuf.Timestamp\022\021\n\towne" +
|
||||
"rGuid\030\004 \001(\t\022\030\n\020ownerHelpedCount\030\005 \001(\005\022\024\n" +
|
||||
"\014helpUserName\030\006 \001(\t\032`\n\031GS2GS_NTF_EXCHANG" +
|
||||
"E_MYHOME\022\016\n\006roomId\030\001 \001(\t\022\022\n\nmyhomeGuid\030\002" +
|
||||
" \001(\t\022\037\n\nmyhomeInfo\030\003 \001(\0132\013.MyHomeInfo\032 \n" +
|
||||
"\036GS2GS_NTF_UGC_NPC_RANK_REFRESH\032O\n%GS2GS" +
|
||||
"_NTF_MYHOME_HOST_ENTER_EDIT_ROOM\022\016\n\006room" +
|
||||
"Id\030\001 \001(\t\022\026\n\016exceptUserGuid\030\002 \001(\t\032l\n\024MOS2" +
|
||||
"GS_NTF_USER_KICK\022\020\n\010userGuid\030\001 \001(\t\022+\n\020lo" +
|
||||
"goutReasonType\030\002 \001(\0162\021.LogoutReasonType\022" +
|
||||
"\025\n\rkickReasonMsg\030\003 \001(\t\032\316\001\n\024MOS2GS_NTF_MA" +
|
||||
"IL_SEND\022\020\n\010userGuid\030\001 \001(\t\022\020\n\010mailType\030\002 " +
|
||||
"\001(\t\022\033\n\010itemList\030\003 \003(\0132\t.MailItem\022&\n\005titl" +
|
||||
"e\030\004 \003(\0132\027.OperationSystemMessage\022$\n\003msg\030" +
|
||||
"\005 \003(\0132\027.OperationSystemMessage\022\'\n\006sender" +
|
||||
"\030\006 \003(\0132\027.OperationSystemMessage\032\203\001\n\026MOS2" +
|
||||
"GS_NTF_NOTICE_CHAT\022\022\n\nnoticeType\030\001 \003(\t\022," +
|
||||
"\n\013chatMessage\030\002 \003(\0132\027.OperationSystemMes" +
|
||||
"sage\022\'\n\006sender\030\003 \003(\0132\027.OperationSystemMe" +
|
||||
"ssage\032q\n\026GS2MQS_NTF_FARMING_END\022\020\n\010userG" +
|
||||
"uid\030\001 \001(\t\022\'\n\016farmingSummary\030\005 \001(\0132\017.Farm" +
|
||||
"ingSummary\022\034\n\tisApplyDb\030\006 \001(\0162\t.BoolType" +
|
||||
"\032v\n\036GS2MQS_NTF_BEACON_COMPACT_SYNC\022\020\n\010us" +
|
||||
"erGuid\030\001 \001(\t\022%\n\rugcNpcCompact\030\005 \001(\0132\016.Ug" +
|
||||
"cNpcCompact\022\033\n\023locatedInstanceGuid\030\006 \001(\t" +
|
||||
"\032}\n\024GS2GS_NTF_RENT_FLOOR\022\030\n\020exceptServer" +
|
||||
"Name\030\001 \001(\t\0223\n\024rentFloorRequestInfo\030\002 \001(\013" +
|
||||
"2\025.RentFloorRequestInfo\022\026\n\016instanceMetaI" +
|
||||
"d\030\003 \001(\005\032w\n#GS2GS_NTF_MODIFY_FLOOR_LINKED" +
|
||||
"_INFOS\022\030\n\020exceptServerName\030\001 \001(\t\0226\n\026modi" +
|
||||
"fyFloorLinkedInfos\030\002 \003(\0132\026.ModifyFloorLi" +
|
||||
"nkedInfo\032g\n\'OS2GS_REQ_CREATE_CALIUM_CONT" +
|
||||
"ENT_STORAGE\022\031\n\021requestServerName\030\001 \001(\t\022\021" +
|
||||
"\n\tcontentId\030\002 \001(\t\022\016\n\006calium\030\003 \001(\001\032B\n\'OS2" +
|
||||
"GS_ACK_CREATE_CALIUM_CONTENT_STORAGE\022\027\n\006" +
|
||||
"result\030\001 \001(\0132\007.Result\032&\n$GS2GS_NTF_CHANG" +
|
||||
"E_CALIUM_STORAGE_INFO\032T\n\032GS2GS_NTF_MODIF" +
|
||||
"Y_LAND_INFO\022\030\n\020exceptServerName\030\001 \001(\t\022\034\n" +
|
||||
"\tlandInfos\030\002 \003(\0132\t.LandInfo\032`\n\036GS2GS_NTF" +
|
||||
"_MODIFY_BUILDING_INFO\022\030\n\020exceptServerNam" +
|
||||
"e\030\001 \001(\t\022$\n\rbuildingInfos\030\002 \003(\0132\r.Buildin" +
|
||||
"gInfo\032\364\001\n GS2GS_NTF_MODIFY_BUILDING_PROF" +
|
||||
"IT\022\030\n\020exceptServerName\030\001 \001(\t\022\026\n\016building" +
|
||||
"MetaId\030\002 \001(\005\022W\n\014floorProfits\030\003 \003(\0132A.Ser" +
|
||||
"verMessage.GS2GS_NTF_MODIFY_BUILDING_PRO" +
|
||||
"FIT.FloorProfitsEntry\032E\n\021FloorProfitsEnt" +
|
||||
"ry\022\013\n\003key\030\001 \001(\005\022\037\n\005value\030\002 \001(\0132\020.FloorPr" +
|
||||
"ofitInfo:\0028\001\032\200\002\n,GS2GS_NTF_LAND_AUCTION_" +
|
||||
"HIGHEST_BIDDER_CHANGE\022\030\n\020receiverUserGui" +
|
||||
"d\030\001 \001(\t\022(\n\025hasReceivedRefundMail\030\002 \001(\0162\t" +
|
||||
".BoolType\022\022\n\nlandMetaId\030\003 \001(\005\022#\n\014currenc" +
|
||||
"yType\030\005 \001(\0162\r.CurrencyType\022\027\n\017highestBid" +
|
||||
"Price\030\006 \001(\001\022\032\n\022highestBidUserGuid\030\007 \001(\t\022" +
|
||||
"\036\n\026highestBidUserNickname\030\010 \001(\t\032\251\001\n\"GS2G" +
|
||||
"S_NTF_LAND_AUCTION_WINNING_BID\022\027\n\017winnin" +
|
||||
"gUserGuid\030\001 \001(\t\022\033\n\023winningUserNickname\030\002" +
|
||||
" \001(\t\022\022\n\nlandMetaId\030\005 \001(\005\022\027\n\017buildingMeta" +
|
||||
"Ids\030\006 \003(\005\022 \n\risNewRecvMail\030\007 \001(\0162\t.BoolT" +
|
||||
"ype\032>\n\"GS2GS_NTF_LAND_AUCTION_RESERVATIO" +
|
||||
"N\022\030\n\020toAddActivitings\030\001 \003(\005\032\356\001\n%GS2GS_NT" +
|
||||
"F_ADD_BUILDING_PROFIT_HISTORY\022\030\n\020exceptS" +
|
||||
"erverName\030\001 \001(\t\022\026\n\016buildingMetaId\030\002 \001(\005\022" +
|
||||
"\r\n\005floor\030\003 \001(\005\022.\n\nprofitTime\030\004 \001(\0132\032.goo" +
|
||||
"gle.protobuf.Timestamp\022-\n\021profitHistoryT",
|
||||
"ype\030\005 \001(\0162\022.ProfitHistoryType\022%\n\013floorPr" +
|
||||
"ofit\030\006 \001(\0132\020.FloorProfitInfo\032\306\001\n%GS2GS_N" +
|
||||
"TF_ADD_BUILDING_RENTAL_HISTORY\022\030\n\020except" +
|
||||
"ServerName\030\001 \001(\t\022\026\n\016buildingMetaId\030\002 \001(\005" +
|
||||
"\022\r\n\005floor\030\003 \001(\005\022\026\n\016renteeUserGuid\030\004 \001(\t\022" +
|
||||
".\n\nrentalTime\030\005 \001(\0132\032.google.protobuf.Ti" +
|
||||
"mestamp\022\024\n\014rentalPeriod\030\006 \001(\005\0326\n\034GS2GS_N" +
|
||||
"TF_UPDATE_SOLD_RECORD\022\026\n\016targetUserGuid\030" +
|
||||
"\001 \001(\t\032{\n!GS2GS_NTF_UPDATE_BEACON_SHOP_IT" +
|
||||
"EM\022\026\n\016targetUserGuid\030\001 \001(\t\022\030\n\020targetBeac" +
|
||||
"onGuid\030\002 \001(\t\022$\n\021hasBeaconShopItem\030\003 \001(\0162" +
|
||||
"\t.BoolType\032\032\n\030MOS2GS_NTF_UPDATE_BANNER\032j" +
|
||||
"\n$MOS2GS_NTF_QUEST_TASK_FORCE_COMPLETE\022\r" +
|
||||
"\n\005reqId\030\001 \001(\005\022\021\n\taccountId\030\002 \001(\t\022\020\n\010ques" +
|
||||
"tKey\030\003 \001(\t\022\016\n\006taskId\030\004 \001(\005\032$\n\"MOS2GS_NTF" +
|
||||
"_UPDATE_RANKING_SCHEDULE\032B\n\025GS2C_NTF_MAT" +
|
||||
"CH_STATUS\022)\n\017matchStatusInfo\030\001 \001(\0132\020.Mat" +
|
||||
"chStatusInfo\032Q\n\027GS2MS_REQ_MATCH_RESERVE\022" +
|
||||
"\017\n\007traceId\030\001 \001(\t\022%\n\rmatchUserInfo\030\002 \001(\0132" +
|
||||
"\016.MatchUserInfo\032\243\001\n\027MS2GS_ACK_MATCH_RESE" +
|
||||
"RVE\022\017\n\007traceId\030\001 \001(\t\022#\n\terrorCode\030\002 \001(\0162" +
|
||||
"\020.ServerErrorCode\022\'\n\017matchPlayerInfo\030\003 \001" +
|
||||
"(\0132\016.MatchUserInfo\022)\n\017matchStatusInfo\030\004 " +
|
||||
"\001(\0132\020.MatchStatusInfo\032z\n\026GS2MS_REQ_MATCH" +
|
||||
"_CANCEL\022\017\n\007traceId\030\001 \001(\t\022\022\n\nserverName\030\002" +
|
||||
" \001(\t\022\020\n\010userGuid\030\003 \001(\t\022)\n\017matchCancelTyp" +
|
||||
"e\030\004 \001(\0162\020.MatchCancelType\032\213\001\n\026MS2GS_ACK_" +
|
||||
"MATCH_CANCEL\022\017\n\007traceId\030\001 \001(\t\022#\n\terrorCo" +
|
||||
"de\030\002 \001(\0162\020.ServerErrorCode\022\020\n\010userGuid\030\003" +
|
||||
" \001(\t\022)\n\017matchCancelType\030\004 \001(\0162\020.MatchCan" +
|
||||
"celType\032U\n\026MS2GS_NTF_MATCH_STATUS\022\020\n\010use" +
|
||||
"rGuid\030\001 \001(\t\022)\n\017matchStatusInfo\030\002 \001(\0132\020.M" +
|
||||
"atchStatusInfo\032\223\001\n\026MS2GS_NTF_MATCH_RESUL" +
|
||||
"T\022%\n\013matchStatus\030\001 \001(\0162\020.MatchStatusType" +
|
||||
"\022%\n\rmatchUserInfo\030\002 \001(\0132\016.MatchUserInfo\022" +
|
||||
"\024\n\014matchRoomKey\030\003 \001(\t\022\025\n\rmatchUpTeamId\030\004" +
|
||||
" \001(\t\032=\n\031GS2MS_NTF_MATCH_GAME_QUIT\022\016\n\006roo" +
|
||||
"mId\030\001 \001(\t\022\020\n\010userGuid\030\002 \001(\t\032=\n\031GS2MS_NTF" +
|
||||
"_MATCH_GAME_JOIN\022\016\n\006roomId\030\001 \001(\t\022\020\n\010user" +
|
||||
"Guid\030\002 \001(\t\032W\n!GS2MS_NTF_MATCH_CHANGE_GAM" +
|
||||
"E_STATE\022\016\n\006roomId\030\001 \001(\t\022\"\n\005state\030\002 \001(\0162\023" +
|
||||
".MatchGameStateType\032U\n!MS2GS_NTF_MATCH_G" +
|
||||
"AME_JOIN_RESERVE\022\020\n\010userGuid\030\001 \001(\t\022\016\n\006ro" +
|
||||
"omId\030\002 \001(\t\022\016\n\006teamId\030\003 \001(\t\032)\n\031GS2MS_NTF_" +
|
||||
"MATCH_CHEAT_CMD\022\014\n\004args\030\001 \003(\tB\005\n\003msgB/\n+" +
|
||||
"com.caliverse.admin.domain.RabbitMq.mess" +
|
||||
"ageP\001b\006proto3"
|
||||
};
|
||||
descriptor = com.google.protobuf.Descriptors.FileDescriptor
|
||||
.internalBuildGeneratedFileFrom(descriptorData,
|
||||
@@ -1056,7 +1040,7 @@ public final class ServerMessageOuterClass {
|
||||
internal_static_ServerMessage_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_ServerMessage_descriptor,
|
||||
new java.lang.String[] { "MessageTime", "MessageSender", "Chat", "KickReq", "KickRes", "WhiteListUpdateNoti", "BlackListUpdateNoti", "InspectionReq", "ChangeServerConfigReq", "AllKickNormalUserNoti", "AwsAutoScaleGroupOptionReq", "AwsAutoScaleGroupOptionRes", "ReceiveMailNoti", "ExchangeMannequinDisplayItemNoti", "GetAwsAutoScaleOptionReq", "GetAwsAutoScaleOptionRes", "ReadyForDistroyReq", "LoginNotiToFriend", "LogoutNotiToFriend", "ManagerServerActiveReq", "ManagerServerActiveRes", "ReceiveInviteMyHomeNoti", "ReplyInviteMyhomeNoti", "StateNotiToFriend", "FriendRequestNoti", "FriendAcceptNoti", "FriendDeleteNoti", "CancelFriendRequestNoti", "InvitePartyNoti", "ReplyInvitePartyNoti", "JoinPartyMemberNoti", "LeavePartyMemberNoti", "ChangePartyServerNameNoti", "ChangePartyLeaderNoti", "ExchangePartyNameNoti", "ExchangePartyMemberMarkNoti", "BanPartyNoti", "SummonPartyMemberNoti", "ReplySummonPartyMemberNoti", "NoticeChatNoti", "SystemMailNoti", "PartyVoteNoti", "ReplyPartyVoteNoti", "PartyVoteResultNoti", "PartyInstanceInfoNoti", "SessionInfoNoti", "KickedFromFriendsMyHomeNoti", "CancelSummonPartyMemberNoti", "PartyMemberLocationNoti", "NtfFriendLeavingHome", "NtfInvitePartyRecvResult", "NtfDestroyParty", "ReqReservationEnterToServer", "AckReservationEnterToServer", "NtfPartyChat", "NtfPartyInfo", "NtfReturnUserLogout", "NtfClearPartySummon", "NtfCraftHelp", "ReqReservationCancelToServer", "NtfExchangeMyhome", "NtfUgcNpcRankRefresh", "NtfDeletePartyInviteSend", "NtfMyhomeHostEnterEditRoom", "NtfUserKick", "NtfMailSend", "NtfOperationSystemNoticeChat", "AckReservationCancelToServer", "NtfFarmingEnd", "NtfRentFloor", "NtfModifyFloorLinkedInfos", "NtfBeaconCompactSync", "ReqCreateContentStorage", "AckCreateContentStorage", "NtfChangeCaliumStorageInfo", "NtfModifyLandInfo", "NtfModifyBuildingInfo", "NtfModifyBuildingProfit", "NtfLandAuctionHighestBidderChange", "NtfLandAuctionWinningBid", "NtfLandAuctionReservation", "NtfAddBuildingProfitHistory", "NtfAddBuildingRentalHistory", "NtfUpdateSoldRecord", "NtfUpdateBeaconShopItem", "NtfUpdateBanner", "NtfQuestTaskForceComplete", "ReqMatchReserve", "AckMatchReserve", "ReqMatchCancel", "AckMatchCancel", "NtfMatchStatus", "NtfMatchResult", "ReqMatchRoomInfo", "AckMatchRoomInfo", "NtfMatchChangeGameState", "NtfMatchGameQuit", "NtfMatchGameJoin", "NtfMatchGameJoinReserve", "NtfMatchCheatCmd", "Msg", });
|
||||
new java.lang.String[] { "MessageTime", "MessageSender", "Chat", "KickReq", "KickRes", "WhiteListUpdateNoti", "BlackListUpdateNoti", "InspectionReq", "ChangeServerConfigReq", "AllKickNormalUserNoti", "AwsAutoScaleGroupOptionReq", "AwsAutoScaleGroupOptionRes", "ReceiveMailNoti", "ExchangeMannequinDisplayItemNoti", "GetAwsAutoScaleOptionReq", "GetAwsAutoScaleOptionRes", "ReadyForDistroyReq", "LoginNotiToFriend", "LogoutNotiToFriend", "ManagerServerActiveReq", "ManagerServerActiveRes", "ReceiveInviteMyHomeNoti", "ReplyInviteMyhomeNoti", "StateNotiToFriend", "FriendRequestNoti", "FriendAcceptNoti", "FriendDeleteNoti", "CancelFriendRequestNoti", "InvitePartyNoti", "ReplyInvitePartyNoti", "JoinPartyMemberNoti", "LeavePartyMemberNoti", "ChangePartyServerNameNoti", "ChangePartyLeaderNoti", "ExchangePartyNameNoti", "ExchangePartyMemberMarkNoti", "BanPartyNoti", "SummonPartyMemberNoti", "ReplySummonPartyMemberNoti", "NoticeChatNoti", "SystemMailNoti", "PartyVoteNoti", "ReplyPartyVoteNoti", "PartyVoteResultNoti", "PartyInstanceInfoNoti", "SessionInfoNoti", "KickedFromFriendsMyHomeNoti", "CancelSummonPartyMemberNoti", "PartyMemberLocationNoti", "NtfFriendLeavingHome", "NtfInvitePartyRecvResult", "NtfDestroyParty", "ReqReservationEnterToServer", "AckReservationEnterToServer", "NtfPartyChat", "NtfPartyInfo", "NtfReturnUserLogout", "NtfClearPartySummon", "NtfCraftHelp", "ReqReservationCancelToServer", "NtfExchangeMyhome", "NtfUgcNpcRankRefresh", "NtfDeletePartyInviteSend", "NtfMyhomeHostEnterEditRoom", "NtfUserKick", "NtfMailSend", "NtfOperationSystemNoticeChat", "AckReservationCancelToServer", "NtfFarmingEnd", "NtfRentFloor", "NtfModifyFloorLinkedInfos", "NtfBeaconCompactSync", "ReqCreateContentStorage", "AckCreateContentStorage", "NtfChangeCaliumStorageInfo", "NtfModifyLandInfo", "NtfModifyBuildingInfo", "NtfModifyBuildingProfit", "NtfLandAuctionHighestBidderChange", "NtfLandAuctionWinningBid", "NtfLandAuctionReservation", "NtfAddBuildingProfitHistory", "NtfAddBuildingRentalHistory", "NtfUpdateSoldRecord", "NtfUpdateBeaconShopItem", "NtfUpdateBanner", "NtfQuestTaskForceComplete", "NtfUpdateRankingSchedule", "ReqMatchReserve", "AckMatchReserve", "ReqMatchCancel", "AckMatchCancel", "NtfMatchStatus", "NtfMatchResult", "NtfMatchChangeGameState", "NtfMatchGameQuit", "NtfMatchGameJoin", "NtfMatchGameJoinReserve", "NtfMatchCheatCmd", "Msg", });
|
||||
internal_static_ServerMessage_Chat_descriptor =
|
||||
internal_static_ServerMessage_descriptor.getNestedTypes().get(0);
|
||||
internal_static_ServerMessage_Chat_fieldAccessorTable = new
|
||||
@@ -1639,92 +1623,80 @@ public final class ServerMessageOuterClass {
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_ServerMessage_MOS2GS_NTF_QUEST_TASK_FORCE_COMPLETE_descriptor,
|
||||
new java.lang.String[] { "ReqId", "AccountId", "QuestKey", "TaskId", });
|
||||
internal_static_ServerMessage_GS2C_NTF_MATCH_STATUS_descriptor =
|
||||
internal_static_ServerMessage_MOS2GS_NTF_UPDATE_RANKING_SCHEDULE_descriptor =
|
||||
internal_static_ServerMessage_descriptor.getNestedTypes().get(96);
|
||||
internal_static_ServerMessage_MOS2GS_NTF_UPDATE_RANKING_SCHEDULE_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_ServerMessage_MOS2GS_NTF_UPDATE_RANKING_SCHEDULE_descriptor,
|
||||
new java.lang.String[] { });
|
||||
internal_static_ServerMessage_GS2C_NTF_MATCH_STATUS_descriptor =
|
||||
internal_static_ServerMessage_descriptor.getNestedTypes().get(97);
|
||||
internal_static_ServerMessage_GS2C_NTF_MATCH_STATUS_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_ServerMessage_GS2C_NTF_MATCH_STATUS_descriptor,
|
||||
new java.lang.String[] { "MatchStatusInfo", });
|
||||
internal_static_ServerMessage_GS2MS_REQ_MATCH_RESERVE_descriptor =
|
||||
internal_static_ServerMessage_descriptor.getNestedTypes().get(97);
|
||||
internal_static_ServerMessage_descriptor.getNestedTypes().get(98);
|
||||
internal_static_ServerMessage_GS2MS_REQ_MATCH_RESERVE_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_ServerMessage_GS2MS_REQ_MATCH_RESERVE_descriptor,
|
||||
new java.lang.String[] { "TraceId", "MatchUserInfo", });
|
||||
internal_static_ServerMessage_MS2GS_ACK_MATCH_RESERVE_descriptor =
|
||||
internal_static_ServerMessage_descriptor.getNestedTypes().get(98);
|
||||
internal_static_ServerMessage_descriptor.getNestedTypes().get(99);
|
||||
internal_static_ServerMessage_MS2GS_ACK_MATCH_RESERVE_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_ServerMessage_MS2GS_ACK_MATCH_RESERVE_descriptor,
|
||||
new java.lang.String[] { "TraceId", "ErrorCode", "MatchPlayerInfo", "MatchStatusInfo", });
|
||||
internal_static_ServerMessage_GS2MS_REQ_MATCH_CANCEL_descriptor =
|
||||
internal_static_ServerMessage_descriptor.getNestedTypes().get(99);
|
||||
internal_static_ServerMessage_descriptor.getNestedTypes().get(100);
|
||||
internal_static_ServerMessage_GS2MS_REQ_MATCH_CANCEL_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_ServerMessage_GS2MS_REQ_MATCH_CANCEL_descriptor,
|
||||
new java.lang.String[] { "TraceId", "ServerName", "UserGuid", "MatchCancelType", });
|
||||
internal_static_ServerMessage_MS2GS_ACK_MATCH_CANCEL_descriptor =
|
||||
internal_static_ServerMessage_descriptor.getNestedTypes().get(100);
|
||||
internal_static_ServerMessage_descriptor.getNestedTypes().get(101);
|
||||
internal_static_ServerMessage_MS2GS_ACK_MATCH_CANCEL_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_ServerMessage_MS2GS_ACK_MATCH_CANCEL_descriptor,
|
||||
new java.lang.String[] { "TraceId", "ErrorCode", "UserGuid", "MatchCancelType", });
|
||||
internal_static_ServerMessage_MS2GS_NTF_MATCH_STATUS_descriptor =
|
||||
internal_static_ServerMessage_descriptor.getNestedTypes().get(101);
|
||||
internal_static_ServerMessage_descriptor.getNestedTypes().get(102);
|
||||
internal_static_ServerMessage_MS2GS_NTF_MATCH_STATUS_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_ServerMessage_MS2GS_NTF_MATCH_STATUS_descriptor,
|
||||
new java.lang.String[] { "UserGuid", "MatchStatusInfo", });
|
||||
internal_static_ServerMessage_MS2GS_NTF_MATCH_RESULT_descriptor =
|
||||
internal_static_ServerMessage_descriptor.getNestedTypes().get(102);
|
||||
internal_static_ServerMessage_descriptor.getNestedTypes().get(103);
|
||||
internal_static_ServerMessage_MS2GS_NTF_MATCH_RESULT_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_ServerMessage_MS2GS_NTF_MATCH_RESULT_descriptor,
|
||||
new java.lang.String[] { "MatchStatus", "MatchUserInfo", "MatchRoomKey", "MatchUpTeamId", });
|
||||
internal_static_ServerMessage_GS2MS_REQ_MATCH_ROOM_INFO_descriptor =
|
||||
internal_static_ServerMessage_descriptor.getNestedTypes().get(103);
|
||||
internal_static_ServerMessage_GS2MS_REQ_MATCH_ROOM_INFO_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_ServerMessage_GS2MS_REQ_MATCH_ROOM_INFO_descriptor,
|
||||
new java.lang.String[] { "ServerName", "TraceId", "RoomId", });
|
||||
internal_static_ServerMessage_MS2GS_ACK_MATCH_ROOM_INFO_descriptor =
|
||||
internal_static_ServerMessage_descriptor.getNestedTypes().get(104);
|
||||
internal_static_ServerMessage_MS2GS_ACK_MATCH_ROOM_INFO_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_ServerMessage_MS2GS_ACK_MATCH_ROOM_INFO_descriptor,
|
||||
new java.lang.String[] { "TraceId", "MatchRoomInfo", });
|
||||
internal_static_ServerMessage_GS2MS_NTF_MATCH_GAME_QUIT_descriptor =
|
||||
internal_static_ServerMessage_descriptor.getNestedTypes().get(105);
|
||||
internal_static_ServerMessage_descriptor.getNestedTypes().get(104);
|
||||
internal_static_ServerMessage_GS2MS_NTF_MATCH_GAME_QUIT_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_ServerMessage_GS2MS_NTF_MATCH_GAME_QUIT_descriptor,
|
||||
new java.lang.String[] { "RoomId", "UserGuid", });
|
||||
internal_static_ServerMessage_GS2MS_NTF_MATCH_GAME_JOIN_descriptor =
|
||||
internal_static_ServerMessage_descriptor.getNestedTypes().get(106);
|
||||
internal_static_ServerMessage_descriptor.getNestedTypes().get(105);
|
||||
internal_static_ServerMessage_GS2MS_NTF_MATCH_GAME_JOIN_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_ServerMessage_GS2MS_NTF_MATCH_GAME_JOIN_descriptor,
|
||||
new java.lang.String[] { "RoomId", "UserGuid", });
|
||||
internal_static_ServerMessage_GS2MS_NTF_MATCH_GAME_DESTROY_descriptor =
|
||||
internal_static_ServerMessage_descriptor.getNestedTypes().get(107);
|
||||
internal_static_ServerMessage_GS2MS_NTF_MATCH_GAME_DESTROY_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_ServerMessage_GS2MS_NTF_MATCH_GAME_DESTROY_descriptor,
|
||||
new java.lang.String[] { "RoomId", });
|
||||
internal_static_ServerMessage_GS2MS_NTF_MATCH_CHANGE_GAME_STATE_descriptor =
|
||||
internal_static_ServerMessage_descriptor.getNestedTypes().get(108);
|
||||
internal_static_ServerMessage_descriptor.getNestedTypes().get(106);
|
||||
internal_static_ServerMessage_GS2MS_NTF_MATCH_CHANGE_GAME_STATE_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_ServerMessage_GS2MS_NTF_MATCH_CHANGE_GAME_STATE_descriptor,
|
||||
new java.lang.String[] { "RoomId", "State", });
|
||||
internal_static_ServerMessage_MS2GS_NTF_MATCH_GAME_JOIN_RESERVE_descriptor =
|
||||
internal_static_ServerMessage_descriptor.getNestedTypes().get(109);
|
||||
internal_static_ServerMessage_descriptor.getNestedTypes().get(107);
|
||||
internal_static_ServerMessage_MS2GS_NTF_MATCH_GAME_JOIN_RESERVE_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_ServerMessage_MS2GS_NTF_MATCH_GAME_JOIN_RESERVE_descriptor,
|
||||
new java.lang.String[] { "UserGuid", "RoomId", "TeamId", });
|
||||
internal_static_ServerMessage_GS2MS_NTF_MATCH_CHEAT_CMD_descriptor =
|
||||
internal_static_ServerMessage_descriptor.getNestedTypes().get(110);
|
||||
internal_static_ServerMessage_descriptor.getNestedTypes().get(108);
|
||||
internal_static_ServerMessage_GS2MS_NTF_MATCH_CHEAT_CMD_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_ServerMessage_GS2MS_NTF_MATCH_CHEAT_CMD_descriptor,
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.caliverse.admin.domain.api;
|
||||
|
||||
import com.caliverse.admin.domain.response.DictionaryResponse;
|
||||
import com.caliverse.admin.domain.service.MetaDataService;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
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/dictionary")
|
||||
public class DictionaryController {
|
||||
private final MetaDataService metaDataService;
|
||||
|
||||
@GetMapping("/brand/list")
|
||||
public ResponseEntity<DictionaryResponse> brandList(){
|
||||
return ResponseEntity.ok().body( metaDataService.getBrandList());
|
||||
}
|
||||
|
||||
@GetMapping("/ranking/list")
|
||||
public ResponseEntity<DictionaryResponse> rankingList(){
|
||||
return ResponseEntity.ok().body( metaDataService.getRankingList());
|
||||
}
|
||||
|
||||
@GetMapping("/battle-config/list")
|
||||
public ResponseEntity<DictionaryResponse> battleConfigList(){
|
||||
return ResponseEntity.ok().body( metaDataService.getBattleConfigList());
|
||||
}
|
||||
|
||||
@GetMapping("/battle-reward/list")
|
||||
public ResponseEntity<DictionaryResponse> battleRewardList(){
|
||||
return ResponseEntity.ok().body( metaDataService.getBattleRewardList());
|
||||
}
|
||||
|
||||
@GetMapping("/game-mode/list")
|
||||
public ResponseEntity<DictionaryResponse> gameModeList(){
|
||||
return ResponseEntity.ok().body( metaDataService.getGameModeList());
|
||||
}
|
||||
|
||||
@GetMapping("/event-action/list")
|
||||
public ResponseEntity<DictionaryResponse> eventActionList(){
|
||||
return ResponseEntity.ok().body( metaDataService.getEventActionList());
|
||||
}
|
||||
|
||||
@GetMapping("/item/list")
|
||||
public ResponseEntity<DictionaryResponse> itemList(
|
||||
@RequestParam Map<String, String> requestParams){
|
||||
return ResponseEntity.ok().body( metaDataService.getItemDictList(requestParams));
|
||||
}
|
||||
|
||||
@GetMapping("/item/excel-export")
|
||||
public void itemExcelExport(HttpServletResponse response,
|
||||
@RequestParam Map<String, String> requestParams){
|
||||
metaDataService.itemExcelExport(response, requestParams);
|
||||
}
|
||||
|
||||
@GetMapping("/craft/list")
|
||||
public ResponseEntity<DictionaryResponse> craftList(
|
||||
@RequestParam Map<String, String> requestParams){
|
||||
return ResponseEntity.ok().body( metaDataService.getCraftingDictList(requestParams));
|
||||
}
|
||||
|
||||
@GetMapping("/craft/excel-export")
|
||||
public void craftExcelExport(HttpServletResponse response,
|
||||
@RequestParam Map<String, String> requestParams){
|
||||
metaDataService.craftExcelExport(response, requestParams);
|
||||
}
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
package com.caliverse.admin.domain.api;
|
||||
|
||||
import com.caliverse.admin.domain.request.EventRequest;
|
||||
import com.caliverse.admin.domain.response.EventResponse;
|
||||
import com.caliverse.admin.domain.service.EventService;
|
||||
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/event")
|
||||
public class EventController {
|
||||
|
||||
private final EventService eventService;
|
||||
// 리스트 조회
|
||||
@GetMapping("/list")
|
||||
public ResponseEntity<EventResponse> getList(
|
||||
@RequestParam Map<String, String> requestParam){
|
||||
|
||||
return ResponseEntity.ok().body(eventService.getList(requestParam));
|
||||
}
|
||||
// 상세 조회
|
||||
@GetMapping("/detail/{id}")
|
||||
public ResponseEntity<EventResponse> getDetail(
|
||||
@PathVariable("id") Long id){
|
||||
|
||||
return ResponseEntity.ok().body(eventService.getDetail(id));
|
||||
}
|
||||
@PostMapping
|
||||
public ResponseEntity<EventResponse> postEvent(
|
||||
@RequestBody EventRequest eventRequest){
|
||||
|
||||
return ResponseEntity.ok().body(eventService.postEvent(eventRequest));
|
||||
}
|
||||
@PutMapping("/{id}")
|
||||
public ResponseEntity<EventResponse> updateEvent(
|
||||
@PathVariable("id")Long id, @RequestBody EventRequest eventRequest){
|
||||
|
||||
return ResponseEntity.ok().body(eventService.updateEvent(id, eventRequest));
|
||||
}
|
||||
@DeleteMapping("/delete")
|
||||
public ResponseEntity<EventResponse> deleteEvent(
|
||||
@RequestBody EventRequest eventRequest){
|
||||
|
||||
return ResponseEntity.ok().body(eventService.deleteEvent(eventRequest));
|
||||
}
|
||||
@PostMapping("/item")
|
||||
public ResponseEntity<EventResponse> getItem(
|
||||
@RequestBody Map<String, String> item) {
|
||||
return ResponseEntity.ok().body(eventService.getMetaItem(item.get("item")));
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,6 @@
|
||||
package com.caliverse.admin.domain.api;
|
||||
|
||||
import com.caliverse.admin.domain.request.EventRequest;
|
||||
import com.caliverse.admin.domain.request.LandRequest;
|
||||
import com.caliverse.admin.domain.response.EventResponse;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.caliverse.admin.domain.api;
|
||||
|
||||
import com.caliverse.admin.domain.request.RankRequest;
|
||||
import com.caliverse.admin.domain.response.RankResponse;
|
||||
import com.caliverse.admin.domain.service.RankService;
|
||||
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/rank")
|
||||
public class RankController {
|
||||
private final RankService rankService;
|
||||
|
||||
@GetMapping("/schedule/list")
|
||||
public ResponseEntity<RankResponse> getRankingScheduleList(
|
||||
@RequestParam Map<String, String> requestParam){
|
||||
return ResponseEntity.ok().body( rankService.getList(requestParam));
|
||||
}
|
||||
|
||||
@GetMapping("/schedule/detail/{id}")
|
||||
public ResponseEntity<RankResponse> getRankingScheduleDetail(
|
||||
@PathVariable("id") Long id){
|
||||
return ResponseEntity.ok().body( rankService.getDetail(id));
|
||||
}
|
||||
|
||||
@PostMapping("/schedule")
|
||||
public ResponseEntity<RankResponse> postRankingSchedule(
|
||||
@RequestBody RankRequest rankRequest){
|
||||
|
||||
return ResponseEntity.ok().body(rankService.postRankingSchedule(rankRequest));
|
||||
}
|
||||
|
||||
@PutMapping("/schedule/{id}")
|
||||
public ResponseEntity<RankResponse> updateRankingSchedule(
|
||||
@PathVariable("id")Long id, @RequestBody RankRequest rankRequest){
|
||||
|
||||
return ResponseEntity.ok().body(rankService.updateRankingSchedule(id, rankRequest));
|
||||
}
|
||||
|
||||
@DeleteMapping("/schedule/delete")
|
||||
public ResponseEntity<RankResponse> deleteRankingSchedule(
|
||||
@RequestParam Long id){
|
||||
|
||||
return ResponseEntity.ok().body(rankService.deleteRankingSchedule(id));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.caliverse.admin.domain.api;
|
||||
|
||||
import com.caliverse.admin.domain.request.RewardEventRequest;
|
||||
import com.caliverse.admin.domain.response.RewardEventResponse;
|
||||
import com.caliverse.admin.domain.service.RewardEventService;
|
||||
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/event")
|
||||
public class RewardEventController {
|
||||
|
||||
private final RewardEventService rewardEventService;
|
||||
// 리스트 조회
|
||||
@GetMapping("/list")
|
||||
public ResponseEntity<RewardEventResponse> getList(
|
||||
@RequestParam Map<String, String> requestParam){
|
||||
|
||||
return ResponseEntity.ok().body(rewardEventService.getList(requestParam));
|
||||
}
|
||||
// 상세 조회
|
||||
@GetMapping("/detail/{id}")
|
||||
public ResponseEntity<RewardEventResponse> getDetail(
|
||||
@PathVariable("id") Long id){
|
||||
|
||||
return ResponseEntity.ok().body(rewardEventService.getDetail(id));
|
||||
}
|
||||
@PostMapping
|
||||
public ResponseEntity<RewardEventResponse> postEvent(
|
||||
@RequestBody RewardEventRequest rewardEventRequest){
|
||||
|
||||
return ResponseEntity.ok().body(rewardEventService.postEvent(rewardEventRequest));
|
||||
}
|
||||
@PutMapping("/{id}")
|
||||
public ResponseEntity<RewardEventResponse> updateEvent(
|
||||
@PathVariable("id")Long id, @RequestBody RewardEventRequest rewardEventRequest){
|
||||
|
||||
return ResponseEntity.ok().body(rewardEventService.updateEvent(id, rewardEventRequest));
|
||||
}
|
||||
@DeleteMapping("/delete")
|
||||
public ResponseEntity<RewardEventResponse> deleteEvent(
|
||||
@RequestBody RewardEventRequest rewardEventRequest){
|
||||
|
||||
return ResponseEntity.ok().body(rewardEventService.deleteEvent(rewardEventRequest));
|
||||
}
|
||||
@PostMapping("/item")
|
||||
public ResponseEntity<RewardEventResponse> getItem(
|
||||
@RequestBody Map<String, String> item) {
|
||||
return ResponseEntity.ok().body(rewardEventService.getMetaItem(item.get("item")));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.caliverse.admin.domain.api;
|
||||
|
||||
import com.caliverse.admin.domain.request.WorldEventRequest;
|
||||
import com.caliverse.admin.domain.response.WorldEventResponse;
|
||||
import com.caliverse.admin.domain.service.WorldEventService;
|
||||
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/world-event")
|
||||
public class WorldEventController {
|
||||
private final WorldEventService worldEventService;
|
||||
|
||||
@GetMapping("/list")
|
||||
public ResponseEntity<WorldEventResponse> getWorldEventList(
|
||||
@RequestParam Map<String, String> requestParam){
|
||||
return ResponseEntity.ok().body( worldEventService.getList(requestParam));
|
||||
}
|
||||
|
||||
@GetMapping("/detail/{id}")
|
||||
public ResponseEntity<WorldEventResponse> getWorldEventDetail(
|
||||
@PathVariable("id") Long id){
|
||||
return ResponseEntity.ok().body( worldEventService.getDetail(id));
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
public ResponseEntity<WorldEventResponse> postWorldEvent(
|
||||
@RequestBody WorldEventRequest worldEventRequest){
|
||||
|
||||
return ResponseEntity.ok().body(worldEventService.postWorldEvent(worldEventRequest));
|
||||
}
|
||||
|
||||
@PutMapping("/{id}")
|
||||
public ResponseEntity<WorldEventResponse> updateWorldEvent(
|
||||
@PathVariable("id")Long id, @RequestBody WorldEventRequest worldEventRequest){
|
||||
|
||||
return ResponseEntity.ok().body(worldEventService.updateWorldEvent(id, worldEventRequest));
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
public ResponseEntity<WorldEventResponse> deleteWorldEvent(
|
||||
@RequestParam Long id){
|
||||
|
||||
return ResponseEntity.ok().body(worldEventService.deleteWorldEvent(id));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.caliverse.admin.domain.dao.admin;
|
||||
|
||||
import com.caliverse.admin.domain.entity.RankingSchedule;
|
||||
import com.caliverse.admin.domain.request.RankRequest;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
public interface RankMapper {
|
||||
|
||||
List<RankingSchedule> getRankingScheduleList(Map map);
|
||||
int getTotal();
|
||||
RankingSchedule getRankingScheduleDetail(Long id);
|
||||
|
||||
int postRankingSchedule(RankRequest rankRequest);
|
||||
int updateRankingSchedule(RankRequest rankRequest);
|
||||
int deleteRankingSchedule(Map map);
|
||||
|
||||
int checkOverlap(RankRequest rankRequest);
|
||||
}
|
||||
@@ -1,30 +1,29 @@
|
||||
package com.caliverse.admin.domain.dao.admin;
|
||||
|
||||
import com.caliverse.admin.domain.entity.Item;
|
||||
import com.caliverse.admin.domain.entity.Event;
|
||||
import com.caliverse.admin.domain.entity.Mail;
|
||||
import com.caliverse.admin.domain.entity.RewardEvent;
|
||||
import com.caliverse.admin.domain.entity.Message;
|
||||
import com.caliverse.admin.domain.request.EventRequest;
|
||||
import com.caliverse.admin.domain.request.RewardEventRequest;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
public interface EventMapper {
|
||||
public interface RewardEventMapper {
|
||||
|
||||
List<Event> getEventList(Map map);
|
||||
List<RewardEvent> getEventList(Map map);
|
||||
int getAllCnt(Map map);
|
||||
int getTotal();
|
||||
Event getEventDetail(Long id);
|
||||
RewardEvent getEventDetail(Long id);
|
||||
|
||||
List<Message> getMessage(Long id);
|
||||
|
||||
List<Item> getItem(Long id);
|
||||
int postEvent(EventRequest mailRequest);
|
||||
int postEvent(RewardEventRequest mailRequest);
|
||||
|
||||
void insertMessage(Map map);
|
||||
void insertItem(Map map);
|
||||
int updateEvent(EventRequest mailRequest);
|
||||
int updateEvent(RewardEventRequest mailRequest);
|
||||
|
||||
int deleteMessage(Map map);
|
||||
|
||||
@@ -35,5 +34,5 @@ public interface EventMapper {
|
||||
int updateStatusEvent(Map map);
|
||||
int updateAddFlag(Long id);
|
||||
|
||||
List<Event> getScheduleEventList();
|
||||
List<RewardEvent> getScheduleEventList();
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.caliverse.admin.domain.dao.admin;
|
||||
|
||||
import com.caliverse.admin.domain.entity.WorldEvent;
|
||||
import com.caliverse.admin.domain.request.WorldEventRequest;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
public interface WorldEventMapper {
|
||||
|
||||
List<WorldEvent> getWorldEventList(Map map);
|
||||
int getTotal();
|
||||
WorldEvent getWorldEventDetail(Long id);
|
||||
|
||||
int postWorldEvent(WorldEventRequest worldEventRequest);
|
||||
int updateWorldEvent(WorldEventRequest worldEventRequest);
|
||||
int deleteWorldEvent(Map map);
|
||||
|
||||
int checkOverlap(WorldEventRequest worldEventRequest);
|
||||
}
|
||||
@@ -5,6 +5,8 @@ import java.util.*;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.caliverse.admin.domain.entity.metaEnum.EJoinInProgressType;
|
||||
import com.caliverse.admin.domain.entity.metaEnum.ETeamAssignmentType;
|
||||
import com.caliverse.admin.domain.entity.metadata.*;
|
||||
import com.caliverse.admin.global.common.exception.MetaDataException;
|
||||
import jakarta.annotation.PostConstruct;
|
||||
@@ -14,6 +16,9 @@ import org.springframework.stereotype.Component;
|
||||
|
||||
import com.caliverse.admin.domain.entity.EMetaData;
|
||||
|
||||
import static com.caliverse.admin.global.common.utils.DataHelper.parseDateTime;
|
||||
import static com.caliverse.admin.global.common.utils.DataHelper.parseFloat;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
public class MetaDataFileLoader {
|
||||
@@ -31,6 +36,17 @@ public class MetaDataFileLoader {
|
||||
private final Map<Integer, MetaBattleConfigData> battleConfigs;
|
||||
private final Map<Integer, MetaBattleRewardData> battleRewards;
|
||||
private final Map<String, MetaSystemMailData> systemMails;
|
||||
private final Map<Integer, MetaGameModeMatchData> gameModeMatches;
|
||||
private final List<MetaBuffData> buffs;
|
||||
private final List<MetaGachaData> gachas;
|
||||
private final List<MetaItemSetData> itemSets;
|
||||
private final List<MetaAttributeRandomGroupData> attributeRandomGroups;
|
||||
private final List<MetaWebLinkData> webLinks;
|
||||
private final List<MetaBrandData> brands;
|
||||
private final List<MetaCraftingData> craftings;
|
||||
private final List<MetaCurrencyData> currencies;
|
||||
private final List<MetaRankingData> rankings;
|
||||
private final List<MetaEventActionScoreData> eventActionScoreDatas;
|
||||
|
||||
public MetaDataFileLoader(JsonFileReader jsonFileReader) {
|
||||
this.jsonFileReader = jsonFileReader;
|
||||
@@ -47,6 +63,17 @@ public class MetaDataFileLoader {
|
||||
this.battleRewards = new ConcurrentHashMap<>();
|
||||
this.systemMails = new ConcurrentHashMap<>();
|
||||
this.gameFFAConfigs = new ConcurrentHashMap<>();
|
||||
this.gameModeMatches = new ConcurrentHashMap<>();
|
||||
this.buffs = new ArrayList<>();
|
||||
this.gachas = new ArrayList<>();
|
||||
this.itemSets = new ArrayList<>();
|
||||
this.attributeRandomGroups = new ArrayList<>();
|
||||
this.webLinks = new ArrayList<>();
|
||||
this.brands = new ArrayList<>();
|
||||
this.craftings = new ArrayList<>();
|
||||
this.currencies = new ArrayList<>();
|
||||
this.rankings = new ArrayList<>();
|
||||
this.eventActionScoreDatas = new ArrayList<>();
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
@@ -80,6 +107,17 @@ public class MetaDataFileLoader {
|
||||
loadSystemMail();
|
||||
loadGameMode();
|
||||
loadGameModeFFAConfig();
|
||||
loadGameModeMatch();
|
||||
loadBuff();
|
||||
loadBrand();
|
||||
loadAttributeRandomGroup();
|
||||
loadGacha();
|
||||
loadItemSet();
|
||||
loadWebLinkLocalize();
|
||||
loadCrafting();
|
||||
loadCurrency();
|
||||
loadRanking();
|
||||
loadEventActionScore();
|
||||
}catch(MetaDataException e){
|
||||
log.error("Failed to initialize metadata", e);
|
||||
throw e;
|
||||
@@ -99,6 +137,10 @@ public class MetaDataFileLoader {
|
||||
return Optional.ofNullable(items.get(itemId));
|
||||
}
|
||||
|
||||
public List<MetaItemData> getMetaItems() {
|
||||
return new ArrayList<>(items.values());
|
||||
}
|
||||
|
||||
//의상 타입 가져오기
|
||||
public Optional<MetaClothTypeData> getMetaClothType(int id) {
|
||||
if(id == 0) return Optional.empty();
|
||||
@@ -145,6 +187,87 @@ public class MetaDataFileLoader {
|
||||
return Optional.ofNullable(lands.get(id));
|
||||
}
|
||||
|
||||
public Optional<MetaGachaData> getMetaGacha(int id) {
|
||||
if(id == 0){
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
return gachas.stream().filter(data -> data.getId() == id).findFirst();
|
||||
}
|
||||
|
||||
public Optional<MetaItemSetData> getMetaItemSet(int id) {
|
||||
if(id == 0){
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
return itemSets.stream().filter(data -> data.getId() == id).findFirst();
|
||||
}
|
||||
|
||||
public Optional<MetaCraftingData> getMetaCrafting(int id) {
|
||||
if(id == 0){
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
return craftings.stream().filter(data -> data.getId() == id).findFirst();
|
||||
}
|
||||
|
||||
public Optional<MetaAttributeRandomGroupData> getMetaAttributeRandomGroup(String groupId) {
|
||||
if(groupId.isEmpty()){
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
return attributeRandomGroups.stream().filter(data -> data.getGroupId().equals(groupId)).findFirst();
|
||||
}
|
||||
|
||||
public Optional<MetaAttributeRandomGroupData> getMetaAttributeRandomGroup(int id) {
|
||||
if(id == 0){
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
return attributeRandomGroups.stream().filter(data -> data.getKey() == id).findFirst();
|
||||
}
|
||||
|
||||
public Optional<MetaBuffData> getMetaBuff(int id) {
|
||||
if(id == 0){
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
return buffs.stream().filter(data -> data.getBuffId() == id).findFirst();
|
||||
}
|
||||
|
||||
public Optional<MetaBrandData> getMetaBrand(int id) {
|
||||
if(id == 0){
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
return brands.stream().filter(data -> data.getId() == id).findFirst();
|
||||
}
|
||||
|
||||
public Optional<MetaWebLinkData> getMetaWebLinkLocalize(String key) {
|
||||
if(key.isEmpty()) {
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
return webLinks.stream().filter(data -> data.getKey().equals(key)).findFirst();
|
||||
}
|
||||
|
||||
public Optional<MetaCurrencyData> getMetaCurrency(int id) {
|
||||
if(id == 0) {
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
return currencies.stream().filter(data -> data.getId() == id).findFirst();
|
||||
}
|
||||
|
||||
public Optional<MetaRankingData> getMetaRanking(int id) {
|
||||
if(id == 0) {
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
return rankings.stream().filter(data -> data.getId() == id).findFirst();
|
||||
}
|
||||
|
||||
//////////////// 리스트 조회
|
||||
public List<MetaLandData> getMetaLands() {
|
||||
return new ArrayList<>(lands.values());
|
||||
}
|
||||
@@ -157,6 +280,10 @@ public class MetaDataFileLoader {
|
||||
return new ArrayList<>(gameFFAConfigs.values());
|
||||
}
|
||||
|
||||
public List<MetaGameModeMatchData> getMetaGameModeMatchs() {
|
||||
return new ArrayList<>(gameModeMatches.values());
|
||||
}
|
||||
|
||||
// 추후 없어질것
|
||||
public List<MetaBattleConfigData> getMetaBattleConfigs() {
|
||||
return new ArrayList<>(battleConfigs.values());
|
||||
@@ -175,8 +302,26 @@ public class MetaDataFileLoader {
|
||||
return new ArrayList<>(systemMails.values());
|
||||
}
|
||||
|
||||
public List<MetaBrandData> getMetaBrand() {
|
||||
return brands;
|
||||
}
|
||||
|
||||
public List<MetaRankingData> getMetaRanking() {
|
||||
return rankings;
|
||||
}
|
||||
|
||||
public List<MetaEventActionScoreData> getMetaEventActionScore() {
|
||||
return eventActionScoreDatas.stream()
|
||||
.collect(Collectors.groupingBy(MetaEventActionScoreData::getGroupId)) // groupId로 그룹화
|
||||
.values().stream()
|
||||
.map(group -> group.get(0))
|
||||
.sorted(Comparator.comparing(MetaEventActionScoreData::getGroupId)) // groupId 기준으로 정렬
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public List<MetaCraftingData> getMetaCrafting() {
|
||||
return craftings;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -213,10 +358,89 @@ public class MetaDataFileLoader {
|
||||
|
||||
metaList.forEach(meta -> {
|
||||
MetaItemData item = new MetaItemData();
|
||||
item.setItemId((Integer)meta.get("item_id"));
|
||||
item.setName((String)meta.get("name"));
|
||||
item.setLargeType((String)meta.get("type_large"));
|
||||
item.setGender((String)meta.get("gender"));
|
||||
|
||||
// 기본 정보
|
||||
item.setItemId((Integer) meta.get("item_id"));
|
||||
item.setName((String) meta.get("name"));
|
||||
item.setDesc((String) meta.get("desc"));
|
||||
item.setGender((String) meta.get("gender"));
|
||||
|
||||
// 이미지 정보
|
||||
item.setImage3dDp((String) meta.get("image_3D_DP"));
|
||||
item.setImage3dDpOpacity((String) meta.get("image_3D_DP_opacity"));
|
||||
item.setImage3d((String) meta.get("image_3D"));
|
||||
item.setImage3dOpacity((String) meta.get("image_3D_opacity"));
|
||||
item.setImage2d((String) meta.get("image_2D"));
|
||||
|
||||
// 출시 정보
|
||||
item.setReleaseDate(parseDateTime(meta.get("release_date")));
|
||||
item.setBrand((Integer) meta.get("Brand"));
|
||||
item.setIsNft((Boolean) meta.get("isNFT"));
|
||||
|
||||
// 타입 정보
|
||||
item.setLargeType((String) meta.get("type_large"));
|
||||
item.setSmallType((String) meta.get("type_small"));
|
||||
item.setRegisterId((Integer) meta.get("register_id"));
|
||||
|
||||
// 수량 정보
|
||||
item.setMaxCount((Integer) meta.get("max_count"));
|
||||
item.setStackMaxCount((Integer) meta.get("stack_max_count"));
|
||||
|
||||
// 만료 정보
|
||||
item.setExpireType((String) meta.get("expire_type"));
|
||||
item.setExpireFixedTermStart(parseDateTime(meta.get("expire_fixedTerm_start")));
|
||||
item.setExpireFixedTermEnd(parseDateTime(meta.get("expire_fixedTerm_end")));
|
||||
item.setExpireTimeSec((Integer) meta.get("expire_time_sec"));
|
||||
|
||||
// 거래 정보
|
||||
item.setIsUserTradable((Boolean) meta.get("is_user_tradable"));
|
||||
item.setIsSystemTradable((Boolean) meta.get("is_system_tradable"));
|
||||
item.setSellPriceType((String) meta.get("sell_price_type"));
|
||||
item.setSellId((Integer) meta.get("sell_id"));
|
||||
item.setSellPrice((Integer) meta.get("sell_price"));
|
||||
|
||||
// UI 관련
|
||||
item.setOrder((Integer) meta.get("order"));
|
||||
item.setIsThrowable((Boolean) meta.get("is_throwable"));
|
||||
|
||||
// 액션 정보
|
||||
item.setActionType((String) meta.get("ActionType"));
|
||||
item.setActionValue((Integer) meta.get("ActionValue"));
|
||||
|
||||
// 디테일 뷰 정보
|
||||
item.setDetailOffset(parseFloat(meta.get("DetailOffset")));
|
||||
item.setDetailScale(parseFloat(meta.get("DetailScale")));
|
||||
item.setGuidePopup((Integer) meta.get("GuidePopup"));
|
||||
item.setDetailRoll(parseFloat(meta.get("DetailRoll")));
|
||||
item.setDetailPitch(parseFloat(meta.get("DetailPitch")));
|
||||
item.setDetailCameraRight(parseFloat(meta.get("DetailCameraRight")));
|
||||
item.setDetailCameraHeight(parseFloat(meta.get("DetailCameraHeight")));
|
||||
item.setDetailCameraAngle(parseFloat(meta.get("DetailCameraAngle")));
|
||||
|
||||
// 속성 정보
|
||||
item.setRarity((String) meta.get("Rarity"));
|
||||
item.setDefaultAttribute((String) meta.get("DefaultAttribute"));
|
||||
item.setAttributeRandomGroupId((String) meta.get("AttributeRandomGroupID"));
|
||||
item.setItemSetId((Integer) meta.get("ItemSetID"));
|
||||
item.setGachaGroupId((Integer) meta.get("GachaGroupId"));
|
||||
|
||||
// 구매 정보
|
||||
item.setBuyPriceType((String) meta.get("Buy_Price_Type"));
|
||||
item.setBuyId((Integer) meta.get("Buy_id"));
|
||||
item.setBuyPrice((Integer) meta.get("Buy_price"));
|
||||
item.setBuffId((Integer) meta.get("buff_id"));
|
||||
item.setProductLink((String) meta.get("ProductLink"));
|
||||
item.setIsCartNBuy((Boolean) meta.get("is_CartNBuy"));
|
||||
item.setBuyDiscountRate((Integer) meta.get("Buy_Discount_Rate"));
|
||||
|
||||
// 기타
|
||||
item.setPropSmallType((String) meta.get("PropSmallType"));
|
||||
item.setUgqAction((String) meta.get("UGQAction"));
|
||||
item.setLinkedLand((Integer) meta.get("LinkedLand"));
|
||||
item.setIsUiOnly((Boolean) meta.get("IsUiOnly"));
|
||||
item.setBeaconShopGoldFee((Integer) meta.get("BeaconShopGoldFee"));
|
||||
item.setIsBeaconShop((Boolean) meta.get("is_BeaconShop"));
|
||||
|
||||
items.put(item.getItemId(), item);
|
||||
});
|
||||
|
||||
@@ -387,6 +611,34 @@ public class MetaDataFileLoader {
|
||||
log.info("loadGameMode {} Load Complete", EMetaData.GAME_MODE_DATA.getFileName());
|
||||
}
|
||||
|
||||
// 게임 모드 매칭 데이터 로드
|
||||
public void loadGameModeMatch(){
|
||||
List<Map<String, Object>> metaList = jsonFileReader.readJsonFile(EMetaData.GAME_MODE_MATCH_DATA.getFileName());
|
||||
if(metaList == null || metaList.isEmpty()) {
|
||||
log.warn("Game Mode Match data is empty or file not found: {}", EMetaData.GAME_MODE_MATCH_DATA.getFileName());
|
||||
return;
|
||||
}
|
||||
|
||||
metaList.forEach(meta -> {
|
||||
MetaGameModeMatchData item = new MetaGameModeMatchData();
|
||||
item.setId((Integer)meta.get("GameModeMatchID"));
|
||||
item.setDesc((String)meta.get("GameModeMatchDescription"));
|
||||
item.setMmrCheck((Boolean)meta.get("MmrCheck"));
|
||||
item.setPartyMatchPlayerCountAbleArray((List<Integer>) meta.get("PartyMatchPlayerCountAbleArray"));
|
||||
item.setMatchWaitTimeSec((Integer)meta.get("MatchWaitTimeSec"));
|
||||
item.setGameModeMmrID((Integer)meta.get("GameModeMmrID"));
|
||||
item.setMatchRetryCount((Integer)meta.get("MatchRetryCount"));
|
||||
item.setMmrExpansionPhase((Integer)meta.get("MmrExpansionPhase"));
|
||||
item.setTeamAssignment(ETeamAssignmentType.valueOf((String)meta.get("TeamAssignment")));
|
||||
item.setJoinInProgress(EJoinInProgressType.valueOf((String)meta.get("JoinInProgress")));
|
||||
item.setJoinInMaxTimeSec((Integer)meta.get("JoinInMaxTimeSec"));
|
||||
item.setEntranceClosingTime((Integer)meta.get("EntranceClosingTime"));
|
||||
gameModeMatches.put((Integer)meta.get("GameModeMatchID"), item);
|
||||
});
|
||||
|
||||
log.info("loadGameModeMatch {} Load Complete", EMetaData.GAME_MODE_DATA.getFileName());
|
||||
}
|
||||
|
||||
// 게임 TPS_FFA 설정 데이터 로드
|
||||
public void loadGameModeFFAConfig(){
|
||||
List<Map<String, Object>> metaList = jsonFileReader.readJsonFile(EMetaData.GAME_MODE_FFA_DATA.getFileName());
|
||||
@@ -501,4 +753,382 @@ public class MetaDataFileLoader {
|
||||
|
||||
log.info("loadSystemMail {} Load Complete", EMetaData.SYSTEM_MAIL_DATA.getFileName());
|
||||
}
|
||||
|
||||
// 웹링크 데이터 로드
|
||||
public void loadWebLinkLocalize(){
|
||||
List<Map<String, Object>> metaList = jsonFileReader.readJsonFile(EMetaData.WEB_LINK_DATA.getFileName());
|
||||
if(metaList == null || metaList.isEmpty()) {
|
||||
log.warn("Web Link Localize data is empty or file not found: {}", EMetaData.WEB_LINK_DATA.getFileName());
|
||||
return;
|
||||
}
|
||||
|
||||
metaList.forEach(meta -> {
|
||||
MetaWebLinkData item = new MetaWebLinkData();
|
||||
|
||||
item.setKey((String) meta.get("Key"));
|
||||
item.setKo((String) meta.get("Ko"));
|
||||
item.setEn((String) meta.get("En"));
|
||||
item.setJa((String) meta.get("Ja"));
|
||||
|
||||
webLinks.add(item);
|
||||
});
|
||||
|
||||
log.info("loadWebLinkLocalize {} Load Complete", EMetaData.WEB_LINK_DATA.getFileName());
|
||||
}
|
||||
|
||||
// 브랜드 데이터 로드
|
||||
public void loadBrand(){
|
||||
List<Map<String, Object>> metaList = jsonFileReader.readJsonFile(EMetaData.BRAND_DATA.getFileName());
|
||||
if(metaList == null || metaList.isEmpty()) {
|
||||
log.warn("Brand data is empty or file not found: {}", EMetaData.BRAND_DATA.getFileName());
|
||||
return;
|
||||
}
|
||||
|
||||
metaList.forEach(meta -> {
|
||||
MetaBrandData item = new MetaBrandData();
|
||||
|
||||
item.setId((Integer) meta.get("ID"));
|
||||
item.setBrandName((String) meta.get("BrandName"));
|
||||
item.setLogoLeft((String) meta.get("LogoLeft"));
|
||||
item.setLogoCenter((String) meta.get("LogoCenter"));
|
||||
item.setLogoRight((String) meta.get("LogoRight"));
|
||||
item.setLogoText((String) meta.get("LogoText"));
|
||||
|
||||
brands.add(item);
|
||||
});
|
||||
|
||||
log.info("loadBrand {} Load Complete", EMetaData.BRAND_DATA.getFileName());
|
||||
}
|
||||
|
||||
// 버프 데이터 로드
|
||||
public void loadBuff(){
|
||||
List<Map<String, Object>> metaList = jsonFileReader.readJsonFile(EMetaData.BUFF_DATA.getFileName());
|
||||
if(metaList == null || metaList.isEmpty()) {
|
||||
log.warn("Buff data is empty or file not found: {}", EMetaData.BUFF_DATA.getFileName());
|
||||
return;
|
||||
}
|
||||
|
||||
metaList.forEach(meta -> {
|
||||
MetaBuffData item = new MetaBuffData();
|
||||
|
||||
item.setBuffId((Integer) meta.get("buff_id"));
|
||||
item.setBuffName((String) meta.get("buff_name"));
|
||||
item.setBuffDescription((String) meta.get("buff_description"));
|
||||
item.setBuffCategory((String) meta.get("buff_category"));
|
||||
item.setBuffChannel((Integer) meta.get("buff_channel"));
|
||||
item.setBuffPriority((Integer) meta.get("buff_priority"));
|
||||
item.setActionBuffId((Integer) meta.get("action_buff_id"));
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Map<String, Object>> traitsData = (List<Map<String, Object>>) meta.get("Traits");
|
||||
if (traitsData != null) {
|
||||
List<MetaBuffData.Trait> traits = new ArrayList<>();
|
||||
traitsData.forEach(traitMap -> {
|
||||
MetaBuffData.Trait trait = new MetaBuffData.Trait();
|
||||
trait.setAttribute((String) traitMap.get("Attribute"));
|
||||
trait.setValue((Integer) traitMap.get("Value"));
|
||||
trait.setOperation((String) traitMap.get("Operation"));
|
||||
traits.add(trait);
|
||||
});
|
||||
item.setTraits(traits);
|
||||
}
|
||||
|
||||
// 프롭 관련
|
||||
item.setPropmeshName((String) meta.get("propmesh_name"));
|
||||
item.setPropmeshNameOpacity((String) meta.get("propmesh_name_opacity"));
|
||||
item.setUseRequired((Integer) meta.get("use_required"));
|
||||
|
||||
// 가이드 관련
|
||||
item.setInactiveRange((Integer) meta.get("InactiveRange"));
|
||||
item.setGuideHeight((Integer) meta.get("GuideHeight"));
|
||||
item.setGuideOffset((Integer) meta.get("GuideOffset"));
|
||||
Number guideScaleValue = (Number) meta.get("GuideScale");
|
||||
item.setGuideScale(guideScaleValue.doubleValue());
|
||||
item.setPropEffect((String) meta.get("prop_effect"));
|
||||
|
||||
// 시작/종료 조건
|
||||
item.setBuffStartCondition((String) meta.get("buff_start_condition"));
|
||||
item.setBuffStartConditionValue((Integer) meta.get("buff_start_condition_value"));
|
||||
item.setBuffEndCondition((String) meta.get("buff_end_condition"));
|
||||
item.setBuffEndConditionValue((Integer) meta.get("buff_end_condition_value"));
|
||||
item.setDurationTime((Integer) meta.get("duration_time"));
|
||||
|
||||
// 실행 관련
|
||||
item.setBuffEndExecutionType((String) meta.get("buff_end_execution_type"));
|
||||
item.setBuffEndExecutionValue((Integer) meta.get("buff_end_execution_value"));
|
||||
|
||||
// 어태치 관련
|
||||
item.setAttachEffectBp((String) meta.get("attach_effect_bp"));
|
||||
item.setAttachAvatarSocket((String) meta.get("attach_avatar_socket"));
|
||||
item.setToolId((Integer) meta.get("tool_id"));
|
||||
|
||||
// 액션/모션 관련
|
||||
item.setBuffActionName((String) meta.get("buff_action_name"));
|
||||
item.setBuffMotionSet((String) meta.get("buff_motion_set"));
|
||||
item.setBuffHandType((String) meta.get("buff_hand_type"));
|
||||
item.setBuffActivateName((String) meta.get("buff_activate_name"));
|
||||
item.setBuffDeactivateName((String) meta.get("buff_deactivate_name"));
|
||||
item.setBuffSwapName((String) meta.get("buff_swap_name"));
|
||||
|
||||
// UI 관련
|
||||
item.setBuffIcon2D((String) meta.get("buff_icon_2D"));
|
||||
item.setBuffActionCooltime((Integer) meta.get("buff_action_cooltime"));
|
||||
item.setUsingAimOffset((String) meta.get("using_aim_offset"));
|
||||
|
||||
// 플래그들
|
||||
item.setUserDetachable((Boolean) meta.get("user_detachable"));
|
||||
item.setNormalRemain((Boolean) meta.get("is_normal_remain"));
|
||||
item.setConcertRemain((Boolean) meta.get("is_concert_remain"));
|
||||
item.setMovieRemain((Boolean) meta.get("is_movie_remain"));
|
||||
item.setMeetingRemain((Boolean) meta.get("is_meeting_remain"));
|
||||
item.setMyhomeRemain((Boolean) meta.get("is_myhome_remain"));
|
||||
item.setBeaconRemain((Boolean) meta.get("is_beacon_remain"));
|
||||
item.setDressroomRemain((Boolean) meta.get("is_dressroom_remain"));
|
||||
|
||||
buffs.add(item);
|
||||
});
|
||||
|
||||
log.info("loadBuff {} Load Complete", EMetaData.BUFF_DATA.getFileName());
|
||||
}
|
||||
|
||||
// 속성랜덤그룹 데이터 로드
|
||||
public void loadAttributeRandomGroup(){
|
||||
List<Map<String, Object>> metaList = jsonFileReader.readJsonFile(EMetaData.ATTRIBUTE_RANDOM_GROUP_DATA.getFileName());
|
||||
if(metaList == null || metaList.isEmpty()) {
|
||||
log.warn("Attribute Random Group data is empty or file not found: {}", EMetaData.ATTRIBUTE_RANDOM_GROUP_DATA.getFileName());
|
||||
return;
|
||||
}
|
||||
|
||||
metaList.forEach(meta -> {
|
||||
MetaAttributeRandomGroupData item = new MetaAttributeRandomGroupData();
|
||||
|
||||
item.setKey((Integer) meta.get("Key"));
|
||||
item.setGroupId((String) meta.get("GroupID"));
|
||||
item.setAttribute((String) meta.get("Attribute"));
|
||||
item.setWeight((Integer) meta.get("Weight"));
|
||||
|
||||
attributeRandomGroups.add(item);
|
||||
});
|
||||
|
||||
log.info("loadAttributeRandomGroup {} Load Complete", EMetaData.ATTRIBUTE_RANDOM_GROUP_DATA.getFileName());
|
||||
}
|
||||
|
||||
// 아이템세트 데이터 로드
|
||||
public void loadItemSet(){
|
||||
List<Map<String, Object>> metaList = jsonFileReader.readJsonFile(EMetaData.ITEM_SET_DATA.getFileName());
|
||||
if(metaList == null || metaList.isEmpty()) {
|
||||
log.warn("Item Set data is empty or file not found: {}", EMetaData.ITEM_SET_DATA.getFileName());
|
||||
return;
|
||||
}
|
||||
|
||||
metaList.forEach(meta -> {
|
||||
MetaItemSetData item = new MetaItemSetData();
|
||||
|
||||
item.setId((Integer) meta.get("ID"));
|
||||
item.setName((String) meta.get("Name"));
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
List<String> itemsData = (List<String>) meta.get("Items");
|
||||
item.setItems(itemsData);
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Map<String, Object>> setEffectsData = (List<Map<String, Object>>) meta.get("SetEfffects");
|
||||
if (setEffectsData != null) {
|
||||
List<MetaItemSetData.SetEffect> setEffects = new ArrayList<>();
|
||||
setEffectsData.forEach(effectMap -> {
|
||||
MetaItemSetData.SetEffect setEffect = new MetaItemSetData.SetEffect();
|
||||
setEffect.setRequirementCount((Integer) effectMap.get("RequirementCount"));
|
||||
setEffect.setAttributeName((String) effectMap.get("AttributeName"));
|
||||
setEffect.setAttributeValue((Integer) effectMap.get("AttributeValue"));
|
||||
setEffects.add(setEffect);
|
||||
});
|
||||
item.setSetEffects(setEffects);
|
||||
}
|
||||
|
||||
itemSets.add(item);
|
||||
});
|
||||
|
||||
log.info("loadItemSet {} Load Complete", EMetaData.ITEM_SET_DATA.getFileName());
|
||||
}
|
||||
|
||||
// 랜덤박스 데이터 로드
|
||||
public void loadGacha(){
|
||||
List<Map<String, Object>> metaList = jsonFileReader.readJsonFile(EMetaData.GACHA_DATA.getFileName());
|
||||
if(metaList == null || metaList.isEmpty()) {
|
||||
log.warn("Gacha data is empty or file not found: {}", EMetaData.GACHA_DATA.getFileName());
|
||||
return;
|
||||
}
|
||||
|
||||
metaList.forEach(meta -> {
|
||||
MetaGachaData item = new MetaGachaData();
|
||||
|
||||
item.setId((Integer) meta.get("Id"));
|
||||
item.setGroupId((Integer) meta.get("GroupId"));
|
||||
item.setWeight((Integer) meta.get("Weight"));
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, Object> rewardData = (Map<String, Object>) meta.get("Reward");
|
||||
if (rewardData != null) {
|
||||
MetaGachaData.Reward reward = new MetaGachaData.Reward();
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, Object> currencyData = (Map<String, Object>) rewardData.get("Currency");
|
||||
if (currencyData != null) {
|
||||
MetaGachaData.Currency currency = new MetaGachaData.Currency();
|
||||
currency.setId((Integer) currencyData.get("Id"));
|
||||
currency.setValue(((Number) currencyData.get("Value")).doubleValue());
|
||||
reward.setCurrency(currency);
|
||||
}
|
||||
|
||||
item.setReward(reward);
|
||||
}
|
||||
|
||||
gachas.add(item);
|
||||
});
|
||||
|
||||
log.info("loadGacha {} Load Complete", EMetaData.GACHA_DATA.getFileName());
|
||||
}
|
||||
|
||||
// 제작 데이터 로드
|
||||
public void loadCrafting(){
|
||||
List<Map<String, Object>> metaList = jsonFileReader.readJsonFile(EMetaData.CRAFTING_DATA.getFileName());
|
||||
if(metaList == null || metaList.isEmpty()) {
|
||||
log.warn("Crafting data is empty or file not found: {}", EMetaData.CRAFTING_DATA.getFileName());
|
||||
return;
|
||||
}
|
||||
|
||||
metaList.forEach(meta -> {
|
||||
MetaCraftingData item = new MetaCraftingData();
|
||||
|
||||
// 기본 정보
|
||||
item.setId((Integer) meta.get("Id"));
|
||||
item.setPropSmallType((String) meta.get("PropSmallType"));
|
||||
item.setCraftingItemId((Integer) meta.get("Crafting_ItemId"));
|
||||
item.setCraftingItemValue((Integer) meta.get("Crafting_ItemValue"));
|
||||
item.setRecipeType((String) meta.get("RecipeType"));
|
||||
item.setRecipeItemId((Integer) meta.get("Recipe_ItemId"));
|
||||
|
||||
// Material 배열 처리
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Map<String, Object>> materialData = (List<Map<String, Object>>) meta.get("Material");
|
||||
if (materialData != null) {
|
||||
List<MetaCraftingData.Material> materials = new ArrayList<>();
|
||||
materialData.forEach(materialMap -> {
|
||||
MetaCraftingData.Material material = new MetaCraftingData.Material();
|
||||
material.setItemId((Integer) materialMap.get("ItemId"));
|
||||
material.setItemValue((Integer) materialMap.get("ItemValue"));
|
||||
materials.add(material);
|
||||
});
|
||||
item.setMaterials(materials);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Map<String, Object>> attributeData = (List<Map<String, Object>>) meta.get("Attribute");
|
||||
if (attributeData != null) {
|
||||
List<MetaCraftingData.Attribute> attributes = new ArrayList<>();
|
||||
attributeData.forEach(attributeMap -> {
|
||||
MetaCraftingData.Attribute attribute = new MetaCraftingData.Attribute();
|
||||
attribute.setAttributeName((String) attributeMap.get("AttributeName"));
|
||||
attribute.setAttributeValue((Integer) attributeMap.get("AttributeValue"));
|
||||
attributes.add(attribute);
|
||||
});
|
||||
item.setAttributes(attributes);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Integer> propData = (List<Integer>) meta.get("Prop");
|
||||
item.setProps(propData);
|
||||
|
||||
// 시간 및 제한 정보
|
||||
item.setCraftingTime((Integer) meta.get("CraftingTime"));
|
||||
item.setBeaconReduceTime((Integer) meta.get("Beacon_ReduceTime"));
|
||||
item.setBeaconBonusItemId((Integer) meta.get("Beacon_BonusItemId"));
|
||||
item.setMaxCraftLimit((Integer) meta.get("max_craft_limit"));
|
||||
|
||||
craftings.add(item);
|
||||
});
|
||||
|
||||
log.info("loadCrafting {} Load Complete", EMetaData.CRAFTING_DATA.getFileName());
|
||||
}
|
||||
|
||||
// 랜덤박스 데이터 로드
|
||||
public void loadCurrency(){
|
||||
List<Map<String, Object>> metaList = jsonFileReader.readJsonFile(EMetaData.CURRENCY_DATA.getFileName());
|
||||
if(metaList == null || metaList.isEmpty()) {
|
||||
log.warn("Currency data is empty or file not found: {}", EMetaData.CURRENCY_DATA.getFileName());
|
||||
return;
|
||||
}
|
||||
|
||||
metaList.forEach(meta -> {
|
||||
MetaCurrencyData item = new MetaCurrencyData();
|
||||
|
||||
item.setId((Integer) meta.get("Id"));
|
||||
item.setCurrencyType((String) meta.get("CurrencyType"));
|
||||
item.setName((String) meta.get("Name"));
|
||||
item.setDescription((String) meta.get("Description"));
|
||||
item.setMaxCount((Integer) meta.get("MaxCount"));
|
||||
item.setIconPath((String) meta.get("IconPath"));
|
||||
item.setItemId((Integer) meta.get("ItemID"));
|
||||
|
||||
currencies.add(item);
|
||||
});
|
||||
|
||||
log.info("loadCurrency {} Load Complete", EMetaData.CURRENCY_DATA.getFileName());
|
||||
}
|
||||
|
||||
// 랜덤박스 데이터 로드
|
||||
public void loadRanking(){
|
||||
List<Map<String, Object>> metaList = jsonFileReader.readJsonFile(EMetaData.RANKING_DATA.getFileName());
|
||||
if(metaList == null || metaList.isEmpty()) {
|
||||
log.warn("Ranking data is empty or file not found: {}", EMetaData.RANKING_DATA.getFileName());
|
||||
return;
|
||||
}
|
||||
|
||||
metaList.forEach(meta -> {
|
||||
MetaRankingData item = new MetaRankingData();
|
||||
|
||||
item.setId((Integer) meta.get("RankingId"));
|
||||
item.setDesc((String) meta.get("desc_"));
|
||||
item.setRankingType((String) meta.get("RankingType"));
|
||||
item.setTypeId((Integer) meta.get("TypeId"));
|
||||
item.setTypeValue((Integer) meta.get("TypeValue"));
|
||||
item.setEventType((String) meta.get("EventType"));
|
||||
item.setSortType((String) meta.get("SortType"));
|
||||
item.setScoreType((String) meta.get("ScoreType"));
|
||||
item.setScoreModifyType((String) meta.get("ScoreModifyType"));
|
||||
|
||||
rankings.add(item);
|
||||
});
|
||||
|
||||
log.info("loadRanking {} Load Complete", EMetaData.RANKING_DATA.getFileName());
|
||||
}
|
||||
|
||||
//이벤트 스코어
|
||||
public void loadEventActionScore(){
|
||||
List<Map<String, Object>> metaList = jsonFileReader.readJsonFile(EMetaData.EVENT_ACTION_SCORE_DATA.getFileName());
|
||||
if(metaList == null || metaList.isEmpty()) {
|
||||
log.warn("Event Action Score data is empty or file not found: {}", EMetaData.EVENT_ACTION_SCORE_DATA.getFileName());
|
||||
return;
|
||||
}
|
||||
|
||||
metaList.forEach(meta -> {
|
||||
MetaEventActionScoreData item = new MetaEventActionScoreData();
|
||||
|
||||
item.setId((Integer) meta.get("Index"));
|
||||
item.setDescription((String) meta.get("desc_"));
|
||||
item.setGroupId((Integer) meta.get("GroupId"));
|
||||
item.setEventTarget((String) meta.get("EventTarget"));
|
||||
item.setEvent((String) meta.get("Event"));
|
||||
item.setEventCondition1((String) meta.get("EventCondition1"));
|
||||
item.setEventCondition2((String) meta.get("EventCondition2"));
|
||||
item.setEventCondition3((String) meta.get("EventCondition3"));
|
||||
item.setScore((Integer) meta.get("Score"));
|
||||
item.setScoreModifyType((String) meta.get("ScoreModifyType"));
|
||||
item.setActive((Boolean) meta.get("Active"));
|
||||
|
||||
eventActionScoreDatas.add(item);
|
||||
});
|
||||
|
||||
log.info("loadEventActionScore {} Load Complete", EMetaData.EVENT_ACTION_SCORE_DATA.getFileName());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,361 +0,0 @@
|
||||
package com.caliverse.admin.domain.datacomponent;
|
||||
|
||||
|
||||
import com.caliverse.admin.domain.entity.EMetaData;
|
||||
import com.caliverse.admin.domain.entity.metadata.*;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.JsonMappingException;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Component
|
||||
@Getter
|
||||
@Slf4j
|
||||
public class MetaDataFileLoader_old {
|
||||
@Value("${caliverse.metadata.path}")
|
||||
private String metaDataPath;
|
||||
|
||||
// private Map<Integer, MetaItemData> items;
|
||||
// private Map<String, MetaTextStringData> textStrings;
|
||||
// private Map<Integer, MetaClothTypeData> clothTypes;
|
||||
// private Map<Integer, MetaToolData> toolItems;
|
||||
// private Map<Integer, String> banWords;
|
||||
// private Map<MetaQuestKey, MetaQuestData> quests;
|
||||
// private Map<Integer, MetaBuildingData> buildings;
|
||||
// private Map<Integer, MetaLandData> lands;
|
||||
//
|
||||
// public MetaTextStringData getName(String text){
|
||||
// if(textStrings == null) parseMetaString();
|
||||
// if(text == null) return null;
|
||||
//
|
||||
// MetaTextStringData name = textStrings.get(text);
|
||||
//
|
||||
// return name;
|
||||
// }
|
||||
//
|
||||
// //아이템 가져오기
|
||||
// public MetaItemData getMetaItem(int itemId) {
|
||||
// if(textStrings == null) parseMetaString();
|
||||
// if(items == null){
|
||||
// parseMetaItems();
|
||||
// }
|
||||
// if(itemId == 0) return null;
|
||||
//
|
||||
// MetaItemData itemData = items.get(itemId);
|
||||
//
|
||||
// return itemData;
|
||||
// }
|
||||
//
|
||||
// //의상 타입 가져오기
|
||||
// public MetaClothTypeData getMetaClothType(int id) {
|
||||
// if(clothTypes == null ){
|
||||
// parseMetaClothTypes();
|
||||
// }
|
||||
// if(id == 0) return null;
|
||||
//
|
||||
// return clothTypes.get(id);
|
||||
// }
|
||||
//
|
||||
// //도구 정보 가져오기
|
||||
// public MetaToolData getMetaToolItem(int id) {
|
||||
// if(textStrings == null) parseMetaString();
|
||||
// if(toolItems == null ){
|
||||
// parseMetaToolItems();
|
||||
// }
|
||||
// if(id == 0){
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// return toolItems.get(id);
|
||||
// }
|
||||
//
|
||||
// //퀘스트 정보 가져오기
|
||||
// public List<MetaQuestData> getMetaQuests(int id) {
|
||||
// if(textStrings == null) parseMetaString();
|
||||
// if(quests == null ) parseMetaQuests();
|
||||
// if(id == 0) return null;
|
||||
//
|
||||
// List<MetaQuestData> quest = new ArrayList<>();
|
||||
// quests.forEach((key,val)->{
|
||||
// if(key.getQeustId().equals(id)) quest.add(val);
|
||||
// });
|
||||
//
|
||||
// return quest;
|
||||
// }
|
||||
//
|
||||
// //빌딩 정보 가져오기
|
||||
// public MetaBuildingData getMetaBuildingItem(int id) {
|
||||
// if(textStrings == null) parseMetaString();
|
||||
// if(buildings == null ){
|
||||
// parseMetaBuilding();
|
||||
// }
|
||||
// if(id == 0){
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// return buildings.get(id);
|
||||
// }
|
||||
//
|
||||
// //랜드 정보 가져오기
|
||||
// public MetaLandData getMetaLandItem(int id) {
|
||||
// if(textStrings == null) parseMetaString();
|
||||
// if(lands == null ){
|
||||
// parseMetaLand();
|
||||
// }
|
||||
// if(id == 0){
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// return lands.get(id);
|
||||
// }
|
||||
//
|
||||
// // 아이템 정보 데이터 저장
|
||||
// public void parseMetaItems(){
|
||||
// items = new HashMap<>();
|
||||
//
|
||||
// List<Map<String, Object>> itemInfos = loadDataFromJsonFile(EMetaData.ITEM_DATA.getFileName(), "ItemMetaDataList");
|
||||
//
|
||||
// for (Map<String, Object> itemInfo : itemInfos) {
|
||||
// MetaItemData item = new MetaItemData();
|
||||
// item.setItemId((Integer)itemInfo.get("item_id"));
|
||||
// item.setName((String)itemInfo.get("name"));
|
||||
// item.setLargeType((String)itemInfo.get("type_large"));
|
||||
// item.setGender((String)itemInfo.get("gender"));
|
||||
// items.put(item.getItemId(), item);
|
||||
// }
|
||||
//
|
||||
// log.info("parseMetaItems ItemMetaDataList.json Load Complete");
|
||||
//
|
||||
// }
|
||||
//
|
||||
// // 의상 타입 데이터 저장
|
||||
// public void parseMetaClothTypes(){
|
||||
// clothTypes = new HashMap<>();
|
||||
//
|
||||
// List<Map<String, Object>> itemInfos = loadDataFromJsonFile(EMetaData.CLOTH_TYPE_DATA.getFileName(), "ClothEquipTypeDataList");
|
||||
//
|
||||
// for (Map<String, Object> itemInfo : itemInfos) {
|
||||
// MetaClothTypeData item = new MetaClothTypeData();
|
||||
// item.setMetaId((Integer)itemInfo.get("Meta_id"));
|
||||
// item.setSmallType((String)itemInfo.get("SmallType"));
|
||||
// item.setEquipSlotType((String)itemInfo.get("EquipSlotType"));
|
||||
// clothTypes.put(item.getMetaId(), item);
|
||||
// }
|
||||
// log.info("parseMetaClothTypes ClothEquipTypeDataList.json Load Complete");
|
||||
// }
|
||||
//
|
||||
// // 도구 정보 데이터 저장
|
||||
// public void parseMetaToolItems(){
|
||||
// toolItems = new HashMap<>();
|
||||
//
|
||||
// List<Map<String, Object>> itemInfos = loadDataFromJsonFile(EMetaData.TOOL_DATA.getFileName(), "ToolMetaDataList");
|
||||
//
|
||||
// for (Map<String, Object> itemInfo : itemInfos) {
|
||||
// MetaToolData item = new MetaToolData();
|
||||
// item.setToolId((Integer)itemInfo.get("tool_id"));
|
||||
// item.setToolName((String)itemInfo.get("tool_name"));
|
||||
// toolItems.put(item.getToolId(), item);
|
||||
// }
|
||||
// log.info("parseMetaToolItems ToolMetaDataList.json Load Complete");
|
||||
// }
|
||||
//
|
||||
// // 금지어 데이터 저장
|
||||
// public void parseMetaBanWord(){
|
||||
// banWords = new HashMap<>();
|
||||
//
|
||||
// List<Map<String, Object>> itemInfos = loadDataFromJsonFile(EMetaData.BAN_WORD_DATA.getFileName(), "BanWordMetaDataList");
|
||||
//
|
||||
// for (Map<String, Object> itemInfo : itemInfos) {
|
||||
// banWords.put((Integer)itemInfo.get("Id"), (String)itemInfo.get("Ban_Word"));
|
||||
// }
|
||||
// log.info("parseMetaBanWord BanWordMetaDataList.json Load Complete");
|
||||
// }
|
||||
//
|
||||
// // String 데이터 저장
|
||||
// public void parseMetaString(){
|
||||
// textStrings = new HashMap<>();
|
||||
//
|
||||
// List<Map<String, Object>> itemInfos = loadDataFromJsonFile(EMetaData.TEXT_STRING_DATA.getFileName(), "TextStringMetaDataList");
|
||||
//
|
||||
// for (Map<String, Object> itemInfo : itemInfos) {
|
||||
// MetaTextStringData item = new MetaTextStringData();
|
||||
// item.setKey((String)itemInfo.get("Key"));
|
||||
// item.setKor((String)itemInfo.get("SourceString"));
|
||||
// item.setEn((String)itemInfo.get("en"));
|
||||
// textStrings.put((String)itemInfo.get("Key"), item);
|
||||
// }
|
||||
// log.info("parseMetaString TextStringMetaDataList.json Load Complete");
|
||||
// }
|
||||
//
|
||||
// // 퀘스트 데이터 저장
|
||||
// public void parseMetaQuests(){
|
||||
// quests = new HashMap<>();
|
||||
//
|
||||
// List<Map<String, Object>> itemInfos = loadDataFromJsonFile(EMetaData.QUEST_DATA.getFileName(), "QuestMetaDataList");
|
||||
//
|
||||
// for (Map<String, Object> itemInfo : itemInfos) {
|
||||
// MetaQuestData item = new MetaQuestData();
|
||||
// Integer questId = (Integer)itemInfo.get("QuestID");
|
||||
// Integer taskNum = (Integer)itemInfo.get("TaskNum");
|
||||
// item.setQuestId(questId);
|
||||
// item.setTaskNum(taskNum);
|
||||
// item.setTaskName((String)itemInfo.get("TaskName"));
|
||||
// item.setCounter((Integer) itemInfo.get("SetCounter"));
|
||||
// quests.put(new MetaQuestKey(questId, taskNum), item);
|
||||
// }
|
||||
// log.info("parseMetaQuests QuestMetaDataList.json Load Complete");
|
||||
// }
|
||||
//
|
||||
// // 빌딩 데이터 저장
|
||||
// public void parseMetaBuilding(){
|
||||
// buildings = new HashMap<>();
|
||||
//
|
||||
// List<Map<String, Object>> buildingInfos = loadDataFromJsonFile(EMetaData.BUILDING_DATA.getFileName(), "BuildingMetaDataList");
|
||||
//
|
||||
// for (Map<String, Object> itemInfo : buildingInfos) {
|
||||
// MetaBuildingData item = new MetaBuildingData();
|
||||
// item.setBuildingId((Integer)itemInfo.get("BuildingId"));
|
||||
// item.setBuildingOpen((Boolean)itemInfo.get("BuildingOpen"));
|
||||
// item.setOwner((String)itemInfo.get("Owner"));
|
||||
// item.setBuildingName((String)itemInfo.get("BuildingName"));
|
||||
// item.setBuildingDesc((String)itemInfo.get("BuildingDesc"));
|
||||
// item.setBuildingSize((String)itemInfo.get("BuildingSize"));
|
||||
// item.setInstanceSocket((Integer)itemInfo.get("InstanceSocket"));
|
||||
// item.setInstanceSocketLink((Integer)itemInfo.get("InstanceSocketLink"));
|
||||
// buildings.put((Integer)itemInfo.get("BuildingId"), item);
|
||||
// }
|
||||
// log.info("parseMetaBuilding BuildingMetaDataList.json Load Complete");
|
||||
// }
|
||||
//
|
||||
// // 랜드 데이터 저장
|
||||
// public void parseMetaLand(){
|
||||
// lands = new HashMap<>();
|
||||
//
|
||||
// List<Map<String, Object>> landInfos = loadDataFromJsonFile(EMetaData.LAND_DATA.getFileName(), "LandMetaDataList");
|
||||
//
|
||||
// for (Map<String, Object> itemInfo : landInfos) {
|
||||
// MetaLandData item = new MetaLandData();
|
||||
// item.setLandId((Integer)itemInfo.get("LandId"));
|
||||
// item.setOwner((String)itemInfo.get("Owner"));
|
||||
// item.setLandName((String)itemInfo.get("LandName"));
|
||||
// item.setLandDesc((String)itemInfo.get("LandDesc"));
|
||||
// item.setLandSize((String)itemInfo.get("LandSize"));
|
||||
// item.setLandType((String)itemInfo.get("LandType"));
|
||||
// item.setBuildingSocket((Integer)itemInfo.get("BuildingSocket"));
|
||||
// lands.put((Integer)itemInfo.get("LandId"), item);
|
||||
// }
|
||||
// log.info("parseMetaLand LandMetaDataList.json Load Complete");
|
||||
// }
|
||||
//
|
||||
// // resource json 파일 정보 읽어오기(resource)
|
||||
//// public List<Map<String, Object>> loadDataFromJsonFile(String fileName, String listName) {
|
||||
//// List<Map<String, Object>> resultMap = new ArrayList<>();
|
||||
////
|
||||
//// URL resourceUrl = getClass().getClassLoader().getResource("metadata/" + fileName);
|
||||
//// log.info("loadDataFromJsonFile path: {}", resourceUrl.getPath());
|
||||
////
|
||||
//// try (InputStream inputStream = resourceUrl.openStream()) {
|
||||
//// if (inputStream != null) {
|
||||
//// boolean isRequired = EMetaData.getIsRequired(fileName);
|
||||
//// if (isRequired) {
|
||||
//// String str = new String(inputStream.readAllBytes(), StandardCharsets.UTF_8);
|
||||
//// ObjectMapper objectMapper = new ObjectMapper();
|
||||
//// try {
|
||||
//// JsonNode rootNode = objectMapper.readTree(str);
|
||||
////
|
||||
//// resultMap = objectMapper.readValue(rootNode.get(listName).toString(), new TypeReference<List<Map<String, Object>>>() {});
|
||||
//// } catch (JsonMappingException e) {
|
||||
//// log.error("loadDataFromJsonFile JsonMappingException: {}", e.getMessage());
|
||||
//// } catch (JsonProcessingException e) {
|
||||
//// log.error("loadDataFromJsonFile JsonProcessingException: {}", e.getMessage());
|
||||
//// }
|
||||
//// }
|
||||
//// } else {
|
||||
//// log.error("Resource not found: {}", fileName);
|
||||
//// }
|
||||
//// } catch (IOException e) {
|
||||
//// log.error("loadDataFromJsonFile IOException: {}", e.getMessage());
|
||||
//// }
|
||||
////
|
||||
//// return resultMap;
|
||||
//// }
|
||||
// // json 파일 정보 읽어오기
|
||||
// public List<Map<String, Object>> loadDataFromJsonFile(String fileName, String listName) {
|
||||
// List<Map<String, Object>> resultMap = new ArrayList<>();
|
||||
//
|
||||
// File file = new File(metaDataPath, fileName);
|
||||
// log.info("loadDataFromJsonFile path: {}", file.getPath());
|
||||
// if (file.isFile()) {
|
||||
// boolean isRequired = EMetaData.getIsRequired(fileName);
|
||||
// if (isRequired) {
|
||||
// String str = readFileAsString(file);
|
||||
// ObjectMapper objectMapper = new ObjectMapper();
|
||||
// try {
|
||||
// JsonNode rootNode = objectMapper.readTree(str);
|
||||
//
|
||||
// resultMap = objectMapper.readValue(rootNode.get(listName).toString(), new TypeReference<List<Map<String, Object>>>() {});
|
||||
// } catch (JsonMappingException e) {
|
||||
// log.error("loadDataFromJsonFile JsonMappingException: {}", e.getMessage());
|
||||
// } catch (JsonProcessingException e) {
|
||||
// log.error("loadDataFromJsonFile JsonProcessingException: {}", e.getMessage());
|
||||
// }
|
||||
// finally {
|
||||
// file = null;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return resultMap;
|
||||
// }
|
||||
//// public List<Map<String, Object>> loadDataFromJsonFile(String fileName, String listName) {
|
||||
//// List<Map<String, Object>> resultMap = new ArrayList<>();
|
||||
//// File file = new File(getClass().getClassLoader().getResource("metadata").getPath(), fileName);
|
||||
////// File file = new File(metaDataPath, fileName);
|
||||
//// if (file.isFile()) {
|
||||
//// boolean isRequired = EMetaData.getIsRequired(fileName);
|
||||
//// if (isRequired) {
|
||||
////
|
||||
//// String str = readFileAsString(file);
|
||||
//// ObjectMapper objectMapper = new ObjectMapper();
|
||||
//// try {
|
||||
//// // Parse the JSON object
|
||||
//// JsonNode rootNode = objectMapper.readTree(str);
|
||||
////
|
||||
////// jsonMap = objectMapper.readValue(str, new TypeReference<Map<String, Object>>() {});
|
||||
//// resultMap = objectMapper.readValue(rootNode.get(listName).toString(), new TypeReference<List<Map<String, Object>>>() {});
|
||||
//// } catch (JsonMappingException e) {
|
||||
//// e.printStackTrace();
|
||||
//// } catch (JsonProcessingException e) {
|
||||
//// e.printStackTrace();
|
||||
//// }
|
||||
//// finally {
|
||||
//// file = null;
|
||||
//// }
|
||||
//// }
|
||||
//// }
|
||||
//// return resultMap;
|
||||
//// }
|
||||
//
|
||||
// private String readFileAsString(File file) {
|
||||
// StringBuilder fileContents = new StringBuilder((int)file.length());
|
||||
// try (BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(file), "UTF-8"))) {
|
||||
// String line;
|
||||
// while((line = br.readLine()) != null) {
|
||||
// fileContents.append(line);
|
||||
// }
|
||||
// } catch (IOException e) {
|
||||
// log.error("readFileAsString IOException: {}", e.getMessage());
|
||||
// }
|
||||
// return fileContents.toString();
|
||||
// }
|
||||
}
|
||||
@@ -1,12 +1,11 @@
|
||||
package com.caliverse.admin.domain.datacomponent;
|
||||
import com.caliverse.admin.domain.entity.LANGUAGETYPE;
|
||||
import com.caliverse.admin.domain.entity.metadata.*;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
@@ -25,6 +24,12 @@ public class MetaDataHandler {
|
||||
.orElse("");
|
||||
}
|
||||
|
||||
public String getTextStringData(String text, LANGUAGETYPE lang) {
|
||||
return metadataFileLoader.getName(text)
|
||||
.map(data -> lang.equals(LANGUAGETYPE.JA) ? data.getJa() : lang.equals(LANGUAGETYPE.EN) ? data.getEn() : data.getKor())
|
||||
.orElse("");
|
||||
}
|
||||
|
||||
public String getMetaItemNameData(int itemId) {
|
||||
return metadataFileLoader.getMetaItem(itemId)
|
||||
.map(MetaItemData::getName)
|
||||
@@ -63,6 +68,50 @@ public class MetaDataHandler {
|
||||
.orElse(null);
|
||||
}
|
||||
|
||||
public String getMetaWebLinkData(String key, LANGUAGETYPE lang) {
|
||||
return metadataFileLoader.getMetaWebLinkLocalize(key)
|
||||
.map(data -> lang.equals(LANGUAGETYPE.EN) ? data.getEn() : lang.equals(LANGUAGETYPE.JA) ? data.getJa() : data.getKo())
|
||||
.orElse("");
|
||||
}
|
||||
|
||||
public String getMetaBuffName(int metaId){
|
||||
return metadataFileLoader.getMetaBuff(metaId)
|
||||
.map(MetaBuffData::getBuffName)
|
||||
.orElse("");
|
||||
}
|
||||
|
||||
public String getMetaAttribData(String groupId){
|
||||
return metadataFileLoader.getMetaAttributeRandomGroup(groupId)
|
||||
.map(MetaAttributeRandomGroupData::getAttribute)
|
||||
.orElse("");
|
||||
}
|
||||
|
||||
public String getMetaItemSetName(int metaId){
|
||||
return metadataFileLoader.getMetaItemSet(metaId)
|
||||
.map(MetaItemSetData::getName)
|
||||
.orElse("");
|
||||
}
|
||||
|
||||
public Integer getMetaGachaGroupId(int metaId){
|
||||
return metadataFileLoader.getMetaGacha(metaId)
|
||||
.map(MetaGachaData::getGroupId)
|
||||
.orElse(0);
|
||||
}
|
||||
|
||||
public String getMetaBrandName(int metaId){
|
||||
return metadataFileLoader.getMetaBrand(metaId)
|
||||
.map(MetaBrandData::getBrandName)
|
||||
.orElse("");
|
||||
}
|
||||
|
||||
public String getMetaCurrencyName(int metaId){
|
||||
return metadataFileLoader.getMetaCurrency(metaId)
|
||||
.map(MetaCurrencyData::getName)
|
||||
.orElse("");
|
||||
}
|
||||
|
||||
//전체 리스트
|
||||
|
||||
public List<MetaBuildingData> getMetaBuildingListData() {
|
||||
return metadataFileLoader.getMetaBuildings();
|
||||
}
|
||||
@@ -83,6 +132,10 @@ public class MetaDataHandler {
|
||||
return metadataFileLoader.getMetaGameModes();
|
||||
}
|
||||
|
||||
public List<MetaGameModeMatchData> getMetaGameModeMatchListData() {
|
||||
return metadataFileLoader.getMetaGameModeMatchs();
|
||||
}
|
||||
|
||||
public List<MetaGameFFAConfigData> getMetaGameFFAConfigListData() {
|
||||
return metadataFileLoader.getMetaGameFFAConfigs();
|
||||
}
|
||||
@@ -90,5 +143,21 @@ public class MetaDataHandler {
|
||||
public List<MetaSystemMailData> getMetaSystemMailListData() {
|
||||
return metadataFileLoader.getMetaSystemMail();
|
||||
}
|
||||
public List<MetaItemData> getMetaItemListData() {
|
||||
return metadataFileLoader.getMetaItems();
|
||||
}
|
||||
public List<MetaBrandData> getMetaBrandListData() {
|
||||
return metadataFileLoader.getMetaBrand();
|
||||
}
|
||||
public List<MetaRankingData> getMetaRankingListData() {
|
||||
return metadataFileLoader.getMetaRanking();
|
||||
}
|
||||
public List<MetaEventActionScoreData> getMetaEventActionScoreListData() {
|
||||
return metadataFileLoader.getMetaEventActionScore();
|
||||
}
|
||||
public List<MetaCraftingData> getMetaCraftingListData() {
|
||||
return metadataFileLoader.getMetaCrafting();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
package com.caliverse.admin.domain.datacomponent;
|
||||
import com.caliverse.admin.domain.entity.metadata.MetaClothTypeData;
|
||||
import com.caliverse.admin.domain.entity.metadata.MetaItemData;
|
||||
import com.caliverse.admin.domain.entity.metadata.MetaQuestData;
|
||||
import com.caliverse.admin.domain.entity.metadata.MetaTextStringData;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.cache.annotation.EnableCaching;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
@EnableCaching(proxyTargetClass = true)
|
||||
public class MetaDataHandler_bak {
|
||||
|
||||
@Autowired private MetaDataFileLoader metadataFileLoader;
|
||||
|
||||
/**
|
||||
* text에 대한 명칭 정보 캐싱
|
||||
* @param text
|
||||
* @return 명칭(String)
|
||||
*/
|
||||
// @Cacheable(cacheNames = "admintool:metaTextStringData", key = "#p0")
|
||||
// public String getTextStringData(String text) {
|
||||
// log.info("getTextStringData text: {}", text);
|
||||
// MetaTextStringData data = metadataFileLoader.getName(text);
|
||||
// log.info("getTextStringData data: {}", data);
|
||||
// return data == null ? "" : data.getKor();
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 아이템에 대한 이름 정보 캐싱
|
||||
// * @param itemId
|
||||
// * @return 아이템 명칭(String)
|
||||
// */
|
||||
// @Cacheable(cacheNames = "admintool:metaItemNameData", key = "#p0", unless = "#result == null")
|
||||
// public String getMetaItemNameData(int itemId) {
|
||||
// MetaItemData item = metadataFileLoader.getMetaItem(itemId);
|
||||
// log.info("getMetaItemNameData data: {}", item);
|
||||
// return item == null ? "" : item.getName();
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 아이템에 대한 타입 정보 캐싱
|
||||
// * @param itemId
|
||||
// * @return 아이템 타입(String)
|
||||
// */
|
||||
// @Cacheable(cacheNames = "admintool:metaItemLargeTypeData", key = "#p0", unless = "#result == null")
|
||||
// public String getMetaItemLargeTypeData(int itemId) {
|
||||
// MetaItemData item = metadataFileLoader.getMetaItem(itemId);
|
||||
// return item == null ? "" : item.getLargeType();
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 의상 슬롯타입 정보 캐싱
|
||||
// * @param metaId
|
||||
// * @return 의상 슬롯타입(String)
|
||||
// */
|
||||
// @Cacheable(cacheNames = "admintool:metaClothSlotTypeData", key = "#p0", unless = "#result == null")
|
||||
// public String getMetaClothSlotTypeData(int metaId) {
|
||||
// MetaClothTypeData clothType = metadataFileLoader.getMetaClothType(metaId);
|
||||
// return clothType == null ? "" : clothType.getEquipSlotType();
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 의상 타입 정보 캐싱
|
||||
// * @param metaId
|
||||
// * @return 의상 타입(String)
|
||||
// */
|
||||
// @Cacheable(cacheNames = "admintool:metaClothSmallTypeData", key = "#p0", unless = "#result == null", sync = true)
|
||||
// public String getMetaClothSmallTypeData(int metaId) {
|
||||
// log.info("getMetaClothSmallTypeData metaId: {}", metaId);
|
||||
// MetaClothTypeData clothType = metadataFileLoader.getMetaClothType(metaId);
|
||||
// log.info("getMetaClothSmallTypeData data: {}", clothType);
|
||||
// return clothType == null ? "" : clothType.getSmallType();
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 퀘스트 정보
|
||||
// * @param questId
|
||||
// * @return 퀘스트 정보(List)
|
||||
// */
|
||||
// public List<MetaQuestData> getMetaQuestData(int questId) {
|
||||
// return metadataFileLoader.getMetaQuests(questId);
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.caliverse.admin.domain.entity;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
public class CraftingDict {
|
||||
//제작아이디
|
||||
private Integer id;
|
||||
//제작 타입
|
||||
@JsonProperty("type_small")
|
||||
private String typeSmall;
|
||||
//아이템명
|
||||
@JsonProperty("item_name")
|
||||
private String itemName;
|
||||
//아이템아이디
|
||||
@JsonProperty("item_id")
|
||||
private Integer itemId;
|
||||
//아이템개수
|
||||
@JsonProperty("item_value")
|
||||
private Integer itemValue;
|
||||
//레시피 필요 여부
|
||||
@JsonProperty("recipe_type")
|
||||
private String recipeType;
|
||||
//레시피 아이디
|
||||
@JsonProperty("recipe_id")
|
||||
private Integer recipeId;
|
||||
//제작시 필요 재료
|
||||
private String material;
|
||||
//제작시 필요 능력치
|
||||
private String attribute;
|
||||
//제작 시간
|
||||
@JsonProperty("crafting_time")
|
||||
private Integer craftingTime;
|
||||
//비컨 사용시 감소하는 시간
|
||||
@JsonProperty("beacon_reduce_time")
|
||||
private Integer beaconReduceTime;
|
||||
//비컨 사용시 추가 획득되는 아이템ID
|
||||
@JsonProperty("beacon_bonus_item_id")
|
||||
private Integer beaconBonusItemId;
|
||||
//1회당 제작 최대 가능 횟수
|
||||
@JsonProperty("max_craft_limit")
|
||||
private Integer maxCraftLimit;
|
||||
}
|
||||
@@ -17,7 +17,17 @@ public enum EMetaData {
|
||||
GAME_MODE_MATCH_DATA("GameModeMatch", true),
|
||||
BATTLE_CONFIG_DATA("BattleFFAConfig", true),
|
||||
BATTLE_REWARD_DATA("BattleFFAReward", true),
|
||||
SYSTEM_MAIL_DATA("SystemMail", true)
|
||||
SYSTEM_MAIL_DATA("SystemMail", true),
|
||||
BRAND_DATA("Brand", true),
|
||||
BUFF_DATA("Buff", true),
|
||||
ITEM_SET_DATA("ItemSet", true),
|
||||
WEB_LINK_DATA("WeblinkLocalize", true),
|
||||
ATTRIBUTE_RANDOM_GROUP_DATA("AttributeRandomGroup", true),
|
||||
CRAFTING_DATA("Crafting", true),
|
||||
CURRENCY_DATA("Currency", true),
|
||||
GACHA_DATA("Gacha", true),
|
||||
RANKING_DATA("Ranking", true),
|
||||
EVENT_ACTION_SCORE_DATA("EventActionScore", true)
|
||||
|
||||
;
|
||||
|
||||
|
||||
132
src/main/java/com/caliverse/admin/domain/entity/ItemDict.java
Normal file
132
src/main/java/com/caliverse/admin/domain/entity/ItemDict.java
Normal file
@@ -0,0 +1,132 @@
|
||||
package com.caliverse.admin.domain.entity;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
public class ItemDict {
|
||||
//대분류
|
||||
@JsonProperty("type_large")
|
||||
private String typeLarge;
|
||||
//소분류
|
||||
@JsonProperty("type_small")
|
||||
private String typeSmall;
|
||||
//아이템명
|
||||
@JsonProperty("item_name")
|
||||
private String itemName;
|
||||
//아이템아이디
|
||||
@JsonProperty("item_id")
|
||||
private Integer itemId;
|
||||
//브랜드
|
||||
private String brand;
|
||||
//성별
|
||||
private String gender;
|
||||
//판매시 획득 재화
|
||||
@JsonProperty("sell_type")
|
||||
private String sellType;
|
||||
//판매시 획득 재화량
|
||||
@JsonProperty("sell_price")
|
||||
private Integer sellPrice;
|
||||
//구매시 필요 재화
|
||||
@JsonProperty("buy_type")
|
||||
private String buyType;
|
||||
//구매시 필요 재화량
|
||||
@JsonProperty("buy_price")
|
||||
private Integer buyPrice;
|
||||
//구매시 할인율
|
||||
@JsonProperty("buy_discount_rate")
|
||||
private Integer buyDiscountRate;
|
||||
|
||||
private Country country;
|
||||
private Expire expire;
|
||||
private Trade trade;
|
||||
private Attrib attrib;
|
||||
private Etc etc;
|
||||
|
||||
@Builder
|
||||
public static class Country{
|
||||
//최대 보유 가능 수량
|
||||
@JsonProperty("max_count")
|
||||
private Integer maxCount;
|
||||
//최대 스택 가능 수량
|
||||
@JsonProperty("stack_max_count")
|
||||
private Integer stackMaxCount;
|
||||
}
|
||||
|
||||
@Builder
|
||||
public static class Expire{
|
||||
//아이템 만료 타입
|
||||
@JsonProperty("expire_type")
|
||||
private String expireType;
|
||||
//만료 시작 시간
|
||||
@JsonProperty("expire_start_dt")
|
||||
private LocalDateTime expireStartDt;
|
||||
//만료 종료 시간
|
||||
@JsonProperty("expire_end_dt")
|
||||
private LocalDateTime expireEndDt;
|
||||
//만료 시간 연장 여부
|
||||
@JsonProperty("expire_time_sec")
|
||||
private Integer expireTimeSec;
|
||||
}
|
||||
|
||||
@Builder
|
||||
public static class Trade{
|
||||
//유저 간 거래 가능 여부
|
||||
@JsonProperty("user_tradable")
|
||||
private boolean userTradable;
|
||||
//상점에서 판매 가능 여부
|
||||
@JsonProperty("system_tradable")
|
||||
private boolean systemTradable;
|
||||
//버리기 가능 여부
|
||||
@JsonProperty("throwable")
|
||||
private boolean throwable;
|
||||
//상점에서 구매 가능 여부
|
||||
@JsonProperty("cart_buy")
|
||||
private boolean cartBuy;
|
||||
}
|
||||
|
||||
@Builder
|
||||
public static class Attrib{
|
||||
//희귀도
|
||||
@JsonProperty("rarity")
|
||||
private String rarity;
|
||||
//기본 속성
|
||||
@JsonProperty("default_attrib")
|
||||
private String defaultAttrib;
|
||||
//랜덤 그룹
|
||||
@JsonProperty("attrib_random_group")
|
||||
private String attribRandomGroup;
|
||||
//아이템 세트
|
||||
@JsonProperty("item_set")
|
||||
private String itemSet;
|
||||
//아이템 사용 시 획득 버프
|
||||
@JsonProperty("buff")
|
||||
private String buff;
|
||||
}
|
||||
|
||||
@Builder
|
||||
public static class Etc{
|
||||
//착용 부위
|
||||
@JsonProperty("dress_slot_type")
|
||||
private String dressSlotType;
|
||||
//제품 URL
|
||||
@JsonProperty("product_link")
|
||||
private String productLink;
|
||||
//제작 아이템 그룹
|
||||
@JsonProperty("prop_small_type")
|
||||
private String propSmallType;
|
||||
//랜덤박스 그룹 ID
|
||||
@JsonProperty("gacha_group_id")
|
||||
private Integer gachaGroupId;
|
||||
//UGQ 사용 가능 여부
|
||||
@JsonProperty("ugq_action")
|
||||
private String ugqAction;
|
||||
//연결된 랜드 ID
|
||||
@JsonProperty("linked_land")
|
||||
private Integer linkedLand;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.caliverse.admin.domain.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
@Builder
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class RankingSchedule {
|
||||
private Long id;
|
||||
@JsonProperty("row_num")
|
||||
private Integer rowNum;
|
||||
private String guid;
|
||||
private String title;
|
||||
@JsonProperty("meta_id")
|
||||
private Integer metaId;
|
||||
@JsonProperty("event_action_id")
|
||||
private Integer eventActionId;
|
||||
// 시작 일자
|
||||
@JsonProperty("start_dt")
|
||||
private LocalDateTime startDt;
|
||||
// 종료 일자
|
||||
@JsonProperty("end_dt")
|
||||
private LocalDateTime endDt;
|
||||
@JsonProperty("base_dt")
|
||||
private LocalDateTime baseDt;
|
||||
//이벤트 상태
|
||||
private EVENT_STATUS status;
|
||||
@JsonProperty("refresh_interval")
|
||||
private Integer refreshInterval;
|
||||
@JsonProperty("initialization_interval")
|
||||
private Integer initializationInterval;
|
||||
@JsonProperty("snapshot_interval")
|
||||
private Integer snapshotInterval;
|
||||
|
||||
private boolean deleted;
|
||||
|
||||
@JsonProperty("create_by")
|
||||
private String createBy;
|
||||
@JsonProperty("create_dt")
|
||||
private LocalDateTime createDt;
|
||||
@JsonProperty("update_by")
|
||||
private String updateBy;
|
||||
@JsonProperty("update_dt")
|
||||
private LocalDateTime updateDt;
|
||||
|
||||
public enum EVENT_STATUS {
|
||||
WAIT,
|
||||
FINISH,
|
||||
FAIL,
|
||||
RUNNING,
|
||||
;
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ import java.util.List;
|
||||
@Data
|
||||
@Builder
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class Event {
|
||||
public class RewardEvent {
|
||||
private Long id;
|
||||
@JsonProperty("row_num")
|
||||
private Long rowNum;
|
||||
@@ -2,6 +2,7 @@ package com.caliverse.admin.domain.entity;
|
||||
|
||||
public enum SEARCHTYPE {
|
||||
NAME,
|
||||
NICKNAME,
|
||||
EMAIL,
|
||||
GUID,
|
||||
ACCOUNT,
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.caliverse.admin.domain.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
@Builder
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class WorldEvent {
|
||||
private Long id;
|
||||
@JsonProperty("row_num")
|
||||
private Integer rowNum;
|
||||
private String title;
|
||||
@JsonProperty("global_event_action_id")
|
||||
private Integer globalEventActionId;
|
||||
@JsonProperty("personal_event_action_id")
|
||||
private Integer personalEventActionId;
|
||||
// 시작 일자
|
||||
@JsonProperty("start_dt")
|
||||
private LocalDateTime startDt;
|
||||
// 종료 일자
|
||||
@JsonProperty("end_dt")
|
||||
private LocalDateTime endDt;
|
||||
//이벤트 상태
|
||||
private EVENT_STATUS status;
|
||||
@JsonProperty("max_point")
|
||||
private Integer maxPoint;
|
||||
|
||||
private boolean deleted;
|
||||
|
||||
@JsonProperty("create_by")
|
||||
private String createBy;
|
||||
@JsonProperty("create_dt")
|
||||
private LocalDateTime createDt;
|
||||
@JsonProperty("update_by")
|
||||
private String updateBy;
|
||||
@JsonProperty("update_dt")
|
||||
private LocalDateTime updateDt;
|
||||
|
||||
public enum EVENT_STATUS {
|
||||
WAIT,
|
||||
FINISH,
|
||||
FAIL,
|
||||
RUNNING,
|
||||
;
|
||||
}
|
||||
}
|
||||
@@ -53,5 +53,7 @@ public enum LogAction {
|
||||
DATA_INIT,
|
||||
DATA,
|
||||
USER,
|
||||
ITEM
|
||||
ITEM,
|
||||
WORLD_EVENT,
|
||||
RANKING_SCHEDULE
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.caliverse.admin.domain.entity.metadata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class MetaAttributeRandomGroupData {
|
||||
@JsonProperty("Key")
|
||||
private int key;
|
||||
|
||||
@JsonProperty("GroupID")
|
||||
private String groupId;
|
||||
|
||||
@JsonProperty("Attribute")
|
||||
private String attribute;
|
||||
|
||||
@JsonProperty("Weight")
|
||||
private int weight;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.caliverse.admin.domain.entity.metadata;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class MetaBrandData {
|
||||
private int id;
|
||||
private String brandName;
|
||||
private String brandDesc;
|
||||
private String logoLeft;
|
||||
private String logoCenter;
|
||||
private String logoRight;
|
||||
private String logoText;
|
||||
}
|
||||
@@ -0,0 +1,150 @@
|
||||
package com.caliverse.admin.domain.entity.metadata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class MetaBuffData {
|
||||
@JsonProperty("buff_id")
|
||||
private int buffId;
|
||||
|
||||
@JsonProperty("buff_name")
|
||||
private String buffName;
|
||||
|
||||
@JsonProperty("buff_description")
|
||||
private String buffDescription;
|
||||
|
||||
@JsonProperty("buff_category")
|
||||
private String buffCategory;
|
||||
|
||||
@JsonProperty("buff_channel")
|
||||
private int buffChannel;
|
||||
|
||||
@JsonProperty("buff_priority")
|
||||
private int buffPriority;
|
||||
|
||||
@JsonProperty("action_buff_id")
|
||||
private int actionBuffId;
|
||||
|
||||
@JsonProperty("Traits")
|
||||
private List<Trait> traits;
|
||||
|
||||
@JsonProperty("propmesh_name")
|
||||
private String propmeshName;
|
||||
|
||||
@JsonProperty("propmesh_name_opacity")
|
||||
private String propmeshNameOpacity;
|
||||
|
||||
@JsonProperty("use_required")
|
||||
private int useRequired;
|
||||
|
||||
@JsonProperty("InactiveRange")
|
||||
private int inactiveRange;
|
||||
|
||||
@JsonProperty("GuideHeight")
|
||||
private int guideHeight;
|
||||
|
||||
@JsonProperty("GuideOffset")
|
||||
private int guideOffset;
|
||||
|
||||
@JsonProperty("GuideScale")
|
||||
private double guideScale;
|
||||
|
||||
@JsonProperty("prop_effect")
|
||||
private String propEffect;
|
||||
|
||||
@JsonProperty("buff_start_condition")
|
||||
private String buffStartCondition;
|
||||
|
||||
@JsonProperty("buff_start_condition_value")
|
||||
private int buffStartConditionValue;
|
||||
|
||||
@JsonProperty("buff_end_condition")
|
||||
private String buffEndCondition;
|
||||
|
||||
@JsonProperty("buff_end_condition_value")
|
||||
private int buffEndConditionValue;
|
||||
|
||||
@JsonProperty("duration_time")
|
||||
private int durationTime;
|
||||
|
||||
@JsonProperty("buff_end_execution_type")
|
||||
private String buffEndExecutionType;
|
||||
|
||||
@JsonProperty("buff_end_execution_value")
|
||||
private int buffEndExecutionValue;
|
||||
|
||||
@JsonProperty("attach_effect_bp")
|
||||
private String attachEffectBp;
|
||||
|
||||
@JsonProperty("attach_avatar_socket")
|
||||
private String attachAvatarSocket;
|
||||
|
||||
@JsonProperty("tool_id")
|
||||
private int toolId;
|
||||
|
||||
@JsonProperty("buff_action_name")
|
||||
private String buffActionName;
|
||||
|
||||
@JsonProperty("buff_motion_set")
|
||||
private String buffMotionSet;
|
||||
|
||||
@JsonProperty("buff_hand_type")
|
||||
private String buffHandType;
|
||||
|
||||
@JsonProperty("buff_activate_name")
|
||||
private String buffActivateName;
|
||||
|
||||
@JsonProperty("buff_deactivate_name")
|
||||
private String buffDeactivateName;
|
||||
|
||||
@JsonProperty("buff_swap_name")
|
||||
private String buffSwapName;
|
||||
|
||||
@JsonProperty("buff_icon_2D")
|
||||
private String buffIcon2D;
|
||||
|
||||
@JsonProperty("buff_action_cooltime")
|
||||
private int buffActionCooltime;
|
||||
|
||||
@JsonProperty("using_aim_offset")
|
||||
private String usingAimOffset;
|
||||
|
||||
@JsonProperty("user_detachable")
|
||||
private boolean userDetachable;
|
||||
|
||||
@JsonProperty("is_normal_remain")
|
||||
private boolean isNormalRemain;
|
||||
|
||||
@JsonProperty("is_concert_remain")
|
||||
private boolean isConcertRemain;
|
||||
|
||||
@JsonProperty("is_movie_remain")
|
||||
private boolean isMovieRemain;
|
||||
|
||||
@JsonProperty("is_meeting_remain")
|
||||
private boolean isMeetingRemain;
|
||||
|
||||
@JsonProperty("is_myhome_remain")
|
||||
private boolean isMyhomeRemain;
|
||||
|
||||
@JsonProperty("is_beacon_remain")
|
||||
private boolean isBeaconRemain;
|
||||
|
||||
@JsonProperty("is_dressroom_remain")
|
||||
private boolean isDressroomRemain;
|
||||
|
||||
@Data
|
||||
public static class Trait {
|
||||
@JsonProperty("Attribute")
|
||||
private String attribute;
|
||||
|
||||
@JsonProperty("Value")
|
||||
private int value;
|
||||
|
||||
@JsonProperty("Operation")
|
||||
private String operation;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.caliverse.admin.domain.entity.metadata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class MetaCraftingData {
|
||||
@JsonProperty("Id")
|
||||
private int id;
|
||||
|
||||
@JsonProperty("PropSmallType")
|
||||
private String propSmallType;
|
||||
|
||||
@JsonProperty("Crafting_ItemId")
|
||||
private int craftingItemId;
|
||||
|
||||
@JsonProperty("Crafting_ItemValue")
|
||||
private int craftingItemValue;
|
||||
|
||||
@JsonProperty("RecipeType")
|
||||
private String recipeType;
|
||||
|
||||
@JsonProperty("Recipe_ItemId")
|
||||
private int recipeItemId;
|
||||
|
||||
@JsonProperty("Material")
|
||||
private List<Material> materials;
|
||||
|
||||
@JsonProperty("Attribute")
|
||||
private List<Attribute> attributes;
|
||||
|
||||
@JsonProperty("Prop")
|
||||
private List<Integer> props;
|
||||
|
||||
@JsonProperty("CraftingTime")
|
||||
private int craftingTime;
|
||||
|
||||
@JsonProperty("Beacon_ReduceTime")
|
||||
private int beaconReduceTime;
|
||||
|
||||
@JsonProperty("Beacon_BonusItemId")
|
||||
private int beaconBonusItemId;
|
||||
|
||||
@JsonProperty("max_craft_limit")
|
||||
private int maxCraftLimit;
|
||||
@Data
|
||||
public static class Material {
|
||||
@JsonProperty("ItemId")
|
||||
private int itemId;
|
||||
|
||||
@JsonProperty("ItemValue")
|
||||
private int itemValue;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("(ItemId=%d,ItemValue=%d)", itemId, itemValue);
|
||||
}
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class Attribute {
|
||||
@JsonProperty("AttributeName")
|
||||
private String attributeName;
|
||||
|
||||
@JsonProperty("AttributeValue")
|
||||
private int attributeValue;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("(AttributeName=%s,AttributeValue=%d)", attributeName, attributeValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.caliverse.admin.domain.entity.metadata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class MetaCurrencyData {
|
||||
@JsonProperty("Id")
|
||||
private int id;
|
||||
|
||||
@JsonProperty("CurrencyType")
|
||||
private String currencyType;
|
||||
|
||||
@JsonProperty("Name")
|
||||
private String name;
|
||||
|
||||
@JsonProperty("Description")
|
||||
private String description;
|
||||
|
||||
@JsonProperty("MaxCount")
|
||||
private Integer maxCount;
|
||||
|
||||
@JsonProperty("IconPath")
|
||||
private String iconPath;
|
||||
|
||||
@JsonProperty("ItemID")
|
||||
private Integer itemId;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.caliverse.admin.domain.entity.metadata;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class MetaEventActionScoreData {
|
||||
private int id;
|
||||
private String description;
|
||||
private int groupId;
|
||||
private String eventTarget;
|
||||
private String event;
|
||||
private String eventCondition1;
|
||||
private String eventCondition2;
|
||||
private String eventCondition3;
|
||||
private int score;
|
||||
private String scoreModifyType;
|
||||
private boolean active;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.caliverse.admin.domain.entity.metadata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class MetaGachaData {
|
||||
@JsonProperty("Id")
|
||||
private int id;
|
||||
|
||||
@JsonProperty("GroupId")
|
||||
private int groupId;
|
||||
|
||||
@JsonProperty("Reward")
|
||||
private Reward reward;
|
||||
|
||||
@JsonProperty("Weight")
|
||||
private int weight;
|
||||
|
||||
@Data
|
||||
public static class Reward {
|
||||
@JsonProperty("Currency")
|
||||
private Currency currency;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class Currency {
|
||||
@JsonProperty("Id")
|
||||
private int id;
|
||||
|
||||
@JsonProperty("Value")
|
||||
private double value;
|
||||
}
|
||||
}
|
||||
@@ -5,15 +5,177 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
|
||||
@Getter @Setter
|
||||
public class MetaItemData {
|
||||
|
||||
@JsonProperty("item_id")
|
||||
private Integer itemId;
|
||||
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
@JsonProperty("desc")
|
||||
private String desc;
|
||||
|
||||
@JsonProperty("gender")
|
||||
private String gender;
|
||||
|
||||
@JsonProperty("image_3D_DP")
|
||||
private String image3dDp;
|
||||
|
||||
@JsonProperty("image_3D_DP_opacity")
|
||||
private String image3dDpOpacity;
|
||||
|
||||
@JsonProperty("image_3D")
|
||||
private String image3d;
|
||||
|
||||
@JsonProperty("image_3D_opacity")
|
||||
private String image3dOpacity;
|
||||
|
||||
@JsonProperty("image_2D")
|
||||
private String image2d;
|
||||
|
||||
@JsonProperty("release_date")
|
||||
private LocalDateTime releaseDate;
|
||||
|
||||
@JsonProperty("Brand")
|
||||
private Integer brand;
|
||||
|
||||
@JsonProperty("isNFT")
|
||||
private Boolean isNft;
|
||||
|
||||
@JsonProperty("type_large")
|
||||
private String largeType;
|
||||
private String gender;
|
||||
|
||||
@JsonProperty("type_small")
|
||||
private String smallType;
|
||||
|
||||
@JsonProperty("register_id")
|
||||
private Integer registerId;
|
||||
|
||||
@JsonProperty("max_count")
|
||||
private Integer maxCount;
|
||||
|
||||
@JsonProperty("stack_max_count")
|
||||
private Integer stackMaxCount;
|
||||
|
||||
@JsonProperty("expire_type")
|
||||
private String expireType;
|
||||
|
||||
@JsonProperty("expire_fixedTerm_start")
|
||||
private LocalDateTime expireFixedTermStart;
|
||||
|
||||
@JsonProperty("expire_fixedTerm_end")
|
||||
private LocalDateTime expireFixedTermEnd;
|
||||
|
||||
@JsonProperty("expire_time_sec")
|
||||
private Integer expireTimeSec;
|
||||
|
||||
@JsonProperty("is_user_tradable")
|
||||
private Boolean isUserTradable;
|
||||
|
||||
@JsonProperty("is_system_tradable")
|
||||
private Boolean isSystemTradable;
|
||||
|
||||
@JsonProperty("sell_price_type")
|
||||
private String sellPriceType;
|
||||
|
||||
@JsonProperty("sell_id")
|
||||
private Integer sellId;
|
||||
|
||||
@JsonProperty("sell_price")
|
||||
private Integer sellPrice;
|
||||
|
||||
@JsonProperty("order")
|
||||
private Integer order;
|
||||
|
||||
@JsonProperty("is_throwable")
|
||||
private Boolean isThrowable;
|
||||
|
||||
@JsonProperty("ActionType")
|
||||
private String actionType;
|
||||
|
||||
@JsonProperty("ActionValue")
|
||||
private Integer actionValue;
|
||||
|
||||
@JsonProperty("DetailOffset")
|
||||
private Float detailOffset;
|
||||
|
||||
@JsonProperty("DetailScale")
|
||||
private Float detailScale;
|
||||
|
||||
@JsonProperty("GuidePopup")
|
||||
private Integer guidePopup;
|
||||
|
||||
@JsonProperty("DetailRoll")
|
||||
private Float detailRoll;
|
||||
|
||||
@JsonProperty("DetailPitch")
|
||||
private Float detailPitch;
|
||||
|
||||
@JsonProperty("DetailCameraRight")
|
||||
private Float detailCameraRight;
|
||||
|
||||
@JsonProperty("DetailCameraHeight")
|
||||
private Float detailCameraHeight;
|
||||
|
||||
@JsonProperty("DetailCameraAngle")
|
||||
private Float detailCameraAngle;
|
||||
|
||||
@JsonProperty("Rarity")
|
||||
private String rarity;
|
||||
|
||||
@JsonProperty("DefaultAttribute")
|
||||
private String defaultAttribute;
|
||||
|
||||
@JsonProperty("AttributeRandomGroupID")
|
||||
private String attributeRandomGroupId;
|
||||
|
||||
@JsonProperty("ItemSetID")
|
||||
private Integer itemSetId;
|
||||
|
||||
@JsonProperty("GachaGroupId")
|
||||
private Integer gachaGroupId;
|
||||
|
||||
@JsonProperty("Buy_Price_Type")
|
||||
private String buyPriceType;
|
||||
|
||||
@JsonProperty("Buy_id")
|
||||
private Integer buyId;
|
||||
|
||||
@JsonProperty("Buy_price")
|
||||
private Integer buyPrice;
|
||||
|
||||
@JsonProperty("buff_id")
|
||||
private Integer buffId;
|
||||
|
||||
@JsonProperty("ProductLink")
|
||||
private String productLink;
|
||||
|
||||
@JsonProperty("is_CartNBuy")
|
||||
private Boolean isCartNBuy;
|
||||
|
||||
@JsonProperty("Buy_Discount_Rate")
|
||||
private Integer buyDiscountRate;
|
||||
|
||||
@JsonProperty("PropSmallType")
|
||||
private String propSmallType;
|
||||
|
||||
@JsonProperty("UGQAction")
|
||||
private String ugqAction;
|
||||
|
||||
@JsonProperty("LinkedLand")
|
||||
private Integer linkedLand;
|
||||
|
||||
@JsonProperty("IsUiOnly")
|
||||
private Boolean isUiOnly;
|
||||
|
||||
@JsonProperty("BeaconShopGoldFee")
|
||||
private Integer beaconShopGoldFee;
|
||||
|
||||
@JsonProperty("is_BeaconShop")
|
||||
private Boolean isBeaconShop;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.caliverse.admin.domain.entity.metadata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class MetaItemSetData {
|
||||
@JsonProperty("ID")
|
||||
private int id;
|
||||
|
||||
@JsonProperty("Name")
|
||||
private String name;
|
||||
|
||||
@JsonProperty("Items")
|
||||
private List<String> items;
|
||||
|
||||
@JsonProperty("SetEfffects")
|
||||
private List<SetEffect> setEffects;
|
||||
|
||||
@Data
|
||||
public static class SetEffect {
|
||||
@JsonProperty("RequirementCount")
|
||||
private int requirementCount;
|
||||
|
||||
@JsonProperty("AttributeName")
|
||||
private String attributeName;
|
||||
|
||||
@JsonProperty("AttributeValue")
|
||||
private int attributeValue;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.caliverse.admin.domain.entity.metadata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class MetaRankingData {
|
||||
private int id;
|
||||
private String desc;
|
||||
private String rankingType;
|
||||
private Integer typeId;
|
||||
private Integer typeValue;
|
||||
private String eventType;
|
||||
private String sortType;
|
||||
private String scoreType;
|
||||
private String scoreModifyType;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.caliverse.admin.domain.entity.metadata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class MetaWebLinkData {
|
||||
@JsonProperty("Key")
|
||||
private String key;
|
||||
|
||||
@JsonProperty("Ko")
|
||||
private String ko;
|
||||
|
||||
@JsonProperty("En")
|
||||
private String en;
|
||||
|
||||
@JsonProperty("Ja")
|
||||
private String ja;
|
||||
}
|
||||
@@ -29,6 +29,8 @@ public class LogGameRequest {
|
||||
private LogDomain logDomain;
|
||||
@JsonProperty("tran_id")
|
||||
private String tranId;
|
||||
@JsonProperty("item_id")
|
||||
private String itemId;
|
||||
//currency
|
||||
@JsonProperty("currency_type")
|
||||
private ECurrencyType currencyType;
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.caliverse.admin.domain.request;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class RankRequest {
|
||||
|
||||
private Long id;
|
||||
private String guid;
|
||||
private String title;
|
||||
@JsonProperty("start_dt")
|
||||
private LocalDateTime startDt;
|
||||
@JsonProperty("end_dt")
|
||||
private LocalDateTime endDt;
|
||||
@JsonProperty("base_dt")
|
||||
private LocalDateTime baseDt;
|
||||
@JsonProperty("meta_id")
|
||||
private Integer metaId;
|
||||
@JsonProperty("event_action_id")
|
||||
private Integer eventActionId;
|
||||
@JsonProperty("refresh_interval")
|
||||
private Integer refreshInterval;
|
||||
@JsonProperty("initialization_interval")
|
||||
private Integer initializationInterval;
|
||||
@JsonProperty("snapshot_interval")
|
||||
private Integer snapshotInterval;
|
||||
|
||||
@JsonProperty("create_by")
|
||||
private Long createBy;
|
||||
@JsonProperty("create_dt")
|
||||
private LocalDateTime createDt;
|
||||
@JsonProperty("update_by")
|
||||
private Long updateBy;
|
||||
@JsonProperty("update_dt")
|
||||
private LocalDateTime updateDt;
|
||||
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.caliverse.admin.domain.request;
|
||||
|
||||
import com.caliverse.admin.domain.entity.Item;
|
||||
import com.caliverse.admin.domain.entity.Event;
|
||||
import com.caliverse.admin.domain.entity.RewardEvent;
|
||||
import com.caliverse.admin.domain.entity.Message;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.*;
|
||||
@@ -13,7 +13,7 @@ import java.util.List;
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class EventRequest {
|
||||
public class RewardEventRequest {
|
||||
|
||||
private Long id;
|
||||
@JsonProperty("mail_list")
|
||||
@@ -21,7 +21,7 @@ public class EventRequest {
|
||||
@JsonProperty("item_list")
|
||||
private List<Item> itemList; // 아이템
|
||||
@JsonProperty("event_type")
|
||||
private Event.EVENTTYPE eventType;
|
||||
private RewardEvent.EVENTTYPE eventType;
|
||||
@JsonProperty("start_dt")
|
||||
private LocalDateTime startDt; // 시작 시간
|
||||
@JsonProperty("end_dt")
|
||||
@@ -37,6 +37,6 @@ public class EventRequest {
|
||||
private LocalDateTime updateDt;
|
||||
|
||||
//삭제용 id
|
||||
private List<Event> list;
|
||||
private List<RewardEvent> list;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.caliverse.admin.domain.request;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class WorldEventRequest {
|
||||
|
||||
private Long id;
|
||||
private String title;
|
||||
@JsonProperty("start_dt")
|
||||
private LocalDateTime startDt;
|
||||
@JsonProperty("end_dt")
|
||||
private LocalDateTime endDt;
|
||||
@JsonProperty("global_event_action_id")
|
||||
private Integer globalEventActionId;
|
||||
@JsonProperty("personal_event_action_id")
|
||||
private Integer personalEventActionId;
|
||||
@JsonProperty("max_point")
|
||||
private Integer maxPoint;
|
||||
|
||||
@JsonProperty("create_by")
|
||||
private Long createBy;
|
||||
@JsonProperty("create_dt")
|
||||
private LocalDateTime createDt;
|
||||
@JsonProperty("update_by")
|
||||
private Long updateBy;
|
||||
@JsonProperty("update_dt")
|
||||
private LocalDateTime updateDt;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package com.caliverse.admin.domain.response;
|
||||
|
||||
import com.caliverse.admin.domain.entity.CraftingDict;
|
||||
import com.caliverse.admin.domain.entity.ItemDict;
|
||||
import com.caliverse.admin.domain.entity.metadata.*;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class DictionaryResponse {
|
||||
private int status;
|
||||
|
||||
private String result;
|
||||
@JsonProperty("data")
|
||||
private ResultData resultData;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public static class ResultData {
|
||||
|
||||
@JsonProperty("item_list")
|
||||
private ItemList itemList;
|
||||
|
||||
@JsonProperty("crafting_list")
|
||||
private CraftingList craftingList;
|
||||
|
||||
@JsonProperty("brand_list")
|
||||
private List<MetaBrandData> brandList;
|
||||
|
||||
@JsonProperty("ranking_list")
|
||||
private List<MetaRankingData> rankingList;
|
||||
|
||||
@JsonProperty("battle_config_list")
|
||||
private List<MetaBattleConfigData> battleConfigList;
|
||||
|
||||
@JsonProperty("battle_reward_list")
|
||||
private List<MetaBattleRewardData> battleRewardList;
|
||||
|
||||
@JsonProperty("game_mode_list")
|
||||
private List<MetaGameModeData> gameModeList;
|
||||
|
||||
@JsonProperty("event_action_list")
|
||||
private List<MetaEventActionScoreData> eventActionList;
|
||||
|
||||
private String message;
|
||||
|
||||
private int total;
|
||||
@JsonProperty("total_all")
|
||||
private int totalAll;
|
||||
@JsonProperty("page_no")
|
||||
private int pageNo;
|
||||
|
||||
}
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public static class ItemList {
|
||||
@JsonProperty("ko")
|
||||
private List<ItemDict> ko;
|
||||
|
||||
@JsonProperty("en")
|
||||
private List<ItemDict> en;
|
||||
|
||||
@JsonProperty("ja")
|
||||
private List<ItemDict> ja;
|
||||
}
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public static class CraftingList {
|
||||
@JsonProperty("ko")
|
||||
private List<CraftingDict> ko;
|
||||
|
||||
@JsonProperty("en")
|
||||
private List<CraftingDict> en;
|
||||
|
||||
@JsonProperty("ja")
|
||||
private List<CraftingDict> ja;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.caliverse.admin.domain.response;
|
||||
|
||||
import com.caliverse.admin.domain.entity.RankingSchedule;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class RankResponse {
|
||||
private int status;
|
||||
|
||||
private String result;
|
||||
@JsonProperty("data")
|
||||
private ResultData resultData;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public static class ResultData {
|
||||
|
||||
@JsonProperty("detail")
|
||||
private RankingSchedule rankingSchedule;
|
||||
|
||||
@JsonProperty("list")
|
||||
private List<RankingSchedule> rankingScheduleList;
|
||||
|
||||
private String message;
|
||||
|
||||
private int total;
|
||||
@JsonProperty("total_all")
|
||||
private int totalAll;
|
||||
@JsonProperty("page_no")
|
||||
private int pageNo;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.caliverse.admin.domain.response;
|
||||
|
||||
import com.caliverse.admin.domain.entity.Event;
|
||||
import com.caliverse.admin.domain.entity.RewardEvent;
|
||||
import com.caliverse.admin.domain.entity.Item;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
@@ -15,7 +15,7 @@ import java.util.List;
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class EventResponse {
|
||||
public class RewardEventResponse {
|
||||
private int status;
|
||||
|
||||
private String result;
|
||||
@@ -31,10 +31,10 @@ public class EventResponse {
|
||||
private String message;
|
||||
|
||||
@JsonProperty("detail")
|
||||
private Event event;
|
||||
private RewardEvent rewardEvent;
|
||||
|
||||
@JsonProperty("list")
|
||||
private List<Event> eventList;
|
||||
private List<RewardEvent> rewardEventList;
|
||||
private int total;
|
||||
@JsonProperty("total_all")
|
||||
private int totalAll;
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.caliverse.admin.domain.response;
|
||||
|
||||
import com.caliverse.admin.domain.entity.MenuBanner;
|
||||
import com.caliverse.admin.domain.entity.WorldEvent;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class WorldEventResponse {
|
||||
private int status;
|
||||
|
||||
private String result;
|
||||
|
||||
@JsonProperty("data")
|
||||
private ResultData resultData;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public static class ResultData{
|
||||
|
||||
private String message;
|
||||
|
||||
@JsonProperty("detail")
|
||||
private WorldEvent worldEvent;
|
||||
|
||||
@JsonProperty("list")
|
||||
private List<WorldEvent> worldEventList;
|
||||
|
||||
private int total;
|
||||
@JsonProperty("total_all")
|
||||
private int totalAll;
|
||||
@JsonProperty("page_no")
|
||||
private int pageNo;
|
||||
}
|
||||
}
|
||||
@@ -701,9 +701,34 @@ public class ExcelService {
|
||||
}
|
||||
|
||||
private String translateFieldName(String fieldName) {
|
||||
if (fieldName == null || fieldName.trim().isEmpty()) {
|
||||
return fieldName;
|
||||
}
|
||||
|
||||
Map<String, String> translations = getFieldTranslations();
|
||||
|
||||
return translations.getOrDefault(fieldName.toLowerCase(), fieldName);
|
||||
// 띄어쓰기로 구분된 경우 각각 번역 후 합치기
|
||||
if (fieldName.contains(" ")) {
|
||||
String[] parts = fieldName.split("\\s+"); // 하나 이상의 공백으로 분리
|
||||
StringBuilder result = new StringBuilder();
|
||||
|
||||
for (int i = 0; i < parts.length; i++) {
|
||||
if (i > 0) {
|
||||
result.append(" ");
|
||||
}
|
||||
|
||||
String part = parts[i].trim();
|
||||
if (!part.isEmpty()) {
|
||||
String translated = translations.getOrDefault(part.toLowerCase(), part);
|
||||
result.append(translated);
|
||||
}
|
||||
}
|
||||
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
// 띄어쓰기가 없는 경우 기존 로직
|
||||
return translations.getOrDefault(fieldName, fieldName);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -741,6 +766,42 @@ public class ExcelService {
|
||||
translations.put("amount", "금액");
|
||||
translations.put("quantity", "수량");
|
||||
translations.put("count", "개수");
|
||||
translations.put("itemId", "아이템 ID");
|
||||
translations.put("itemName", "아이템명");
|
||||
translations.put("sellType", "판매시 재화");
|
||||
translations.put("sellPrice", "판매시 재화량");
|
||||
translations.put("buyType", "구매시 재화");
|
||||
translations.put("buyPrice", "구매시 재화량");
|
||||
translations.put("buyDiscountRate", "구매시 할인율");
|
||||
translations.put("brand", "개수");
|
||||
translations.put("typeLarge", "개수");
|
||||
translations.put("typeSmall", "개수");
|
||||
translations.put("attib", "속성");
|
||||
translations.put("attribRandomGroup", "랜덤 그룹");
|
||||
translations.put("buff", "버프");
|
||||
translations.put("defaultAttrib", "기본 속성");
|
||||
translations.put("itemSet", "아이템 세트");
|
||||
translations.put("rarity", "희귀도");
|
||||
translations.put("etc", "기타");
|
||||
translations.put("dressSlotType", "착용 부위");
|
||||
translations.put("gachaGroupId", "랜덤박스 그룹 ID");
|
||||
translations.put("linkedLand", "연결된 랜드");
|
||||
translations.put("productLink", "제품 URL");
|
||||
translations.put("propSmallType", "제작 아이템 그룹");
|
||||
translations.put("ugqAction", "UGQ 사용 가능 여부");
|
||||
translations.put("expire", "만료");
|
||||
translations.put("expireEndDt", "만료 종료 시간");
|
||||
translations.put("expireStartDt", "만료 시작 시간");
|
||||
translations.put("expireTimeSec", "만료 시간 연장 여부");
|
||||
translations.put("expireType", "아이템 만료 타입");
|
||||
translations.put("trade", "거래");
|
||||
translations.put("cartBuy", "상점에서 구매 가능 여부");
|
||||
translations.put("systemTradable", "상점에서 판매 가능 여부");
|
||||
translations.put("throwable", "버리기 가능 여부");
|
||||
translations.put("userTradable", "유저 간 거래 가능 여부");
|
||||
translations.put("country", "Count");
|
||||
translations.put("maxCount", "최대 보유 가능 수량");
|
||||
translations.put("stackMaxCount", "최대 스택 가능 수량");
|
||||
|
||||
return translations;
|
||||
}
|
||||
@@ -954,6 +1015,9 @@ public class ExcelService {
|
||||
.stream()
|
||||
.map(list -> list.get(0))
|
||||
.collect(Collectors.toList());
|
||||
}else {
|
||||
// 일반 객체의 경우 다양성을 위한 스마트 샘플링
|
||||
sampleData = createSmartSampleForGeneralObjects(sampleData);
|
||||
}
|
||||
|
||||
return generateHeadersFromSampleObjects(sampleData);
|
||||
@@ -964,38 +1028,186 @@ public class ExcelService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 최적화된 객체 플래튼화 (캐시 활용)
|
||||
* 일반 객체를 위한 스마트 샘플링
|
||||
* - 객체의 다양성을 최대화하여 모든 가능한 필드를 찾아내기 위함
|
||||
*/
|
||||
private Map<String, Object> flattenObjectToMapOptimized(Object item) {
|
||||
Map<String, Object> flatMap = new LinkedHashMap<>();
|
||||
private List<?> createSmartSampleForGeneralObjects(List<?> data) {
|
||||
if (data == null || data.isEmpty()) {
|
||||
return data;
|
||||
}
|
||||
|
||||
if (item == null) return flatMap;
|
||||
// 데이터가 50개 미만이면 모두 사용
|
||||
if (data.size() <= 50) {
|
||||
return data.stream().filter(Objects::nonNull).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
Class<?> clazz = item.getClass();
|
||||
List<Field> allFields = getCachedFields(clazz);
|
||||
Set<Object> uniqueSamples = new LinkedHashSet<>();
|
||||
int step = Math.max(1, data.size() / 20); // 최대 20개 샘플 추출
|
||||
|
||||
for (Field field : allFields) {
|
||||
if (shouldSkipField(field)) continue;
|
||||
|
||||
try {
|
||||
field.setAccessible(true);
|
||||
Object fieldValue = field.get(item);
|
||||
String fieldName = field.getName();
|
||||
|
||||
if ("message".equals(fieldName)) continue;
|
||||
|
||||
if (fieldValue instanceof Map) {
|
||||
Map<String, Object> nestedMap = (Map<String, Object>) fieldValue;
|
||||
flattenMapOptimized(nestedMap, fieldName, flatMap);
|
||||
} else if (fieldValue != null) {
|
||||
flatMap.put(fieldName, fieldValue);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// 접근할 수 없는 필드는 무시
|
||||
// 균등하게 분포된 샘플 선택
|
||||
for (int i = 0; i < data.size() && uniqueSamples.size() < 20; i += step) {
|
||||
Object item = data.get(i);
|
||||
if (item != null) {
|
||||
uniqueSamples.add(item);
|
||||
}
|
||||
}
|
||||
|
||||
return flatMap;
|
||||
// 첫 번째와 마지막 요소는 반드시 포함 (경계값 처리)
|
||||
if (!data.isEmpty() && data.get(0) != null) {
|
||||
uniqueSamples.add(data.get(0));
|
||||
}
|
||||
if (data.size() > 1 && data.get(data.size() - 1) != null) {
|
||||
uniqueSamples.add(data.get(data.size() - 1));
|
||||
}
|
||||
|
||||
// 중간 지점들도 추가 (복잡한 객체 구조 발견을 위해)
|
||||
int quarterPoint = data.size() / 4;
|
||||
int halfPoint = data.size() / 2;
|
||||
int threeQuarterPoint = (data.size() * 3) / 4;
|
||||
|
||||
if (quarterPoint < data.size() && data.get(quarterPoint) != null) {
|
||||
uniqueSamples.add(data.get(quarterPoint));
|
||||
}
|
||||
if (halfPoint < data.size() && data.get(halfPoint) != null) {
|
||||
uniqueSamples.add(data.get(halfPoint));
|
||||
}
|
||||
if (threeQuarterPoint < data.size() && data.get(threeQuarterPoint) != null) {
|
||||
uniqueSamples.add(data.get(threeQuarterPoint));
|
||||
}
|
||||
|
||||
return new ArrayList<>(uniqueSamples);
|
||||
}
|
||||
|
||||
/**
|
||||
* 최적화된 객체 플래튼화 (캐시 활용)
|
||||
*/
|
||||
private Map<String, Object> flattenObjectToMapOptimized(Object item) {
|
||||
if (item == null) {
|
||||
return new HashMap<>();
|
||||
}
|
||||
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
|
||||
try {
|
||||
Class<?> clazz = item.getClass();
|
||||
List<Field> fields = getCachedFields(clazz);
|
||||
|
||||
for (Field field : fields) {
|
||||
if (shouldSkipField(field)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
field.setAccessible(true);
|
||||
Object value = field.get(item);
|
||||
String fieldName = field.getName();
|
||||
|
||||
if (value == null) {
|
||||
result.put(fieldName, null);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Map 타입 처리
|
||||
if (value instanceof Map) {
|
||||
Map<String, Object> mapValue = (Map<String, Object>) value;
|
||||
flattenMapOptimized(mapValue, fieldName, result);
|
||||
}
|
||||
// Collection 타입 처리
|
||||
else if (value instanceof Collection) {
|
||||
Collection<?> collection = (Collection<?>) value;
|
||||
handleCollectionFieldOptimized(collection, fieldName, result);
|
||||
}
|
||||
// 배열 타입 처리
|
||||
else if (value.getClass().isArray()) {
|
||||
handleArrayFieldOptimized(value, fieldName, result);
|
||||
}
|
||||
// 중첩 객체 처리
|
||||
else if (isComplexObject(value)) {
|
||||
Map<String, Object> nestedMap = flattenObjectToMapOptimized(value);
|
||||
for (Map.Entry<String, Object> entry : nestedMap.entrySet()) {
|
||||
result.put(fieldName + "." + entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
// 기본 타입 및 단순 객체
|
||||
else {
|
||||
result.put(fieldName, value);
|
||||
}
|
||||
}
|
||||
|
||||
} catch (IllegalAccessException e) {
|
||||
log.error("Error accessing field during optimized object flattening", e);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private void handleCollectionFieldOptimized(Collection<?> collection, String fieldName, Map<String, Object> result) {
|
||||
if (collection.isEmpty()) {
|
||||
result.put(fieldName, "[]");
|
||||
return;
|
||||
}
|
||||
|
||||
int index = 0;
|
||||
int maxItems = 50; // 성능을 위해 50개로 제한
|
||||
|
||||
for (Object item : collection) {
|
||||
if (index >= maxItems) {
|
||||
result.put(fieldName + "[...]", String.format("더 많은 항목이 있음 (총 %d개 중 %d개만 표시)",
|
||||
collection.size(), maxItems));
|
||||
break;
|
||||
}
|
||||
|
||||
if (item == null) {
|
||||
result.put(fieldName + "[" + index + "]", null);
|
||||
} else if (item instanceof Map) {
|
||||
Map<String, Object> mapItem = (Map<String, Object>) item;
|
||||
flattenMapOptimized(mapItem, fieldName + "[" + index + "]", result);
|
||||
} else if (isComplexObject(item)) {
|
||||
Map<String, Object> nestedMap = flattenObjectToMapOptimized(item);
|
||||
for (Map.Entry<String, Object> entry : nestedMap.entrySet()) {
|
||||
result.put(fieldName + "[" + index + "]." + entry.getKey(), entry.getValue());
|
||||
}
|
||||
} else {
|
||||
result.put(fieldName + "[" + index + "]", item);
|
||||
}
|
||||
index++;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 최적화된 배열 필드 처리
|
||||
*/
|
||||
private void handleArrayFieldOptimized(Object arrayValue, String fieldName, Map<String, Object> result) {
|
||||
int length = java.lang.reflect.Array.getLength(arrayValue);
|
||||
|
||||
if (length == 0) {
|
||||
result.put(fieldName, "[]");
|
||||
return;
|
||||
}
|
||||
|
||||
int maxItems = 50; // 성능을 위해 50개로 제한
|
||||
|
||||
for (int i = 0; i < Math.min(length, maxItems); i++) {
|
||||
Object item = java.lang.reflect.Array.get(arrayValue, i);
|
||||
|
||||
if (item == null) {
|
||||
result.put(fieldName + "[" + i + "]", null);
|
||||
} else if (item instanceof Map) {
|
||||
Map<String, Object> mapItem = (Map<String, Object>) item;
|
||||
flattenMapOptimized(mapItem, fieldName + "[" + i + "]", result);
|
||||
} else if (isComplexObject(item)) {
|
||||
Map<String, Object> nestedMap = flattenObjectToMapOptimized(item);
|
||||
for (Map.Entry<String, Object> entry : nestedMap.entrySet()) {
|
||||
result.put(fieldName + "[" + i + "]." + entry.getKey(), entry.getValue());
|
||||
}
|
||||
} else {
|
||||
result.put(fieldName + "[" + i + "]", item);
|
||||
}
|
||||
}
|
||||
|
||||
if (length > maxItems) {
|
||||
result.put(fieldName + "[...]", String.format("더 많은 항목이 있음 (총 %d개 중 %d개만 표시)",
|
||||
length, maxItems));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1168,34 +1380,79 @@ public class ExcelService {
|
||||
|
||||
/**
|
||||
* Object 리스트의 모든 객체를 검사하여 헤더 생성 (Map 필드는 자동으로 펼치기)
|
||||
* @param data 데이터 리스트
|
||||
* @return 모든 필드를 포함한 헤더 Map
|
||||
*/
|
||||
private Map<String, String> generateHeadersFromSampleObjects(List<?> data) {
|
||||
LinkedHashMap<String, String> headers = new LinkedHashMap<>();
|
||||
Set<String> allFieldKeys = new LinkedHashSet<>();
|
||||
|
||||
if (data == null || data.isEmpty()) {
|
||||
return headers;
|
||||
private Map<String, String> generateHeadersFromSampleObjects(List<?> sampleData) {
|
||||
if (sampleData == null || sampleData.isEmpty()) {
|
||||
log.warn("Sample data is null or empty for header generation");
|
||||
return new LinkedHashMap<>();
|
||||
}
|
||||
|
||||
for (Object item : data) {
|
||||
if (item != null) {
|
||||
Map<String, Object> flatMap = flattenObjectToMapOptimized(item);
|
||||
allFieldKeys.addAll(flatMap.keySet());
|
||||
Set<String> allKeys = new LinkedHashSet<>();
|
||||
|
||||
try {
|
||||
// 각 샘플 객체를 펼쳐서 모든 가능한 키 수집
|
||||
for (Object item : sampleData) {
|
||||
if (item != null) {
|
||||
Map<String, Object> flattened = flattenObjectToMapOptimized(item);
|
||||
|
||||
// 제외할 헤더들 필터링
|
||||
Set<String> filteredKeys = flattened.keySet().stream()
|
||||
.filter(key -> !EXCLUDED_HEADERS.contains(key))
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
allKeys.addAll(filteredKeys);
|
||||
}
|
||||
}
|
||||
|
||||
// 키를 읽기 쉬운 헤더명으로 변환
|
||||
Map<String, String> headers = new LinkedHashMap<>();
|
||||
|
||||
// 키를 논리적 순서로 정렬 (기본 필드 -> 중첩 객체 필드 -> 배열/컬렉션)
|
||||
List<String> sortedKeys = allKeys.stream()
|
||||
.sorted(this::compareHeaderKeys)
|
||||
.toList();
|
||||
|
||||
for (String key : sortedKeys) {
|
||||
String headerName = convertFlatKeyToHeader(key);
|
||||
headers.put(key, headerName);
|
||||
}
|
||||
|
||||
log.info("Generated {} headers from {} sample objects", headers.size(), sampleData.size());
|
||||
return headers;
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("Error generating headers from sample objects", e);
|
||||
return generateFallbackHeaders(sampleData);
|
||||
}
|
||||
|
||||
for (String key : allFieldKeys) {
|
||||
if (EXCLUDED_HEADERS.contains(key)) continue;
|
||||
|
||||
String headerName = convertFlatKeyToHeader(key);
|
||||
headers.put(key, headerName);
|
||||
}
|
||||
|
||||
return headers;
|
||||
}
|
||||
|
||||
private int compareHeaderKeys(String key1, String key2) {
|
||||
// 기본 필드 우선 (점이나 대괄호가 없는 것)
|
||||
boolean isSimple1 = !key1.contains(".") && !key1.contains("[");
|
||||
boolean isSimple2 = !key2.contains(".") && !key2.contains("[");
|
||||
|
||||
if (isSimple1 && !isSimple2) return -1;
|
||||
if (!isSimple1 && isSimple2) return 1;
|
||||
|
||||
// 중첩 레벨 비교 (점의 개수)
|
||||
int dotCount1 = (int) key1.chars().filter(ch -> ch == '.').count();
|
||||
int dotCount2 = (int) key2.chars().filter(ch -> ch == '.').count();
|
||||
|
||||
if (dotCount1 != dotCount2) {
|
||||
return Integer.compare(dotCount1, dotCount2);
|
||||
}
|
||||
|
||||
// 배열 인덱스는 마지막에 (대괄호 포함)
|
||||
boolean hasArray1 = key1.contains("[");
|
||||
boolean hasArray2 = key2.contains("[");
|
||||
|
||||
if (!hasArray1 && hasArray2) return -1;
|
||||
if (hasArray1 && !hasArray2) return 1;
|
||||
|
||||
// 마지막으로 알파벳 순서
|
||||
return key1.compareTo(key2);
|
||||
}
|
||||
|
||||
/**
|
||||
* 펼쳐진 키를 읽기 쉬운 헤더명으로 변환
|
||||
@@ -1208,58 +1465,185 @@ public class ExcelService {
|
||||
String[] parts = key.split("\\.");
|
||||
StringBuilder result = new StringBuilder();
|
||||
|
||||
for (int i = 0; i < parts.length; i++) {
|
||||
if (i > 0) result.append(" ");
|
||||
try {
|
||||
for (int i = 0; i < parts.length; i++) {
|
||||
if (i > 0) result.append(" ");
|
||||
|
||||
String part = parts[i].replaceAll("\\[\\d+\\]", "");
|
||||
String translatedPart = translateFieldName(part);
|
||||
result.append(translatedPart);
|
||||
String part = parts[i].replaceAll("\\[\\d+\\]", "");
|
||||
String translatedPart = translateFieldName(part);
|
||||
result.append(translatedPart);
|
||||
}
|
||||
|
||||
return result.toString();
|
||||
}catch (Exception e) {
|
||||
log.error("Error converting key {} to header name", key, e);
|
||||
return key;
|
||||
}
|
||||
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 객체를 펼친 Map으로 변환
|
||||
*/
|
||||
private Map<String, Object> flattenObjectToMap(Object item) {
|
||||
Map<String, Object> flatMap = new LinkedHashMap<>();
|
||||
if (item == null) {
|
||||
return new HashMap<>();
|
||||
}
|
||||
|
||||
if (item == null) return flatMap;
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
|
||||
Class<?> clazz = item.getClass();
|
||||
List<Field> allFields = getAllFields(clazz);
|
||||
try {
|
||||
Class<?> clazz = item.getClass();
|
||||
List<Field> fields = getCachedFields(clazz);
|
||||
|
||||
for (Field field : allFields) {
|
||||
if (java.lang.reflect.Modifier.isStatic(field.getModifiers()) ||
|
||||
java.lang.reflect.Modifier.isFinal(field.getModifiers())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
field.setAccessible(true);
|
||||
Object fieldValue = field.get(item);
|
||||
String fieldName = field.getName();
|
||||
|
||||
// message 필드는 제외 (이미 header, body로 분리됨)
|
||||
if ("message".equals(fieldName)) {
|
||||
for (Field field : fields) {
|
||||
if (shouldSkipField(field)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (fieldValue instanceof Map) {
|
||||
// Map 필드를 펼치기
|
||||
Map<String, Object> nestedMap = (Map<String, Object>) fieldValue;
|
||||
flattenMap(nestedMap, fieldName, flatMap);
|
||||
} else if (fieldValue != null) {
|
||||
// 일반 필드는 그대로 추가
|
||||
flatMap.put(fieldName, fieldValue);
|
||||
field.setAccessible(true);
|
||||
Object value = field.get(item);
|
||||
String fieldName = field.getName();
|
||||
|
||||
if (value == null) {
|
||||
result.put(fieldName, null);
|
||||
continue;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// 접근할 수 없는 필드는 무시
|
||||
|
||||
// Map 타입 처리
|
||||
if (value instanceof Map) {
|
||||
Map<String, Object> mapValue = (Map<String, Object>) value;
|
||||
flattenMapOptimized(mapValue, fieldName, result);
|
||||
}
|
||||
// Collection 타입 처리
|
||||
else if (value instanceof Collection) {
|
||||
Collection<?> collection = (Collection<?>) value;
|
||||
handleCollectionField(collection, fieldName, result);
|
||||
}
|
||||
// 배열 타입 처리
|
||||
else if (value.getClass().isArray()) {
|
||||
handleArrayField(value, fieldName, result);
|
||||
}
|
||||
// 중첩 객체 처리 (기본 타입이 아닌 경우)
|
||||
else if (isComplexObject(value)) {
|
||||
Map<String, Object> nestedMap = flattenObjectToMap(value);
|
||||
// 중첩 객체의 필드들을 상위 필드명과 함께 펼치기
|
||||
for (Map.Entry<String, Object> entry : nestedMap.entrySet()) {
|
||||
result.put(fieldName + "." + entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
// 기본 타입 및 단순 객체
|
||||
else {
|
||||
result.put(fieldName, value);
|
||||
}
|
||||
}
|
||||
|
||||
} catch (IllegalAccessException e) {
|
||||
log.error("Error accessing field during object flattening", e);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private void handleCollectionField(Collection<?> collection, String fieldName, Map<String, Object> result) {
|
||||
if (collection.isEmpty()) {
|
||||
result.put(fieldName, "[]");
|
||||
return;
|
||||
}
|
||||
|
||||
int index = 0;
|
||||
for (Object item : collection) {
|
||||
if (item == null) {
|
||||
result.put(fieldName + "[" + index + "]", null);
|
||||
} else if (item instanceof Map) {
|
||||
Map<String, Object> mapItem = (Map<String, Object>) item;
|
||||
flattenMapOptimized(mapItem, fieldName + "[" + index + "]", result);
|
||||
} else if (isComplexObject(item)) {
|
||||
Map<String, Object> nestedMap = flattenObjectToMap(item);
|
||||
for (Map.Entry<String, Object> entry : nestedMap.entrySet()) {
|
||||
result.put(fieldName + "[" + index + "]." + entry.getKey(), entry.getValue());
|
||||
}
|
||||
} else {
|
||||
result.put(fieldName + "[" + index + "]", item);
|
||||
}
|
||||
index++;
|
||||
|
||||
// 너무 많은 아이템이 있으면 제한 (성능상 이유)
|
||||
if (index >= 100) {
|
||||
result.put(fieldName + "[...]", "더 많은 항목이 있음 (생략됨)");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void handleArrayField(Object arrayValue, String fieldName, Map<String, Object> result) {
|
||||
int length = java.lang.reflect.Array.getLength(arrayValue);
|
||||
|
||||
if (length == 0) {
|
||||
result.put(fieldName, "[]");
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < Math.min(length, 100); i++) { // 최대 100개까지만 처리
|
||||
Object item = java.lang.reflect.Array.get(arrayValue, i);
|
||||
|
||||
if (item == null) {
|
||||
result.put(fieldName + "[" + i + "]", null);
|
||||
} else if (item instanceof Map) {
|
||||
Map<String, Object> mapItem = (Map<String, Object>) item;
|
||||
flattenMapOptimized(mapItem, fieldName + "[" + i + "]", result);
|
||||
} else if (isComplexObject(item)) {
|
||||
Map<String, Object> nestedMap = flattenObjectToMap(item);
|
||||
for (Map.Entry<String, Object> entry : nestedMap.entrySet()) {
|
||||
result.put(fieldName + "[" + i + "]." + entry.getKey(), entry.getValue());
|
||||
}
|
||||
} else {
|
||||
result.put(fieldName + "[" + i + "]", item);
|
||||
}
|
||||
}
|
||||
|
||||
return flatMap;
|
||||
if (length > 100) {
|
||||
result.put(fieldName + "[...]", "더 많은 항목이 있음 (생략됨)");
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isComplexObject(Object value) {
|
||||
if (value == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Class<?> clazz = value.getClass();
|
||||
|
||||
// 기본 타입들
|
||||
if (clazz.isPrimitive()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 래퍼 타입들과 자주 사용되는 타입들
|
||||
if (clazz == String.class ||
|
||||
clazz == Boolean.class ||
|
||||
clazz == Integer.class ||
|
||||
clazz == Long.class ||
|
||||
clazz == Double.class ||
|
||||
clazz == Float.class ||
|
||||
clazz == Short.class ||
|
||||
clazz == Byte.class ||
|
||||
clazz == Character.class ||
|
||||
java.util.Date.class.isAssignableFrom(clazz) ||
|
||||
java.time.temporal.Temporal.class.isAssignableFrom(clazz)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Enum 타입
|
||||
if (clazz.isEnum()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// java.* 패키지의 클래스들은 대부분 기본 타입으로 취급
|
||||
if (clazz.getName().startsWith("java.")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -45,21 +45,23 @@ public class HistoryService {
|
||||
HistoryRequest historyRequest = new HistoryRequest();
|
||||
historyRequest.setStartDt(startDt);
|
||||
historyRequest.setEndDt(endDt);
|
||||
if(searchType.equals("NAME")){
|
||||
Optional<Admin> admin = adminMapper.findByEmail(searchData);
|
||||
if(admin.isPresent()){
|
||||
if(searchData != null && !searchData.isEmpty()) {
|
||||
if (searchType.equals("NAME")) {
|
||||
Optional<Admin> admin = adminMapper.findByEmail(searchData);
|
||||
if (admin.isPresent()) {
|
||||
historyRequest.setUserMail(searchData);
|
||||
} else {
|
||||
return HistoryResponse.builder()
|
||||
.resultData(HistoryResponse.ResultData.builder()
|
||||
.message(ErrorCode.NOT_USER.toString())
|
||||
.build())
|
||||
.status(CommonCode.ERROR.getHttpStatus())
|
||||
.result(CommonCode.ERROR.getResult())
|
||||
.build();
|
||||
}
|
||||
} else {
|
||||
historyRequest.setUserMail(searchData);
|
||||
}else{
|
||||
return HistoryResponse.builder()
|
||||
.resultData(HistoryResponse.ResultData.builder()
|
||||
.message(ErrorCode.NOT_USER.toString())
|
||||
.build())
|
||||
.status(CommonCode.ERROR.getHttpStatus())
|
||||
.result(CommonCode.ERROR.getResult())
|
||||
.build();
|
||||
}
|
||||
}else{
|
||||
historyRequest.setUserMail(searchData);
|
||||
}
|
||||
|
||||
List<BusinessLog> logList = historyLogService.loadHistoryData(historyRequest, BusinessLog.class);
|
||||
@@ -67,6 +69,8 @@ public class HistoryService {
|
||||
return HistoryResponse.builder()
|
||||
.resultData(HistoryResponse.ResultData.builder()
|
||||
.list(logList)
|
||||
.total(logList.size())
|
||||
.totalAll(logList.size())
|
||||
.build())
|
||||
.status(CommonCode.SUCCESS.getHttpStatus())
|
||||
.result(CommonCode.SUCCESS.getResult())
|
||||
|
||||
@@ -56,7 +56,7 @@ public class LogService {
|
||||
int size = logGenericRequest.getPageSize();
|
||||
|
||||
LocalDateTime startDt = logGenericRequest.getStartDt().plusHours(9);
|
||||
LocalDateTime endDt = logGenericRequest.getEndDt().plusHours(9).plusDays(1);
|
||||
LocalDateTime endDt = logGenericRequest.getEndDt().plusHours(9);
|
||||
logGenericRequest.setStartDt(startDt);
|
||||
logGenericRequest.setEndDt(endDt);
|
||||
|
||||
@@ -270,7 +270,7 @@ public class LogService {
|
||||
excelService.generateExcelToResponse(
|
||||
response,
|
||||
excelList,
|
||||
"비즈니스 로그 데이터",
|
||||
"Business Log Data",
|
||||
"sheet1",
|
||||
taskId
|
||||
);
|
||||
@@ -416,7 +416,7 @@ public class LogService {
|
||||
excelService.generateExcelToResponse(
|
||||
response,
|
||||
currencyList,
|
||||
"재화 지표 데이터",
|
||||
"Currency Index Data",
|
||||
"sheet1",
|
||||
taskId
|
||||
);
|
||||
@@ -520,7 +520,7 @@ public class LogService {
|
||||
excelService.generateExcelToResponse(
|
||||
response,
|
||||
currencyLogList,
|
||||
"게임 재화 로그 데이터",
|
||||
"Game Currency Log Data",
|
||||
"sheet1",
|
||||
taskId
|
||||
);
|
||||
@@ -537,6 +537,7 @@ public class LogService {
|
||||
String searchType = requestParams.get("search_type");
|
||||
String searchData = requestParams.get("search_data");
|
||||
String tranId = requestParams.get("tran_id");
|
||||
String itemId = requestParams.get("item_id");
|
||||
String logAction = requestParams.get("log_action");
|
||||
String itemLargeType = requestParams.get("item_large_type");
|
||||
String itemSmallType = requestParams.get("item_small_type");
|
||||
@@ -550,6 +551,7 @@ public class LogService {
|
||||
searchType,
|
||||
searchData,
|
||||
tranId,
|
||||
itemId,
|
||||
logAction,
|
||||
itemLargeType,
|
||||
itemSmallType,
|
||||
@@ -593,6 +595,7 @@ public class LogService {
|
||||
logGameRequest.getSearchType().toString(),
|
||||
logGameRequest.getSearchData(),
|
||||
logGameRequest.getTranId(),
|
||||
logGameRequest.getItemId(),
|
||||
logGameRequest.getLogAction().name(),
|
||||
logGameRequest.getItemTypeLarge(),
|
||||
logGameRequest.getItemTypeSmall(),
|
||||
@@ -627,7 +630,7 @@ public class LogService {
|
||||
excelService.generateExcelToResponse(
|
||||
response,
|
||||
currencyLogList,
|
||||
"게임 아이템 로그 데이터",
|
||||
"Game Item Log Data",
|
||||
"sheet1",
|
||||
taskId
|
||||
);
|
||||
@@ -652,6 +655,7 @@ public class LogService {
|
||||
String orderBy = requestParams.get("orderby");
|
||||
int pageNo = Integer.parseInt(requestParams.get("page_no"));
|
||||
int pageSize = Integer.parseInt(requestParams.get("page_size"));
|
||||
|
||||
MongoPageResult<CurrencyItemLogInfo> result = indicatorsCurrencyService.getCurrencyItemLogData(
|
||||
searchType,
|
||||
searchData,
|
||||
@@ -667,6 +671,19 @@ public class LogService {
|
||||
CurrencyItemLogInfo.class
|
||||
);
|
||||
|
||||
Set<String> tranIds = result.getItems().stream()
|
||||
.map(CurrencyItemLogInfo::getTranId)
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
Map<String, String> items = indicatorsItemService.getCurrencyItemLogData(tranIds, startDt.toString().substring(0, 10), endDt.toString().substring(0, 10));
|
||||
|
||||
result.getItems().forEach(item -> {
|
||||
String itemTranId = item.getTranId();
|
||||
String itemIDs = items.getOrDefault(itemTranId, "");
|
||||
|
||||
item.setItemIDs(itemIDs);
|
||||
});
|
||||
|
||||
List<CurrencyItemLogInfo> currencyItemLogList = result.getItems();
|
||||
int totalCount = result.getTotalCount();
|
||||
|
||||
@@ -708,6 +725,19 @@ public class LogService {
|
||||
logGameRequest.getPageSize(),
|
||||
CurrencyItemLogInfo.class
|
||||
);
|
||||
|
||||
Set<String> tranIds = result.getItems().stream()
|
||||
.map(CurrencyItemLogInfo::getTranId)
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
Map<String, String> items = indicatorsItemService.getCurrencyItemLogData(tranIds, startDt.toString().substring(0, 10), endDt.toString().substring(0, 10));
|
||||
|
||||
result.getItems().forEach(item -> {
|
||||
String itemTranId = item.getTranId();
|
||||
String itemIDs = items.getOrDefault(itemTranId, "");
|
||||
|
||||
item.setItemIDs(itemIDs);
|
||||
});
|
||||
progressTracker.updateProgress(taskId, 20, 100, "데이터 생성완료");
|
||||
}catch(UncategorizedMongoDbException e){
|
||||
if (e.getMessage().contains("Sort exceeded memory limit")) {
|
||||
@@ -731,7 +761,7 @@ public class LogService {
|
||||
excelService.generateExcelToResponse(
|
||||
response,
|
||||
currencyLogList,
|
||||
"게임 재화(아이템) 로그 데이터",
|
||||
"Game CurrencyItem Log Data",
|
||||
"sheet1",
|
||||
taskId
|
||||
);
|
||||
@@ -823,7 +853,7 @@ public class LogService {
|
||||
excelService.generateExcelToResponse(
|
||||
response,
|
||||
logList,
|
||||
"유저 생성 로그 데이터",
|
||||
"User Create Log Data",
|
||||
"sheet1",
|
||||
taskId
|
||||
);
|
||||
@@ -918,7 +948,7 @@ public class LogService {
|
||||
excelService.generateExcelToResponse(
|
||||
response,
|
||||
logList,
|
||||
"유저 로그인 로그 데이터",
|
||||
"User Login Log Data",
|
||||
"sheet1",
|
||||
taskId
|
||||
);
|
||||
@@ -1009,7 +1039,7 @@ public class LogService {
|
||||
excelService.generateExcelToResponse(
|
||||
response,
|
||||
logList,
|
||||
"유저 스냅샷 로그 데이터",
|
||||
"User Snapshot Log Data",
|
||||
"sheet1",
|
||||
taskId
|
||||
);
|
||||
|
||||
@@ -0,0 +1,559 @@
|
||||
package com.caliverse.admin.domain.service;
|
||||
|
||||
import com.caliverse.admin.domain.datacomponent.MetaDataHandler;
|
||||
import com.caliverse.admin.domain.entity.*;
|
||||
import com.caliverse.admin.domain.entity.excel.ExcelBusinessLog;
|
||||
import com.caliverse.admin.domain.entity.log.GenericLog;
|
||||
import com.caliverse.admin.domain.entity.metadata.*;
|
||||
import com.caliverse.admin.domain.request.LogGenericRequest;
|
||||
import com.caliverse.admin.domain.response.BattleEventResponse;
|
||||
import com.caliverse.admin.domain.response.DictionaryResponse;
|
||||
import com.caliverse.admin.global.common.annotation.RequestLog;
|
||||
import com.caliverse.admin.global.common.code.CommonCode;
|
||||
import com.caliverse.admin.global.common.code.ErrorCode;
|
||||
import com.caliverse.admin.global.common.exception.RestApiException;
|
||||
import com.caliverse.admin.global.component.tracker.ExcelProgressTracker;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.mongodb.UncategorizedMongoDbException;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class MetaDataService {
|
||||
|
||||
@Autowired
|
||||
private MetaDataHandler metaDataHandler;
|
||||
private final ExcelService excelService;
|
||||
private final ExcelProgressTracker progressTracker;
|
||||
|
||||
//브랜드 데이터
|
||||
public DictionaryResponse getBrandList(){
|
||||
|
||||
List<MetaBrandData> list = metaDataHandler.getMetaBrandListData();
|
||||
|
||||
List<MetaBrandData> items = list.stream()
|
||||
.peek(data -> {
|
||||
String name = metaDataHandler.getTextStringData(data.getBrandName());
|
||||
data.setBrandDesc(name);
|
||||
}).toList();
|
||||
|
||||
return DictionaryResponse.builder()
|
||||
.status(CommonCode.SUCCESS.getHttpStatus())
|
||||
.result(CommonCode.SUCCESS.getResult())
|
||||
.resultData(DictionaryResponse.ResultData.builder()
|
||||
.brandList(items)
|
||||
.build()
|
||||
)
|
||||
.build();
|
||||
}
|
||||
|
||||
//랭킹 데이터
|
||||
public DictionaryResponse getRankingList(){
|
||||
|
||||
List<MetaRankingData> list = metaDataHandler.getMetaRankingListData();
|
||||
|
||||
return DictionaryResponse.builder()
|
||||
.status(CommonCode.SUCCESS.getHttpStatus())
|
||||
.result(CommonCode.SUCCESS.getResult())
|
||||
.resultData(DictionaryResponse.ResultData.builder()
|
||||
.rankingList(list)
|
||||
.build()
|
||||
)
|
||||
.build();
|
||||
}
|
||||
|
||||
//전투시스템 설정 데이터
|
||||
public DictionaryResponse getBattleConfigList(){
|
||||
|
||||
List<MetaBattleConfigData> list = metaDataHandler.getMetaBattleConfigsListData();
|
||||
|
||||
return DictionaryResponse.builder()
|
||||
.status(CommonCode.SUCCESS.getHttpStatus())
|
||||
.result(CommonCode.SUCCESS.getResult())
|
||||
.resultData(DictionaryResponse.ResultData.builder()
|
||||
.battleConfigList(list)
|
||||
.build()
|
||||
)
|
||||
.build();
|
||||
}
|
||||
|
||||
//전투시스템 보상 데이터
|
||||
public DictionaryResponse getBattleRewardList(){
|
||||
|
||||
List<MetaBattleRewardData> list = metaDataHandler.getMetaBattleRewardsListData();
|
||||
|
||||
return DictionaryResponse.builder()
|
||||
.status(CommonCode.SUCCESS.getHttpStatus())
|
||||
.result(CommonCode.SUCCESS.getResult())
|
||||
.resultData(DictionaryResponse.ResultData.builder()
|
||||
.battleRewardList(list)
|
||||
.build()
|
||||
)
|
||||
.build();
|
||||
}
|
||||
|
||||
//전투시스템 게임모드 데이터
|
||||
public DictionaryResponse getGameModeList(){
|
||||
|
||||
List<MetaGameModeData> list = metaDataHandler.getMetaGameModeListData();
|
||||
|
||||
return DictionaryResponse.builder()
|
||||
.status(CommonCode.SUCCESS.getHttpStatus())
|
||||
.result(CommonCode.SUCCESS.getResult())
|
||||
.resultData(DictionaryResponse.ResultData.builder()
|
||||
.gameModeList(list)
|
||||
.build()
|
||||
)
|
||||
.build();
|
||||
}
|
||||
|
||||
//이벤트 액션 데이터
|
||||
public DictionaryResponse getEventActionList(){
|
||||
|
||||
List<MetaEventActionScoreData> list = metaDataHandler.getMetaEventActionScoreListData();
|
||||
|
||||
return DictionaryResponse.builder()
|
||||
.status(CommonCode.SUCCESS.getHttpStatus())
|
||||
.result(CommonCode.SUCCESS.getResult())
|
||||
.resultData(DictionaryResponse.ResultData.builder()
|
||||
.eventActionList(list)
|
||||
.build()
|
||||
)
|
||||
.build();
|
||||
}
|
||||
|
||||
//아이템 백과사전
|
||||
@RequestLog
|
||||
public DictionaryResponse getItemDictList(@RequestParam Map<String, String> requestParam){
|
||||
String searchType = requestParam.get("search_type");
|
||||
String searchData = requestParam.get("search_data").trim();
|
||||
String largeType = requestParam.get("large_type");
|
||||
String smallType = requestParam.get("small_type");
|
||||
String brand = requestParam.get("brand");
|
||||
String gender = requestParam.get("gender");
|
||||
String orderBy = requestParam.get("orderby");
|
||||
String pageNo = requestParam.get("page_no");
|
||||
String pageSize = requestParam.get("page_size");
|
||||
|
||||
List<MetaItemData> items = metaDataHandler.getMetaItemListData();
|
||||
|
||||
List<ItemDict> itemDictListKo = createItemDictList(items, LANGUAGETYPE.KO, searchType, searchData, largeType, smallType, brand, gender);
|
||||
List<ItemDict> itemDictListEn = createItemDictList(items, LANGUAGETYPE.EN, searchType, searchData, largeType, smallType, brand, gender);
|
||||
List<ItemDict> itemDictListJa = createItemDictList(items, LANGUAGETYPE.JA, searchType, searchData, largeType, smallType, brand, gender);
|
||||
|
||||
int totalAll = itemDictListKo.size();
|
||||
|
||||
if(orderBy != null && !orderBy.isEmpty()) {
|
||||
Comparator<ItemDict> comparator = null;
|
||||
|
||||
if(orderBy.equalsIgnoreCase("ASC")) {
|
||||
comparator = Comparator.comparing(ItemDict::getItemId);
|
||||
} else if(orderBy.equalsIgnoreCase("DESC")) {
|
||||
comparator = Comparator.comparing(ItemDict::getItemId).reversed();
|
||||
}
|
||||
|
||||
if(comparator != null) {
|
||||
itemDictListKo = itemDictListKo.stream().sorted(comparator).toList();
|
||||
itemDictListEn = itemDictListEn.stream().sorted(comparator).toList();
|
||||
itemDictListJa = itemDictListJa.stream().sorted(comparator).toList();
|
||||
}
|
||||
}
|
||||
|
||||
// 페이징 처리
|
||||
int currentPageNo = 1;
|
||||
int currentPageSize = 10; // 기본값
|
||||
|
||||
if(pageNo != null && !pageNo.isEmpty()) {
|
||||
try {
|
||||
currentPageNo = Integer.parseInt(pageNo);
|
||||
} catch(NumberFormatException e) {
|
||||
currentPageNo = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if(pageSize != null && !pageSize.isEmpty()) {
|
||||
try {
|
||||
currentPageSize = Integer.parseInt(pageSize);
|
||||
} catch(NumberFormatException e) {
|
||||
currentPageSize = 10;
|
||||
}
|
||||
}
|
||||
|
||||
// offset 계산
|
||||
int offset = (currentPageNo - 1) * currentPageSize;
|
||||
|
||||
// 페이징 적용
|
||||
List<ItemDict> pagedItemDictListKo = itemDictListKo.stream()
|
||||
.skip(offset)
|
||||
.limit(currentPageSize)
|
||||
.toList();
|
||||
|
||||
List<ItemDict> pagedItemDictListEn = itemDictListEn.stream()
|
||||
.skip(offset)
|
||||
.limit(currentPageSize)
|
||||
.toList();
|
||||
|
||||
List<ItemDict> pagedItemDictListJa = itemDictListJa.stream()
|
||||
.skip(offset)
|
||||
.limit(currentPageSize)
|
||||
.toList();
|
||||
|
||||
DictionaryResponse.ItemList itemTotalList = DictionaryResponse.ItemList.builder()
|
||||
.ko(pagedItemDictListKo)
|
||||
.en(pagedItemDictListEn)
|
||||
.ja(pagedItemDictListJa)
|
||||
.build();
|
||||
|
||||
|
||||
return DictionaryResponse.builder()
|
||||
.status(CommonCode.SUCCESS.getHttpStatus())
|
||||
.result(CommonCode.SUCCESS.getResult())
|
||||
.resultData(DictionaryResponse.ResultData.builder()
|
||||
.itemList(itemTotalList)
|
||||
.totalAll(totalAll)
|
||||
.total(pagedItemDictListKo.size())
|
||||
.pageNo(currentPageNo)
|
||||
.build()
|
||||
)
|
||||
.build();
|
||||
}
|
||||
|
||||
public void itemExcelExport(HttpServletResponse response, @RequestParam Map<String, String> requestParam){
|
||||
String searchType = requestParam.get("search_type");
|
||||
String searchData = requestParam.get("search_data").trim();
|
||||
String largeType = requestParam.get("large_type");
|
||||
String smallType = requestParam.get("small_type");
|
||||
String brand = requestParam.get("brand");
|
||||
String gender = requestParam.get("gender");
|
||||
String taskId = requestParam.get("task_id");
|
||||
String lang = requestParam.get("lang");
|
||||
|
||||
if(taskId == null || taskId.isEmpty() || taskId.equals("undefined")){
|
||||
log.error("itemExcelExport Excel Export taskId is null or empty");
|
||||
throw new RestApiException(CommonCode.ERROR.getHttpStatus(), ErrorCode.ERROR_EXCEL_DOWN.toString());
|
||||
}
|
||||
|
||||
LANGUAGETYPE languageType = LANGUAGETYPE.valueOf(lang.toUpperCase());
|
||||
|
||||
progressTracker.updateProgress(taskId, 5, 100, "엑셀 생성 준비 중...");
|
||||
|
||||
List<MetaItemData> items = metaDataHandler.getMetaItemListData();
|
||||
|
||||
List<ItemDict> itemDictList = createItemDictList(items, languageType, searchType, searchData, largeType, smallType, brand, gender);
|
||||
progressTracker.updateProgress(taskId, 30, 100, "데이터 생성완료");
|
||||
|
||||
try{
|
||||
excelService.generateExcelToResponse(
|
||||
response,
|
||||
itemDictList,
|
||||
"Item Dictionary Data",
|
||||
"sheet1",
|
||||
taskId
|
||||
);
|
||||
|
||||
}catch (Exception e){
|
||||
log.error("Excel Export Create Error", e);
|
||||
throw new RestApiException(CommonCode.ERROR.getHttpStatus(), ErrorCode.ERROR_EXCEL_DOWN.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private List<ItemDict> createItemDictList(List<MetaItemData> items, LANGUAGETYPE languageType,
|
||||
String searchType, String searchData, String largeType,
|
||||
String smallType, String brand, String gender) {
|
||||
return items.stream()
|
||||
.filter(data -> {
|
||||
boolean result = true;
|
||||
|
||||
if(!largeType.equals("ALL")){
|
||||
result = data.getLargeType().equals(largeType);
|
||||
}
|
||||
|
||||
if(!smallType.equals("ALL")){
|
||||
result = result && data.getSmallType().equals(smallType);
|
||||
}
|
||||
|
||||
if(!brand.equals("ALL")){
|
||||
result = result && data.getBrand().equals(Integer.valueOf(brand));
|
||||
}
|
||||
|
||||
if(!gender.equals("ALL")){
|
||||
result = result && data.getGender().equals(gender);
|
||||
}
|
||||
|
||||
return result;
|
||||
})
|
||||
.map(item -> {
|
||||
String buffName = metaDataHandler.getMetaBuffName(item.getBuffId());
|
||||
String brandName = metaDataHandler.getMetaBrandName(item.getBrand());
|
||||
String randomGroupAttribName = metaDataHandler.getMetaAttribData(item.getAttributeRandomGroupId());
|
||||
String itemSetName = metaDataHandler.getMetaItemSetName(item.getItemSetId());
|
||||
Integer gachaGroupId = metaDataHandler.getMetaGachaGroupId(item.getGachaGroupId());
|
||||
String webLink = metaDataHandler.getMetaWebLinkData(item.getProductLink(), languageType);
|
||||
String currencySellName = metaDataHandler.getMetaCurrencyName(item.getSellId());
|
||||
String currencyBuyName = metaDataHandler.getMetaCurrencyName(item.getBuyId());
|
||||
|
||||
ItemDict.Country country = ItemDict.Country.builder()
|
||||
.maxCount(item.getMaxCount())
|
||||
.stackMaxCount(item.getStackMaxCount())
|
||||
.build();
|
||||
|
||||
ItemDict.Attrib attrib = ItemDict.Attrib.builder()
|
||||
.rarity(item.getRarity())
|
||||
.defaultAttrib(item.getDefaultAttribute())
|
||||
.attribRandomGroup(randomGroupAttribName)
|
||||
.itemSet(metaDataHandler.getTextStringData(itemSetName, languageType))
|
||||
.buff(metaDataHandler.getTextStringData(buffName, languageType))
|
||||
.build();
|
||||
|
||||
ItemDict.Expire expire = ItemDict.Expire.builder()
|
||||
.expireType(item.getExpireType())
|
||||
.expireStartDt(item.getExpireFixedTermStart())
|
||||
.expireEndDt(item.getExpireFixedTermEnd())
|
||||
.expireTimeSec(item.getExpireTimeSec())
|
||||
.build();
|
||||
|
||||
ItemDict.Trade trade = ItemDict.Trade.builder()
|
||||
.userTradable(item.getIsUserTradable())
|
||||
.cartBuy(item.getIsCartNBuy())
|
||||
.throwable(item.getIsThrowable())
|
||||
.systemTradable(item.getIsSystemTradable())
|
||||
.build();
|
||||
|
||||
ItemDict.Etc etc = ItemDict.Etc.builder()
|
||||
.productLink(webLink)
|
||||
.propSmallType(item.getPropSmallType())
|
||||
.gachaGroupId(gachaGroupId)
|
||||
.ugqAction(item.getUgqAction())
|
||||
.linkedLand(item.getLinkedLand())
|
||||
.build();
|
||||
|
||||
return ItemDict.builder()
|
||||
.itemId(item.getItemId())
|
||||
.itemName(metaDataHandler.getTextStringData(item.getName(), languageType))
|
||||
.gender(item.getGender())
|
||||
.typeLarge(item.getLargeType())
|
||||
.typeSmall(item.getSmallType())
|
||||
.brand(metaDataHandler.getTextStringData(brandName, languageType))
|
||||
.sellType(metaDataHandler.getTextStringData(currencySellName, LANGUAGETYPE.KO))
|
||||
.sellPrice(item.getSellPrice())
|
||||
.buyType(metaDataHandler.getTextStringData(currencyBuyName, LANGUAGETYPE.KO))
|
||||
.buyPrice(item.getBuyPrice())
|
||||
.buyDiscountRate(item.getBuyDiscountRate())
|
||||
.country(country)
|
||||
.attrib(attrib)
|
||||
.expire(expire)
|
||||
.trade(trade)
|
||||
.etc(etc)
|
||||
.build();
|
||||
}).filter(data -> {
|
||||
boolean result = true;
|
||||
|
||||
if(!searchData.isEmpty()){
|
||||
if(searchType.equals("NAME")){
|
||||
result = data.getItemName().contains(searchData);
|
||||
}
|
||||
|
||||
if(searchType.equals("ID")){
|
||||
result = data.getItemId().toString().equals(searchData);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
//제작 백과사전
|
||||
@RequestLog
|
||||
public DictionaryResponse getCraftingDictList(@RequestParam Map<String, String> requestParam){
|
||||
String searchType = requestParam.get("search_type");
|
||||
String searchData = requestParam.get("search_data").trim();
|
||||
String smallType = requestParam.get("small_type");
|
||||
String recipeType = requestParam.get("recipe_type");
|
||||
String orderBy = requestParam.get("orderby");
|
||||
String pageNo = requestParam.get("page_no");
|
||||
String pageSize = requestParam.get("page_size");
|
||||
|
||||
List<MetaCraftingData> items = metaDataHandler.getMetaCraftingListData();
|
||||
|
||||
List<CraftingDict> craftDictListKo = createCraftingDictList(items, LANGUAGETYPE.KO, searchType, searchData, smallType, recipeType);
|
||||
List<CraftingDict> craftDictListEn = createCraftingDictList(items, LANGUAGETYPE.EN, searchType, searchData, smallType, recipeType);
|
||||
List<CraftingDict> craftDictListJa = createCraftingDictList(items, LANGUAGETYPE.JA, searchType, searchData, smallType, recipeType);
|
||||
|
||||
int totalAll = craftDictListKo.size();
|
||||
|
||||
if(orderBy != null && !orderBy.isEmpty()) {
|
||||
Comparator<CraftingDict> comparator = null;
|
||||
|
||||
if(orderBy.equalsIgnoreCase("ASC")) {
|
||||
comparator = Comparator.comparing(CraftingDict::getId);
|
||||
} else if(orderBy.equalsIgnoreCase("DESC")) {
|
||||
comparator = Comparator.comparing(CraftingDict::getId).reversed();
|
||||
}
|
||||
|
||||
if(comparator != null) {
|
||||
craftDictListKo = craftDictListKo.stream().sorted(comparator).toList();
|
||||
craftDictListEn = craftDictListEn.stream().sorted(comparator).toList();
|
||||
craftDictListJa = craftDictListJa.stream().sorted(comparator).toList();
|
||||
}
|
||||
}
|
||||
|
||||
// 페이징 처리
|
||||
int currentPageNo = 1;
|
||||
int currentPageSize = 10; // 기본값
|
||||
|
||||
if(pageNo != null && !pageNo.isEmpty()) {
|
||||
try {
|
||||
currentPageNo = Integer.parseInt(pageNo);
|
||||
} catch(NumberFormatException e) {
|
||||
currentPageNo = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if(pageSize != null && !pageSize.isEmpty()) {
|
||||
try {
|
||||
currentPageSize = Integer.parseInt(pageSize);
|
||||
} catch(NumberFormatException e) {
|
||||
currentPageSize = 10;
|
||||
}
|
||||
}
|
||||
|
||||
// offset 계산
|
||||
int offset = (currentPageNo - 1) * currentPageSize;
|
||||
|
||||
// 페이징 적용
|
||||
List<CraftingDict> pagedCraftingDictListKo = craftDictListKo.stream()
|
||||
.skip(offset)
|
||||
.limit(currentPageSize)
|
||||
.toList();
|
||||
|
||||
List<CraftingDict> pagedCraftingDictListEn = craftDictListEn.stream()
|
||||
.skip(offset)
|
||||
.limit(currentPageSize)
|
||||
.toList();
|
||||
|
||||
List<CraftingDict> pagedCraftingDictListJa = craftDictListJa.stream()
|
||||
.skip(offset)
|
||||
.limit(currentPageSize)
|
||||
.toList();
|
||||
|
||||
DictionaryResponse.CraftingList itemTotalList = DictionaryResponse.CraftingList.builder()
|
||||
.ko(pagedCraftingDictListKo)
|
||||
.en(pagedCraftingDictListEn)
|
||||
.ja(pagedCraftingDictListJa)
|
||||
.build();
|
||||
|
||||
|
||||
return DictionaryResponse.builder()
|
||||
.status(CommonCode.SUCCESS.getHttpStatus())
|
||||
.result(CommonCode.SUCCESS.getResult())
|
||||
.resultData(DictionaryResponse.ResultData.builder()
|
||||
.craftingList(itemTotalList)
|
||||
.totalAll(totalAll)
|
||||
.total(pagedCraftingDictListKo.size())
|
||||
.pageNo(currentPageNo)
|
||||
.build()
|
||||
)
|
||||
.build();
|
||||
}
|
||||
|
||||
public void craftExcelExport(HttpServletResponse response, @RequestParam Map<String, String> requestParam){
|
||||
String searchType = requestParam.get("search_type");
|
||||
String searchData = requestParam.get("search_data").trim();
|
||||
String smallType = requestParam.get("small_type");
|
||||
String recipeType = requestParam.get("recipe_type");
|
||||
String taskId = requestParam.get("task_id");
|
||||
String lang = requestParam.get("lang");
|
||||
|
||||
if(taskId == null || taskId.isEmpty() || taskId.equals("undefined")){
|
||||
log.error("craftExcelExport Excel Export taskId is null or empty");
|
||||
throw new RestApiException(CommonCode.ERROR.getHttpStatus(), ErrorCode.ERROR_EXCEL_DOWN.toString());
|
||||
}
|
||||
|
||||
LANGUAGETYPE languageType = LANGUAGETYPE.valueOf(lang.toUpperCase());
|
||||
|
||||
progressTracker.updateProgress(taskId, 5, 100, "엑셀 생성 준비 중...");
|
||||
|
||||
List<MetaCraftingData> items = metaDataHandler.getMetaCraftingListData();
|
||||
|
||||
List<CraftingDict> craftDictList = createCraftingDictList(items, languageType, searchType, searchData, smallType, recipeType);
|
||||
progressTracker.updateProgress(taskId, 30, 100, "데이터 생성완료");
|
||||
|
||||
try{
|
||||
excelService.generateExcelToResponse(
|
||||
response,
|
||||
craftDictList,
|
||||
"Crafting Dictionary Data",
|
||||
"sheet1",
|
||||
taskId
|
||||
);
|
||||
|
||||
}catch (Exception e){
|
||||
log.error("Excel Export Create Error", e);
|
||||
throw new RestApiException(CommonCode.ERROR.getHttpStatus(), ErrorCode.ERROR_EXCEL_DOWN.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private List<CraftingDict> createCraftingDictList(List<MetaCraftingData> items, LANGUAGETYPE languageType,
|
||||
String searchType, String searchData, String smallType, String recipeType) {
|
||||
return items.stream()
|
||||
.filter(data -> {
|
||||
boolean result = true;
|
||||
|
||||
if(!smallType.equals("ALL")){
|
||||
result = result && data.getPropSmallType().equals(smallType);
|
||||
}
|
||||
|
||||
if(!recipeType.equals("ALL")){
|
||||
result = result && data.getRecipeType().equals(recipeType);
|
||||
}
|
||||
|
||||
return result;
|
||||
})
|
||||
.map(item -> {
|
||||
String itemName = metaDataHandler.getMetaItemNameData(item.getCraftingItemId());
|
||||
|
||||
return CraftingDict.builder()
|
||||
.id(item.getId())
|
||||
.typeSmall(item.getPropSmallType())
|
||||
.itemId(item.getCraftingItemId())
|
||||
.itemName(metaDataHandler.getTextStringData(itemName, languageType))
|
||||
.itemValue(item.getCraftingItemValue())
|
||||
.recipeType(item.getRecipeType())
|
||||
.recipeId(item.getRecipeItemId())
|
||||
.material(item.getMaterials().toString())
|
||||
.attribute(item.getAttributes().toString())
|
||||
.craftingTime(item.getCraftingTime())
|
||||
.beaconReduceTime(item.getBeaconReduceTime())
|
||||
.beaconBonusItemId(item.getBeaconBonusItemId())
|
||||
.maxCraftLimit(item.getMaxCraftLimit())
|
||||
.build();
|
||||
}).filter(data -> {
|
||||
boolean result = true;
|
||||
|
||||
if(!searchData.isEmpty()){
|
||||
if(searchType.equals("NAME")){
|
||||
result = data.getItemName().contains(searchData);
|
||||
}
|
||||
|
||||
if(searchType.equals("ID")){
|
||||
result = data.getItemId().toString().equals(searchData);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,210 @@
|
||||
package com.caliverse.admin.domain.service;
|
||||
|
||||
import com.caliverse.admin.domain.RabbitMq.MessageHandlerService;
|
||||
import com.caliverse.admin.domain.dao.admin.RankMapper;
|
||||
import com.caliverse.admin.domain.datacomponent.MetaDataHandler;
|
||||
import com.caliverse.admin.domain.entity.RankingSchedule;
|
||||
import com.caliverse.admin.domain.entity.WorldEvent;
|
||||
import com.caliverse.admin.domain.entity.log.LogAction;
|
||||
import com.caliverse.admin.domain.request.RankRequest;
|
||||
import com.caliverse.admin.domain.request.WorldEventRequest;
|
||||
import com.caliverse.admin.domain.response.RankResponse;
|
||||
import com.caliverse.admin.domain.response.RankResponse;
|
||||
import com.caliverse.admin.dynamodb.service.DynamodbBattleEventService;
|
||||
import com.caliverse.admin.dynamodb.service.DynamodbRankService;
|
||||
import com.caliverse.admin.global.common.annotation.BusinessProcess;
|
||||
import com.caliverse.admin.global.common.annotation.RequestLog;
|
||||
import com.caliverse.admin.global.common.code.CommonCode;
|
||||
import com.caliverse.admin.global.common.code.ErrorCode;
|
||||
import com.caliverse.admin.global.common.code.SuccessCode;
|
||||
import com.caliverse.admin.global.common.exception.RestApiException;
|
||||
import com.caliverse.admin.global.common.utils.CommonUtils;
|
||||
import com.caliverse.admin.mongodb.service.MysqlHistoryLogService;
|
||||
import com.caliverse.admin.redis.service.RedisUserInfoService;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class RankService {
|
||||
|
||||
private final RankMapper rankMapper;
|
||||
private final MessageHandlerService messageHandlerService;
|
||||
private final RedisUserInfoService redisUserInfoService;
|
||||
private final DynamodbRankService dynamodbRankService;
|
||||
|
||||
@RequestLog
|
||||
public RankResponse getList(Map requestParam){
|
||||
|
||||
//페이징 처리
|
||||
requestParam = CommonUtils.pageSetting(requestParam);
|
||||
|
||||
List<RankingSchedule> list = rankMapper.getRankingScheduleList(requestParam);
|
||||
|
||||
return RankResponse.builder()
|
||||
.status(CommonCode.SUCCESS.getHttpStatus())
|
||||
.result(CommonCode.SUCCESS.getResult())
|
||||
.resultData(RankResponse.ResultData.builder()
|
||||
.rankingScheduleList(list)
|
||||
.total(rankMapper.getTotal())
|
||||
.totalAll(list.size())
|
||||
.pageNo(requestParam.get("page_no")!=null?
|
||||
Integer.parseInt(requestParam.get("page_no").toString()):1)
|
||||
.build()
|
||||
)
|
||||
.build();
|
||||
}
|
||||
|
||||
@RequestLog
|
||||
public RankResponse getDetail(Long id){
|
||||
RankingSchedule rankingSchedule = rankMapper.getRankingScheduleDetail(id);
|
||||
|
||||
return RankResponse.builder()
|
||||
.status(CommonCode.SUCCESS.getHttpStatus())
|
||||
.result(CommonCode.SUCCESS.getResult())
|
||||
.resultData(RankResponse.ResultData.builder()
|
||||
.rankingSchedule(rankingSchedule)
|
||||
.build())
|
||||
.build();
|
||||
}
|
||||
|
||||
@BusinessProcess(action = LogAction.RANKING_SCHEDULE)
|
||||
@Transactional(transactionManager = "transactionManager")
|
||||
@RequestLog
|
||||
public RankResponse postRankingSchedule(RankRequest rankRequest){
|
||||
rankRequest.setCreateBy(CommonUtils.getAdmin().getId());
|
||||
|
||||
rankRequest.setGuid(CommonUtils.getSimpleCreateGuId());
|
||||
|
||||
rankMapper.postRankingSchedule(rankRequest);
|
||||
|
||||
long schedule_id = rankRequest.getId();
|
||||
HashMap<String,String> map = new HashMap<>();
|
||||
map.put("id",String.valueOf(schedule_id));
|
||||
|
||||
log.info("postRankingSchedule Insert Ranking Schedule id: {}", rankRequest.getId());
|
||||
|
||||
RankingSchedule rankingSchedule = rankMapper.getRankingScheduleDetail(rankRequest.getId());
|
||||
|
||||
if(redisUserInfoService.getAllServerList().isEmpty()){
|
||||
throw new RestApiException(CommonCode.ERROR.getHttpStatus(), ErrorCode.NOT_FOUND_SERVER.getMessage());
|
||||
}
|
||||
|
||||
dynamodbRankService.insertRankingSchedule(rankRequest);
|
||||
|
||||
notifyGameServers("postRankingSchedule", null);
|
||||
|
||||
return RankResponse.builder()
|
||||
.status(CommonCode.SUCCESS.getHttpStatus())
|
||||
.result(CommonCode.SUCCESS.getResult())
|
||||
.resultData(RankResponse.ResultData.builder()
|
||||
.message(SuccessCode.SAVE.getMessage())
|
||||
.build())
|
||||
.build();
|
||||
}
|
||||
|
||||
@BusinessProcess(action = LogAction.RANKING_SCHEDULE)
|
||||
@Transactional(transactionManager = "transactionManager")
|
||||
@RequestLog
|
||||
public RankResponse updateRankingSchedule(Long id, RankRequest rankRequest) {
|
||||
rankRequest.setId(id);
|
||||
rankRequest.setUpdateBy(CommonUtils.getAdmin().getId());
|
||||
rankRequest.setUpdateDt(LocalDateTime.now());
|
||||
|
||||
Long schedule_id = rankRequest.getId();
|
||||
RankingSchedule before_info = rankMapper.getRankingScheduleDetail(schedule_id);
|
||||
|
||||
rankMapper.updateRankingSchedule(rankRequest);
|
||||
|
||||
log.info("updateRankingSchedule Update Ranking Schedule Complete: {}", rankRequest.getId());
|
||||
|
||||
RankingSchedule after_info = rankMapper.getRankingScheduleDetail(schedule_id);
|
||||
|
||||
if(redisUserInfoService.getAllServerList().isEmpty()){
|
||||
throw new RestApiException(CommonCode.ERROR.getHttpStatus(), ErrorCode.NOT_FOUND_SERVER.getMessage());
|
||||
}
|
||||
|
||||
dynamodbRankService.updateRankingSchedule(rankRequest);
|
||||
|
||||
notifyGameServers("updateRankingSchedule", null);
|
||||
|
||||
return RankResponse.builder()
|
||||
.status(CommonCode.SUCCESS.getHttpStatus())
|
||||
.result(CommonCode.SUCCESS.getResult())
|
||||
.resultData(RankResponse.ResultData.builder()
|
||||
.message(SuccessCode.UPDATE.getMessage())
|
||||
.build())
|
||||
.build();
|
||||
}
|
||||
|
||||
@BusinessProcess(action = LogAction.RANKING_SCHEDULE)
|
||||
@Transactional(transactionManager = "transactionManager")
|
||||
@RequestLog
|
||||
public RankResponse deleteRankingSchedule(Long id){
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
map.put("id",id);
|
||||
|
||||
RankingSchedule info = rankMapper.getRankingScheduleDetail(id);
|
||||
|
||||
if(info.getStartDt().isBefore(LocalDateTime.now())){
|
||||
return RankResponse.builder()
|
||||
.status(CommonCode.ERROR.getHttpStatus())
|
||||
.result(CommonCode.ERROR.getResult())
|
||||
.resultData(RankResponse.ResultData.builder()
|
||||
.message(ErrorCode.START_DATE_OVER.getMessage())
|
||||
.build())
|
||||
.build();
|
||||
}
|
||||
|
||||
rankMapper.deleteRankingSchedule(map);
|
||||
|
||||
log.info("deleteRankingSchedule Delete Ranking Schedule Complete id: {}", id);
|
||||
|
||||
if(redisUserInfoService.getAllServerList().isEmpty()){
|
||||
throw new RestApiException(CommonCode.ERROR.getHttpStatus(), ErrorCode.NOT_FOUND_SERVER.getMessage());
|
||||
}
|
||||
|
||||
dynamodbRankService.deleteRankingSchedule(info);
|
||||
|
||||
notifyGameServers("deleteRankingSchedule", null);
|
||||
|
||||
return RankResponse.builder()
|
||||
.status(CommonCode.SUCCESS.getHttpStatus())
|
||||
.result(CommonCode.SUCCESS.getResult())
|
||||
.resultData(RankResponse.ResultData.builder()
|
||||
.message(SuccessCode.DELETE.getMessage())
|
||||
.build())
|
||||
.build();
|
||||
}
|
||||
|
||||
private void notifyGameServers(String methodName, Runnable rollbackFunction) {
|
||||
// 운영DB 데이터 추가됐다고 게임서버 알림
|
||||
List<String> serverList = redisUserInfoService.getAllServerList();
|
||||
if(serverList.isEmpty()){
|
||||
log.error("{} serverList is empty", methodName);
|
||||
if (rollbackFunction != null) {
|
||||
rollbackFunction.run();
|
||||
}
|
||||
throw new RestApiException(CommonCode.ERROR.getHttpStatus(), ErrorCode.NOT_FOUND_SERVER.getMessage());
|
||||
}
|
||||
|
||||
try{
|
||||
serverList.forEach(messageHandlerService::sendRankingScheduleMessage);
|
||||
} catch (Exception e) {
|
||||
log.error("{} messageHandlerService error: {}", methodName, e.getMessage(), e);
|
||||
if (rollbackFunction != null) {
|
||||
rollbackFunction.run();
|
||||
}
|
||||
throw new RestApiException(CommonCode.ERROR.getHttpStatus(), ErrorCode.MESSAGE_SEND_FAIL.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
package com.caliverse.admin.domain.service;
|
||||
|
||||
import com.caliverse.admin.domain.dao.admin.EventMapper;
|
||||
import com.caliverse.admin.domain.dao.admin.RewardEventMapper;
|
||||
import com.caliverse.admin.domain.datacomponent.MetaDataHandler;
|
||||
import com.caliverse.admin.domain.entity.*;
|
||||
import com.caliverse.admin.domain.entity.log.LogAction;
|
||||
import com.caliverse.admin.domain.entity.log.LogStatus;
|
||||
import com.caliverse.admin.domain.request.EventRequest;
|
||||
import com.caliverse.admin.domain.response.EventResponse;
|
||||
import com.caliverse.admin.domain.request.RewardEventRequest;
|
||||
import com.caliverse.admin.domain.response.RewardEventResponse;
|
||||
import com.caliverse.admin.dynamodb.service.DynamodbMailService;
|
||||
import com.caliverse.admin.dynamodb.service.DynamodbService;
|
||||
import com.caliverse.admin.global.common.annotation.BusinessProcess;
|
||||
@@ -20,7 +20,6 @@ import com.caliverse.admin.global.component.manager.BusinessProcessIdManager;
|
||||
import com.caliverse.admin.mongodb.service.MysqlHistoryLogService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.json.JSONObject;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.transaction.support.TransactionSynchronization;
|
||||
@@ -34,30 +33,30 @@ import java.util.Map;
|
||||
@Service
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
public class EventService {
|
||||
public class RewardEventService {
|
||||
private final DynamodbService dynamodbService;
|
||||
private final DynamodbMailService dynamodbMailService;
|
||||
|
||||
private final EventMapper eventMapper;
|
||||
private final RewardEventMapper rewardEventMapper;
|
||||
private final MetaDataHandler metaDataHandler;
|
||||
private final MysqlHistoryLogService mysqlHistoryLogService;
|
||||
private final BusinessProcessIdManager processIdManager;
|
||||
|
||||
@RequestLog
|
||||
public EventResponse getList(Map requestParam){
|
||||
public RewardEventResponse getList(Map requestParam){
|
||||
//페이징 처리
|
||||
requestParam = CommonUtils.pageSetting(requestParam);
|
||||
|
||||
List<Event> list = eventMapper.getEventList(requestParam);
|
||||
List<RewardEvent> list = rewardEventMapper.getEventList(requestParam);
|
||||
|
||||
int allCnt = eventMapper.getAllCnt(requestParam);
|
||||
int allCnt = rewardEventMapper.getAllCnt(requestParam);
|
||||
|
||||
return EventResponse.builder()
|
||||
return RewardEventResponse.builder()
|
||||
.status(CommonCode.SUCCESS.getHttpStatus())
|
||||
.result(CommonCode.SUCCESS.getResult())
|
||||
.resultData(EventResponse.ResultData.builder()
|
||||
.eventList(list)
|
||||
.total(eventMapper.getTotal())
|
||||
.resultData(RewardEventResponse.ResultData.builder()
|
||||
.rewardEventList(list)
|
||||
.total(rewardEventMapper.getTotal())
|
||||
.totalAll(allCnt)
|
||||
.pageNo(requestParam.get("page_no")!=null?
|
||||
Integer.valueOf(requestParam.get("page_no").toString()):1)
|
||||
@@ -67,24 +66,24 @@ public class EventService {
|
||||
}
|
||||
|
||||
@RequestLog
|
||||
public EventResponse getDetail(Long id){
|
||||
Event event = eventMapper.getEventDetail(id);
|
||||
public RewardEventResponse getDetail(Long id){
|
||||
RewardEvent rewardEvent = rewardEventMapper.getEventDetail(id);
|
||||
|
||||
event.setMailList(eventMapper.getMessage(id));
|
||||
List<Item> itemList = eventMapper.getItem(id);
|
||||
rewardEvent.setMailList(rewardEventMapper.getMessage(id));
|
||||
List<Item> itemList = rewardEventMapper.getItem(id);
|
||||
for(Item item : itemList){
|
||||
String itemName = metaDataHandler.getMetaItemNameData(Integer.parseInt(item.getItem()));
|
||||
item.setItemName(metaDataHandler.getTextStringData(itemName));
|
||||
}
|
||||
event.setItemList(itemList);
|
||||
rewardEvent.setItemList(itemList);
|
||||
|
||||
log.info("getDetail call User Email: {}, event_id: {}", CommonUtils.getAdmin().getEmail(), id);
|
||||
|
||||
return EventResponse.builder()
|
||||
return RewardEventResponse.builder()
|
||||
.status(CommonCode.SUCCESS.getHttpStatus())
|
||||
.result(CommonCode.SUCCESS.getResult())
|
||||
.resultData(EventResponse.ResultData.builder()
|
||||
.event(event)
|
||||
.resultData(RewardEventResponse.ResultData.builder()
|
||||
.rewardEvent(rewardEvent)
|
||||
.build())
|
||||
.build();
|
||||
}
|
||||
@@ -92,37 +91,37 @@ public class EventService {
|
||||
@BusinessProcess(action = LogAction.EVENT)
|
||||
@Transactional(transactionManager = "transactionManager")
|
||||
@RequestLog
|
||||
public EventResponse postEvent(EventRequest eventRequest){
|
||||
eventRequest.setCreateBy(CommonUtils.getAdmin().getId());
|
||||
public RewardEventResponse postEvent(RewardEventRequest rewardEventRequest){
|
||||
rewardEventRequest.setCreateBy(CommonUtils.getAdmin().getId());
|
||||
|
||||
int result = eventMapper.postEvent(eventRequest);
|
||||
log.info("postEvent AdminToolDB Event Save id: {}", eventRequest.getId());
|
||||
int result = rewardEventMapper.postEvent(rewardEventRequest);
|
||||
log.info("postEvent AdminToolDB Event Save id: {}", rewardEventRequest.getId());
|
||||
|
||||
long event_id = eventRequest.getId();
|
||||
long event_id = rewardEventRequest.getId();
|
||||
|
||||
HashMap<String,String> map = new HashMap<>();
|
||||
map.put("mailId",String.valueOf(event_id));
|
||||
|
||||
//아이템 저장
|
||||
if(eventRequest.getItemList()!= null && !eventRequest.getItemList().isEmpty()){
|
||||
eventRequest.getItemList().forEach(
|
||||
if(rewardEventRequest.getItemList()!= null && !rewardEventRequest.getItemList().isEmpty()){
|
||||
rewardEventRequest.getItemList().forEach(
|
||||
item -> {
|
||||
map.put("goodsId",item.getItem());
|
||||
map.put("itemCnt",String.valueOf(item.getItemCnt()));
|
||||
eventMapper.insertItem(map);
|
||||
rewardEventMapper.insertItem(map);
|
||||
}
|
||||
);
|
||||
}
|
||||
log.info("postEvent AdminToolDB Item Save Complete");
|
||||
|
||||
//메시지 저장
|
||||
if(eventRequest.getMailList()!= null && !eventRequest.getMailList().isEmpty()){
|
||||
eventRequest.getMailList().forEach(
|
||||
if(rewardEventRequest.getMailList()!= null && !rewardEventRequest.getMailList().isEmpty()){
|
||||
rewardEventRequest.getMailList().forEach(
|
||||
item -> {
|
||||
map.put("title",item.getTitle());
|
||||
map.put("content",item.getContent());
|
||||
map.put("language",item.getLanguage());
|
||||
eventMapper.insertMessage(map);
|
||||
rewardEventMapper.insertMessage(map);
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -130,9 +129,9 @@ public class EventService {
|
||||
|
||||
String prodId = processIdManager.getCurrentProcessId();
|
||||
|
||||
Event event = eventMapper.getEventDetail(event_id);
|
||||
event.setMailList(eventMapper.getMessage(event_id));
|
||||
event.setItemList(eventMapper.getItem(event_id));
|
||||
RewardEvent rewardEvent = rewardEventMapper.getEventDetail(event_id);
|
||||
rewardEvent.setMailList(rewardEventMapper.getMessage(event_id));
|
||||
rewardEvent.setItemList(rewardEventMapper.getItem(event_id));
|
||||
|
||||
TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() {
|
||||
@Override
|
||||
@@ -144,7 +143,7 @@ public class EventService {
|
||||
LogStatus.SUCCESS,
|
||||
MysqlConstants.TABLE_NAME_EVENT,
|
||||
"",
|
||||
event
|
||||
rewardEvent
|
||||
);
|
||||
} catch (Exception e) {
|
||||
log.warn("Failed to log event creation: {}", e.getMessage());
|
||||
@@ -152,10 +151,10 @@ public class EventService {
|
||||
}
|
||||
});
|
||||
|
||||
return EventResponse.builder()
|
||||
return RewardEventResponse.builder()
|
||||
.status(CommonCode.SUCCESS.getHttpStatus())
|
||||
.result(CommonCode.SUCCESS.getResult())
|
||||
.resultData(EventResponse.ResultData.builder()
|
||||
.resultData(RewardEventResponse.ResultData.builder()
|
||||
.message(SuccessCode.SAVE.getMessage())
|
||||
.build())
|
||||
.build();
|
||||
@@ -164,52 +163,52 @@ public class EventService {
|
||||
@BusinessProcess(action = LogAction.EVENT)
|
||||
@Transactional(transactionManager = "transactionManager")
|
||||
@RequestLog
|
||||
public EventResponse updateEvent(Long id, EventRequest eventRequest) {
|
||||
eventRequest.setId(id);
|
||||
eventRequest.setUpdateBy(CommonUtils.getAdmin().getId());
|
||||
eventRequest.setUpdateDt(LocalDateTime.now());
|
||||
public RewardEventResponse updateEvent(Long id, RewardEventRequest rewardEventRequest) {
|
||||
rewardEventRequest.setId(id);
|
||||
rewardEventRequest.setUpdateBy(CommonUtils.getAdmin().getId());
|
||||
rewardEventRequest.setUpdateDt(LocalDateTime.now());
|
||||
|
||||
Long event_id = eventRequest.getId();
|
||||
Event before_info = eventMapper.getEventDetail(event_id);
|
||||
before_info.setMailList(eventMapper.getMessage(event_id));
|
||||
before_info.setItemList(eventMapper.getItem(event_id));
|
||||
Long event_id = rewardEventRequest.getId();
|
||||
RewardEvent before_info = rewardEventMapper.getEventDetail(event_id);
|
||||
before_info.setMailList(rewardEventMapper.getMessage(event_id));
|
||||
before_info.setItemList(rewardEventMapper.getItem(event_id));
|
||||
|
||||
int result = eventMapper.updateEvent(eventRequest);
|
||||
int result = rewardEventMapper.updateEvent(rewardEventRequest);
|
||||
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("mailId", String.valueOf(event_id));
|
||||
|
||||
// item 테이블 데이터 삭제 처리 by event_id
|
||||
eventMapper.deleteItem(map);
|
||||
rewardEventMapper.deleteItem(map);
|
||||
|
||||
// 아이템 업데이트
|
||||
if (eventRequest.getItemList() != null && !eventRequest.getItemList().isEmpty()) {
|
||||
eventRequest.getItemList().forEach(item -> {
|
||||
if (rewardEventRequest.getItemList() != null && !rewardEventRequest.getItemList().isEmpty()) {
|
||||
rewardEventRequest.getItemList().forEach(item -> {
|
||||
map.put("goodsId", item.getItem());
|
||||
map.put("itemCnt", String.valueOf(item.getItemCnt()));
|
||||
|
||||
eventMapper.insertItem(map);
|
||||
rewardEventMapper.insertItem(map);
|
||||
});
|
||||
}
|
||||
|
||||
// message 테이블 데이터 삭제 처리 by mail_id
|
||||
eventMapper.deleteMessage(map);
|
||||
rewardEventMapper.deleteMessage(map);
|
||||
|
||||
// 메시지 업데이트
|
||||
if (eventRequest.getMailList() != null && !eventRequest.getMailList().isEmpty()) {
|
||||
eventRequest.getMailList().forEach(item -> {
|
||||
if (rewardEventRequest.getMailList() != null && !rewardEventRequest.getMailList().isEmpty()) {
|
||||
rewardEventRequest.getMailList().forEach(item -> {
|
||||
map.put("title", item.getTitle());
|
||||
map.put("content", item.getContent());
|
||||
map.put("language", item.getLanguage());
|
||||
|
||||
eventMapper.insertMessage(map);
|
||||
rewardEventMapper.insertMessage(map);
|
||||
});
|
||||
}
|
||||
log.info("updateEvent AdminToolDB Event Update Complete id: {}", eventRequest.getId());
|
||||
log.info("updateEvent AdminToolDB Event Update Complete id: {}", rewardEventRequest.getId());
|
||||
|
||||
Event after_event = eventMapper.getEventDetail(event_id);
|
||||
after_event.setMailList(eventMapper.getMessage(event_id));
|
||||
after_event.setItemList(eventMapper.getItem(event_id));
|
||||
RewardEvent after_Reward_event = rewardEventMapper.getEventDetail(event_id);
|
||||
after_Reward_event.setMailList(rewardEventMapper.getMessage(event_id));
|
||||
after_Reward_event.setItemList(rewardEventMapper.getItem(event_id));
|
||||
|
||||
String prodId = processIdManager.getCurrentProcessId();
|
||||
TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() {
|
||||
@@ -223,7 +222,7 @@ public class EventService {
|
||||
MysqlConstants.TABLE_NAME_EVENT,
|
||||
"",
|
||||
before_info,
|
||||
after_event
|
||||
after_Reward_event
|
||||
);
|
||||
} catch (Exception e) {
|
||||
log.warn("Failed to log event creation: {}", e.getMessage());
|
||||
@@ -231,10 +230,10 @@ public class EventService {
|
||||
}
|
||||
});
|
||||
|
||||
return EventResponse.builder()
|
||||
return RewardEventResponse.builder()
|
||||
.status(CommonCode.SUCCESS.getHttpStatus())
|
||||
.result(CommonCode.SUCCESS.getResult())
|
||||
.resultData(EventResponse.ResultData.builder()
|
||||
.resultData(RewardEventResponse.ResultData.builder()
|
||||
.message(SuccessCode.UPDATE.getMessage())
|
||||
.build())
|
||||
.build();
|
||||
@@ -243,54 +242,54 @@ public class EventService {
|
||||
@BusinessProcess(action = LogAction.EVENT)
|
||||
@Transactional(transactionManager = "transactionManager")
|
||||
@RequestLog
|
||||
public EventResponse deleteEvent(EventRequest eventRequest){
|
||||
public RewardEventResponse deleteEvent(RewardEventRequest rewardEventRequest){
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
|
||||
eventRequest.getList().forEach(
|
||||
rewardEventRequest.getList().forEach(
|
||||
item->{
|
||||
Long event_id = item.getId();
|
||||
Event event = eventMapper.getEventDetail(event_id);
|
||||
event.setMailList(eventMapper.getMessage(event_id));
|
||||
event.setItemList(eventMapper.getItem(event_id));
|
||||
RewardEvent rewardEvent = rewardEventMapper.getEventDetail(event_id);
|
||||
rewardEvent.setMailList(rewardEventMapper.getMessage(event_id));
|
||||
rewardEvent.setItemList(rewardEventMapper.getItem(event_id));
|
||||
|
||||
map.put("id",event_id);
|
||||
map.put("desc", item.getDeleteDesc());
|
||||
int result = eventMapper.deleteEvent(map);
|
||||
int result = rewardEventMapper.deleteEvent(map);
|
||||
log.info("updateEvent AdminTool Delete Complete id: {}", event_id);
|
||||
}
|
||||
);
|
||||
|
||||
return EventResponse.builder()
|
||||
return RewardEventResponse.builder()
|
||||
.status(CommonCode.SUCCESS.getHttpStatus())
|
||||
.result(CommonCode.SUCCESS.getResult())
|
||||
.resultData(EventResponse.ResultData.builder()
|
||||
.resultData(RewardEventResponse.ResultData.builder()
|
||||
.message(SuccessCode.DELETE.getMessage())
|
||||
.build())
|
||||
.build();
|
||||
}
|
||||
|
||||
public List<Event> getScheduleMailList(){
|
||||
return eventMapper.getScheduleEventList();
|
||||
public List<RewardEvent> getScheduleMailList(){
|
||||
return rewardEventMapper.getScheduleEventList();
|
||||
}
|
||||
public List<Message> getMessageList(Long id){
|
||||
return eventMapper.getMessage(id);
|
||||
return rewardEventMapper.getMessage(id);
|
||||
}
|
||||
|
||||
public List<Item> getItemList(Long id){
|
||||
return eventMapper.getItem(id);
|
||||
return rewardEventMapper.getItem(id);
|
||||
}
|
||||
|
||||
@Transactional(transactionManager = "transactionManager")
|
||||
public void updateEventStatus(Long id, Event.EVENTSTATUS status){
|
||||
public void updateEventStatus(Long id, RewardEvent.EVENTSTATUS status){
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
map.put("id", id);
|
||||
map.put("status", status.toString());
|
||||
eventMapper.updateStatusEvent(map);
|
||||
rewardEventMapper.updateStatusEvent(map);
|
||||
log.info("updateEventStatus event status changed: {}", status);
|
||||
}
|
||||
|
||||
//메타 아이템
|
||||
public EventResponse getMetaItem(String metaId){
|
||||
public RewardEventResponse getMetaItem(String metaId){
|
||||
long id = Long.parseLong(metaId);
|
||||
String item = metaDataHandler.getMetaItemNameData((int) id);
|
||||
boolean isItem = (item != null && !item.isEmpty());
|
||||
@@ -298,40 +297,40 @@ public class EventService {
|
||||
Item item_info = new Item();
|
||||
item_info.setItem(metaId);
|
||||
item_info.setItemName(metaDataHandler.getTextStringData(item));
|
||||
return EventResponse.builder()
|
||||
return RewardEventResponse.builder()
|
||||
.status(CommonCode.SUCCESS.getHttpStatus())
|
||||
.result(CommonCode.SUCCESS.getResult())
|
||||
.resultData(EventResponse.ResultData.builder()
|
||||
.resultData(RewardEventResponse.ResultData.builder()
|
||||
.message(SuccessCode.ITEM_EXIST.getMessage())
|
||||
.itemInfo(item_info)
|
||||
.build())
|
||||
.build();
|
||||
}else
|
||||
return EventResponse.builder()
|
||||
return RewardEventResponse.builder()
|
||||
.status(CommonCode.ERROR.getHttpStatus())
|
||||
.result(CommonCode.ERROR.getResult())
|
||||
.resultData(EventResponse.ResultData.builder()
|
||||
.resultData(RewardEventResponse.ResultData.builder()
|
||||
.message(ErrorCode.NOT_ITEM.getMessage())
|
||||
.build())
|
||||
.build();
|
||||
}
|
||||
|
||||
@Transactional(transactionManager = "transactionManager")
|
||||
public void insertSystemMail(Event event){
|
||||
public void insertSystemMail(RewardEvent rewardEvent){
|
||||
try {
|
||||
long event_id = event.getId();
|
||||
event.setMailList(eventMapper.getMessage(event_id));
|
||||
event.setItemList(eventMapper.getItem(event_id));
|
||||
long event_id = rewardEvent.getId();
|
||||
rewardEvent.setMailList(rewardEventMapper.getMessage(event_id));
|
||||
rewardEvent.setItemList(rewardEventMapper.getItem(event_id));
|
||||
|
||||
dynamodbMailService.insertSystemMail(event);
|
||||
dynamodbMailService.insertSystemMail(rewardEvent);
|
||||
|
||||
eventMapper.updateAddFlag(event_id);
|
||||
updateEventStatus(event_id, Event.EVENTSTATUS.RUNNING);
|
||||
rewardEventMapper.updateAddFlag(event_id);
|
||||
updateEventStatus(event_id, RewardEvent.EVENTSTATUS.RUNNING);
|
||||
|
||||
log.info("insertSystemMail Save Complete: {}", event.getId());
|
||||
log.info("insertSystemMail Save Complete: {}", rewardEvent.getId());
|
||||
}catch (Exception e){
|
||||
log.error("insertSystemMail Exception: {}", e.getMessage());
|
||||
updateEventStatus(event.getId(), Event.EVENTSTATUS.FAIL);
|
||||
updateEventStatus(rewardEvent.getId(), RewardEvent.EVENTSTATUS.FAIL);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -85,7 +85,7 @@ public class S3Service {
|
||||
businessLogService.logS3(
|
||||
LogStatus.SUCCESS,
|
||||
"",
|
||||
CommonUtils.getAdmin().getId().toString(),
|
||||
CommonUtils.getAdmin().getEmail(),
|
||||
CommonUtils.getClientIp(),
|
||||
bucketName,
|
||||
objectKey,
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.caliverse.admin.domain.RabbitMq.MessageHandlerService;
|
||||
import com.caliverse.admin.domain.entity.EReqType;
|
||||
import com.caliverse.admin.domain.entity.FriendRequest;
|
||||
import com.caliverse.admin.domain.entity.SEARCHTYPE;
|
||||
import com.caliverse.admin.domain.entity.common.SearchUserType;
|
||||
import com.caliverse.admin.domain.entity.log.LogAction;
|
||||
import com.caliverse.admin.domain.request.MailRequest;
|
||||
import com.caliverse.admin.dynamodb.domain.atrrib.AccountBaseAttrib;
|
||||
@@ -141,23 +142,38 @@ public class UsersService {
|
||||
String searchKey = requestParam.get("search_key").toString();
|
||||
|
||||
Map<String,String> resultMap = new HashMap<>();
|
||||
if(searchType.equals(SEARCHTYPE.NAME.name())){
|
||||
if(searchType.equals(SEARCHTYPE.NAME.name()) || searchType.equals(SearchUserType.NICKNAME.name())){
|
||||
String name_guid = dynamodbUserService.getNameByGuid(searchKey.toLowerCase());
|
||||
if(!name_guid.isEmpty()){
|
||||
resultMap.put("guid", name_guid); //nickname은 무조건 소문자
|
||||
resultMap.put("nickname", searchKey);
|
||||
}else{
|
||||
return UsersResponse.builder()
|
||||
.status(CommonCode.ERROR.getHttpStatus())
|
||||
.result(ErrorCode.NOT_USER.name())
|
||||
.build();
|
||||
}
|
||||
}else if(searchType.equals(SEARCHTYPE.GUID.name())){
|
||||
String guid_name = dynamodbUserService.getGuidByName(searchKey);
|
||||
if(!guid_name.isEmpty()){
|
||||
resultMap.put("guid", searchKey);
|
||||
resultMap.put("nickname", guid_name);
|
||||
}else{
|
||||
return UsersResponse.builder()
|
||||
.status(CommonCode.ERROR.getHttpStatus())
|
||||
.result(ErrorCode.NOT_USER.name())
|
||||
.build();
|
||||
}
|
||||
}else if(searchType.equals(SEARCHTYPE.ACCOUNT.name())){
|
||||
String account_guid = dynamodbUserService.getAccountIdByGuid(searchKey);
|
||||
if(!account_guid.isEmpty()){
|
||||
resultMap.put("guid", account_guid);
|
||||
resultMap.put("nickname", dynamodbUserService.getAccountIdByName(searchKey));
|
||||
}else{
|
||||
return UsersResponse.builder()
|
||||
.status(CommonCode.ERROR.getHttpStatus())
|
||||
.result(ErrorCode.NOT_USER.name())
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,158 @@
|
||||
package com.caliverse.admin.domain.service;
|
||||
|
||||
import com.caliverse.admin.domain.dao.admin.WorldEventMapper;
|
||||
import com.caliverse.admin.domain.entity.WorldEvent;
|
||||
import com.caliverse.admin.domain.entity.log.LogAction;
|
||||
import com.caliverse.admin.domain.request.WorldEventRequest;
|
||||
import com.caliverse.admin.domain.response.WorldEventResponse;
|
||||
import com.caliverse.admin.dynamodb.service.DynamodbRankService;
|
||||
import com.caliverse.admin.dynamodb.service.DynamodbService;
|
||||
import com.caliverse.admin.global.common.annotation.BusinessProcess;
|
||||
import com.caliverse.admin.global.common.annotation.RequestLog;
|
||||
import com.caliverse.admin.global.common.code.CommonCode;
|
||||
import com.caliverse.admin.global.common.code.ErrorCode;
|
||||
import com.caliverse.admin.global.common.code.SuccessCode;
|
||||
import com.caliverse.admin.global.common.utils.CommonUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class WorldEventService {
|
||||
|
||||
private final WorldEventMapper worldEventMapper;
|
||||
private final DynamodbService dynamodbService;
|
||||
|
||||
@RequestLog
|
||||
public WorldEventResponse getList(Map requestParam){
|
||||
|
||||
//페이징 처리
|
||||
requestParam = CommonUtils.pageSetting(requestParam);
|
||||
|
||||
List<WorldEvent> list = worldEventMapper.getWorldEventList(requestParam);
|
||||
|
||||
return WorldEventResponse.builder()
|
||||
.status(CommonCode.SUCCESS.getHttpStatus())
|
||||
.result(CommonCode.SUCCESS.getResult())
|
||||
.resultData(WorldEventResponse.ResultData.builder()
|
||||
.worldEventList(list)
|
||||
.total(worldEventMapper.getTotal())
|
||||
.totalAll(list.size())
|
||||
.pageNo(requestParam.get("page_no")!=null?
|
||||
Integer.parseInt(requestParam.get("page_no").toString()):1)
|
||||
.build()
|
||||
)
|
||||
.build();
|
||||
}
|
||||
|
||||
@RequestLog
|
||||
public WorldEventResponse getDetail(Long id){
|
||||
WorldEvent worldEvent = worldEventMapper.getWorldEventDetail(id);
|
||||
|
||||
return WorldEventResponse.builder()
|
||||
.status(CommonCode.SUCCESS.getHttpStatus())
|
||||
.result(CommonCode.SUCCESS.getResult())
|
||||
.resultData(WorldEventResponse.ResultData.builder()
|
||||
.worldEvent(worldEvent)
|
||||
.build())
|
||||
.build();
|
||||
}
|
||||
|
||||
@BusinessProcess(action = LogAction.WORLD_EVENT)
|
||||
@Transactional(transactionManager = "transactionManager")
|
||||
@RequestLog
|
||||
public WorldEventResponse postWorldEvent(WorldEventRequest worldEventRequest){
|
||||
worldEventRequest.setCreateBy(CommonUtils.getAdmin().getId());
|
||||
|
||||
worldEventMapper.postWorldEvent(worldEventRequest);
|
||||
|
||||
long event_id = worldEventRequest.getId();
|
||||
HashMap<String,String> map = new HashMap<>();
|
||||
map.put("id",String.valueOf(event_id));
|
||||
|
||||
log.info("postWorldEvent Insert World Event id: {}", worldEventRequest.getId());
|
||||
|
||||
WorldEvent worldEvent = worldEventMapper.getWorldEventDetail(worldEventRequest.getId());
|
||||
|
||||
dynamodbService.insertWorldEventSchedule(worldEventRequest);
|
||||
|
||||
return WorldEventResponse.builder()
|
||||
.status(CommonCode.SUCCESS.getHttpStatus())
|
||||
.result(CommonCode.SUCCESS.getResult())
|
||||
.resultData(WorldEventResponse.ResultData.builder()
|
||||
.message(SuccessCode.SAVE.getMessage())
|
||||
.build())
|
||||
.build();
|
||||
}
|
||||
|
||||
@BusinessProcess(action = LogAction.WORLD_EVENT)
|
||||
@Transactional(transactionManager = "transactionManager")
|
||||
@RequestLog
|
||||
public WorldEventResponse updateWorldEvent(Long id, WorldEventRequest worldEventRequest) {
|
||||
worldEventRequest.setId(id);
|
||||
worldEventRequest.setUpdateBy(CommonUtils.getAdmin().getId());
|
||||
worldEventRequest.setUpdateDt(LocalDateTime.now());
|
||||
|
||||
Long event_id = worldEventRequest.getId();
|
||||
WorldEvent before_info = worldEventMapper.getWorldEventDetail(event_id);
|
||||
|
||||
worldEventMapper.updateWorldEvent(worldEventRequest);
|
||||
|
||||
log.info("updateWorldEvent Update World Event Complete: {}", worldEventRequest.getId());
|
||||
|
||||
WorldEvent after_info = worldEventMapper.getWorldEventDetail(event_id);
|
||||
|
||||
dynamodbService.updateWorldEventSchedule(worldEventRequest);
|
||||
|
||||
return WorldEventResponse.builder()
|
||||
.status(CommonCode.SUCCESS.getHttpStatus())
|
||||
.result(CommonCode.SUCCESS.getResult())
|
||||
.resultData(WorldEventResponse.ResultData.builder()
|
||||
.message(SuccessCode.UPDATE.getMessage())
|
||||
.build())
|
||||
.build();
|
||||
}
|
||||
|
||||
@BusinessProcess(action = LogAction.WORLD_EVENT)
|
||||
@Transactional(transactionManager = "transactionManager")
|
||||
@RequestLog
|
||||
public WorldEventResponse deleteWorldEvent(Long id){
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
map.put("id",id);
|
||||
|
||||
WorldEvent worldEvent = worldEventMapper.getWorldEventDetail(id);
|
||||
|
||||
if(worldEvent.getStartDt().isBefore(LocalDateTime.now())){
|
||||
return WorldEventResponse.builder()
|
||||
.status(CommonCode.ERROR.getHttpStatus())
|
||||
.result(CommonCode.ERROR.getResult())
|
||||
.resultData(WorldEventResponse.ResultData.builder()
|
||||
.message(ErrorCode.START_DATE_OVER.getMessage())
|
||||
.build())
|
||||
.build();
|
||||
}
|
||||
|
||||
worldEventMapper.deleteWorldEvent(map);
|
||||
|
||||
log.info("deleteWorldEvent Delete World Event Complete id: {}", id);
|
||||
|
||||
dynamodbService.deleteWorldEventSchedule(worldEvent);
|
||||
|
||||
return WorldEventResponse.builder()
|
||||
.status(CommonCode.SUCCESS.getHttpStatus())
|
||||
.result(CommonCode.SUCCESS.getResult())
|
||||
.resultData(WorldEventResponse.ResultData.builder()
|
||||
.message(SuccessCode.DELETE.getMessage())
|
||||
.build())
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.caliverse.admin.dynamodb.domain.atrrib;
|
||||
|
||||
import com.caliverse.admin.dynamodb.entity.EIntervalType;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonNaming;
|
||||
import lombok.*;
|
||||
import software.amazon.awssdk.enhanced.dynamodb.mapper.annotations.DynamoDbBean;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString(callSuper = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@NoArgsConstructor
|
||||
@DynamoDbBean
|
||||
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
|
||||
public class RankerAttrib extends DynamoDBAttribBase{
|
||||
@JsonProperty("ranking_guid")
|
||||
private String rankingGuid;
|
||||
@JsonProperty("ranker_guid")
|
||||
private String rankerGuid;
|
||||
@JsonProperty("ranker_entity_type")
|
||||
private String rankerEntityType;
|
||||
private Integer score;
|
||||
@JsonProperty("score_type")
|
||||
private String scoreType;
|
||||
@JsonProperty("update_time")
|
||||
private String updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.caliverse.admin.dynamodb.domain.atrrib;
|
||||
|
||||
import com.caliverse.admin.dynamodb.entity.EIntervalType;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonNaming;
|
||||
import lombok.*;
|
||||
import software.amazon.awssdk.enhanced.dynamodb.mapper.annotations.DynamoDbBean;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString(callSuper = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@NoArgsConstructor
|
||||
@DynamoDbBean
|
||||
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
|
||||
public class RankingScheduleAttrib extends DynamoDBAttribBase{
|
||||
@JsonProperty("ranking_guid")
|
||||
private String rankingGuid;
|
||||
@JsonProperty("ranking_meta_id")
|
||||
private Integer rankingMetaId;
|
||||
@JsonProperty("event_action_score_group_id")
|
||||
private Integer eventActionScoreGroupId;
|
||||
@JsonProperty("start_time")
|
||||
private String startTime;
|
||||
@JsonProperty("end_time")
|
||||
private String endTime;
|
||||
@JsonProperty("interval_base_time")
|
||||
private String intervalBaseTime;
|
||||
|
||||
private Map<EIntervalType, Integer> interval;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.caliverse.admin.dynamodb.domain.atrrib;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonNaming;
|
||||
import lombok.*;
|
||||
import software.amazon.awssdk.enhanced.dynamodb.mapper.annotations.DynamoDbBean;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString(callSuper = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@NoArgsConstructor
|
||||
@DynamoDbBean
|
||||
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
|
||||
public class WorldEventScheduleAttrib extends DynamoDBAttribBase{
|
||||
private Integer id;
|
||||
@JsonProperty("global_event_action_group_id")
|
||||
private Integer globalEventActionGroupId;
|
||||
@JsonProperty("personal_event_action_group_id")
|
||||
private Integer personalEventActionGroupId;
|
||||
@JsonProperty("global_event_contribution_point_max")
|
||||
private Integer globalEventContributionPointMax;
|
||||
@JsonProperty("start_time")
|
||||
private String startTime;
|
||||
@JsonProperty("end_time")
|
||||
private String endTime;
|
||||
@JsonProperty("is_active")
|
||||
private boolean isActive;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.caliverse.admin.dynamodb.domain.doc;
|
||||
|
||||
import com.caliverse.admin.global.common.constants.DynamoDBConstants;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import software.amazon.awssdk.enhanced.dynamodb.mapper.annotations.DynamoDbAttribute;
|
||||
import software.amazon.awssdk.enhanced.dynamodb.mapper.annotations.DynamoDbBean;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@NoArgsConstructor
|
||||
@DynamoDbBean
|
||||
public class RankerDoc extends DynamoDBDocBase {
|
||||
private String attrib;
|
||||
@Setter
|
||||
private long ttl;
|
||||
|
||||
public String getAttribFieldName() {
|
||||
return DynamoDBConstants.ATTRIB_RANKER;
|
||||
}
|
||||
|
||||
@DynamoDbAttribute(DynamoDBConstants.ATTRIB_RANKER)
|
||||
@JsonProperty(DynamoDBConstants.ATTRIB_RANKER)
|
||||
public String getAttribValue() {
|
||||
return attrib;
|
||||
}
|
||||
|
||||
public void setAttribValue(String value) {
|
||||
this.attrib = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.caliverse.admin.dynamodb.domain.doc;
|
||||
|
||||
import com.caliverse.admin.global.common.constants.DynamoDBConstants;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import software.amazon.awssdk.enhanced.dynamodb.mapper.annotations.DynamoDbAttribute;
|
||||
import software.amazon.awssdk.enhanced.dynamodb.mapper.annotations.DynamoDbBean;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@NoArgsConstructor
|
||||
@DynamoDbBean
|
||||
public class RankingScheduleDoc extends DynamoDBDocBase {
|
||||
private String attrib;
|
||||
@Setter
|
||||
private long ttl;
|
||||
|
||||
public String getAttribFieldName() {
|
||||
return DynamoDBConstants.ATTRIB_RANKING_SCHEDULER;
|
||||
}
|
||||
|
||||
@DynamoDbAttribute(DynamoDBConstants.ATTRIB_RANKING_SCHEDULER)
|
||||
@JsonProperty(DynamoDBConstants.ATTRIB_RANKING_SCHEDULER)
|
||||
public String getAttribValue() {
|
||||
return attrib;
|
||||
}
|
||||
|
||||
public void setAttribValue(String value) {
|
||||
this.attrib = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.caliverse.admin.dynamodb.domain.doc;
|
||||
|
||||
import com.caliverse.admin.global.common.constants.DynamoDBConstants;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import software.amazon.awssdk.enhanced.dynamodb.mapper.annotations.DynamoDbAttribute;
|
||||
import software.amazon.awssdk.enhanced.dynamodb.mapper.annotations.DynamoDbBean;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@NoArgsConstructor
|
||||
@DynamoDbBean
|
||||
public class WorldEventScheduleDoc extends DynamoDBDocBase {
|
||||
private String battleEventAttrib;
|
||||
|
||||
public String getAttribFieldName() {
|
||||
return DynamoDBConstants.ATTRIB_RANKING_SCHEDULER;
|
||||
}
|
||||
|
||||
@DynamoDbAttribute("BattleEventAttrib")
|
||||
@JsonProperty("BattleEventAttrib")
|
||||
public String getAttribValue() {
|
||||
return battleEventAttrib;
|
||||
}
|
||||
|
||||
public void setAttribValue(String value) {
|
||||
this.battleEventAttrib = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.caliverse.admin.dynamodb.entity;
|
||||
|
||||
|
||||
import com.caliverse.admin.domain.entity.common.ValueEnum;
|
||||
|
||||
public enum EIntervalType implements ValueEnum {
|
||||
None(0),
|
||||
Refresh(1),
|
||||
Initialization (2),
|
||||
Snapshot (3),
|
||||
;
|
||||
|
||||
private final int value;
|
||||
|
||||
EIntervalType(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,9 @@
|
||||
package com.caliverse.admin.dynamodb.repository.Impl;
|
||||
|
||||
import com.caliverse.admin.domain.entity.BattleEvent;
|
||||
import com.caliverse.admin.domain.entity.HISTORYTYPEDETAIL;
|
||||
import com.caliverse.admin.domain.entity.log.LogAction;
|
||||
import com.caliverse.admin.domain.entity.log.LogStatus;
|
||||
import com.caliverse.admin.domain.request.BattleEventRequest;
|
||||
import com.caliverse.admin.dynamodb.domain.atrrib.BattleEventAttrib;
|
||||
import com.caliverse.admin.dynamodb.domain.doc.BattleEventDoc;
|
||||
import com.caliverse.admin.dynamodb.domain.doc.SystemMetaMailDoc;
|
||||
import com.caliverse.admin.dynamodb.entity.DynamodbOperationResult;
|
||||
import com.caliverse.admin.dynamodb.entity.EDayOfWeekType;
|
||||
import com.caliverse.admin.dynamodb.entity.EOncePeriodRangeType;
|
||||
@@ -75,8 +71,8 @@ public class BattleEventRepositoryImpl extends BaseDynamoDBRepository<BattleEven
|
||||
|
||||
@Override
|
||||
public void insert(BattleEventRequest battleEventRequest) {
|
||||
if(isEvent(battleEventRequest.getEventId())){
|
||||
log.error("insert EventId: {} is duplication", battleEventRequest.getEventId());
|
||||
if(isEvent(battleEventRequest.getId().intValue())){
|
||||
log.error("insert EventId: {} is duplication", battleEventRequest.getId());
|
||||
throw new RestApiException(CommonCode.ERROR.getHttpStatus(), ErrorCode.DYNAMODB_CONNECTION_ERROR.getMessage());
|
||||
}
|
||||
|
||||
@@ -93,7 +89,7 @@ public class BattleEventRepositoryImpl extends BaseDynamoDBRepository<BattleEven
|
||||
try {
|
||||
BattleEventAttrib attrib = new BattleEventAttrib();
|
||||
attrib.setAttribType(DynamoDBConstants.ATTRIB_BATTLE_EVENT);
|
||||
attrib.setEventId(battleEventRequest.getEventId());
|
||||
attrib.setEventId(battleEventRequest.getId().intValue());
|
||||
attrib.setStartDay(stringToISODateTime(start_dt.toLocalDate().atStartOfDay()));
|
||||
attrib.setStartHour(start_dt.getHour());
|
||||
attrib.setStartMin(start_dt.getMinute());
|
||||
@@ -135,7 +131,7 @@ public class BattleEventRepositoryImpl extends BaseDynamoDBRepository<BattleEven
|
||||
try {
|
||||
Key key = Key.builder()
|
||||
.partitionValue(DynamoDBConstants.PK_KEY_BATTLE_EVENT)
|
||||
.sortValue(String.valueOf(battleEventRequest.getEventId()))
|
||||
.sortValue(String.valueOf(battleEventRequest.getId()))
|
||||
.build();
|
||||
|
||||
BattleEventDoc beforeDoc = findById(key);
|
||||
@@ -202,7 +198,7 @@ public class BattleEventRepositoryImpl extends BaseDynamoDBRepository<BattleEven
|
||||
try {
|
||||
Key key = Key.builder()
|
||||
.partitionValue(DynamoDBConstants.PK_KEY_BATTLE_EVENT)
|
||||
.sortValue(String.valueOf(battleEvent.getEventId()))
|
||||
.sortValue(String.valueOf(battleEvent.getId()))
|
||||
.build();
|
||||
|
||||
BattleEventDoc beforeDoc = findById(key);
|
||||
|
||||
@@ -0,0 +1,158 @@
|
||||
package com.caliverse.admin.dynamodb.repository.Impl;
|
||||
|
||||
import com.caliverse.admin.domain.request.RankRequest;
|
||||
import com.caliverse.admin.dynamodb.domain.atrrib.RankingScheduleAttrib;
|
||||
import com.caliverse.admin.dynamodb.domain.doc.RankingScheduleDoc;
|
||||
import com.caliverse.admin.dynamodb.entity.DynamodbOperationResult;
|
||||
import com.caliverse.admin.dynamodb.entity.EIntervalType;
|
||||
import com.caliverse.admin.dynamodb.repository.BaseDynamoDBRepository;
|
||||
import com.caliverse.admin.dynamodb.repository.RankingSchedulerRepository;
|
||||
import com.caliverse.admin.dynamodb.service.DynamoDBOperations;
|
||||
import com.caliverse.admin.global.common.code.CommonCode;
|
||||
import com.caliverse.admin.global.common.code.ErrorCode;
|
||||
import com.caliverse.admin.global.common.constants.DynamoDBConstants;
|
||||
import com.caliverse.admin.global.common.exception.RestApiException;
|
||||
import com.caliverse.admin.global.common.utils.CommonUtils;
|
||||
import com.caliverse.admin.mongodb.service.DynamodbHistoryLogService;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
import software.amazon.awssdk.enhanced.dynamodb.Key;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.caliverse.admin.global.common.utils.CommonUtils.convertUTCDate;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
public class RankingScheduleRepositoryImpl extends BaseDynamoDBRepository<RankingScheduleDoc> implements RankingSchedulerRepository {
|
||||
public RankingScheduleRepositoryImpl(DynamoDBOperations operations, DynamodbHistoryLogService dynamodbHistoryLogService, ObjectMapper objectMapper) {
|
||||
super(operations, RankingScheduleDoc.class, dynamodbHistoryLogService, objectMapper);
|
||||
}
|
||||
|
||||
private boolean isEvent(Integer sk){
|
||||
Key key = Key.builder()
|
||||
.partitionValue(DynamoDBConstants.PK_KEY_RANKING_SCHEDULER)
|
||||
.sortValue(String.valueOf(sk))
|
||||
.build();
|
||||
|
||||
RankingScheduleDoc doc = findById(key);
|
||||
|
||||
return doc != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insert(RankRequest rankRequest) {
|
||||
if(isEvent(rankRequest.getId().intValue())){
|
||||
log.error("insert EventId: {} is duplication", rankRequest.getId());
|
||||
throw new RestApiException(CommonCode.ERROR.getHttpStatus(), ErrorCode.DYNAMODB_CONNECTION_ERROR.getMessage());
|
||||
}
|
||||
|
||||
LocalDateTime nowDate = LocalDateTime.now();
|
||||
|
||||
try {
|
||||
RankingScheduleAttrib attrib = new RankingScheduleAttrib();
|
||||
attrib.setAttribType(DynamoDBConstants.ATTRIB_RANKING_SCHEDULER);
|
||||
attrib.setStartTime(convertUTCDate(rankRequest.getStartDt()));
|
||||
attrib.setEndTime(convertUTCDate(rankRequest.getEndDt()));
|
||||
attrib.setIntervalBaseTime(convertUTCDate(rankRequest.getBaseDt()));
|
||||
attrib.setRankingGuid(rankRequest.getGuid());
|
||||
attrib.setRankingMetaId(rankRequest.getMetaId());
|
||||
attrib.setEventActionScoreGroupId(rankRequest.getEventActionId());
|
||||
|
||||
Map<EIntervalType, Integer> intervalList = new HashMap<>();
|
||||
intervalList.put(EIntervalType.Refresh, rankRequest.getRefreshInterval());
|
||||
intervalList.put(EIntervalType.Initialization, rankRequest.getInitializationInterval());
|
||||
intervalList.put(EIntervalType.Snapshot, rankRequest.getSnapshotInterval());
|
||||
attrib.setInterval(intervalList);
|
||||
|
||||
RankingScheduleDoc doc = new RankingScheduleDoc();
|
||||
doc.setPK(DynamoDBConstants.PK_KEY_RANKING_SCHEDULER);
|
||||
doc.setSK(rankRequest.getGuid());
|
||||
doc.setDocType(DynamoDBConstants.DOC_RANKING_SCHEDULER);
|
||||
doc.setAttribValue(objectMapper.writeValueAsString(attrib));
|
||||
doc.setCreatedDateTime(convertUTCDate(nowDate));
|
||||
doc.setUpdatedDateTime(convertUTCDate(nowDate));
|
||||
doc.setDeletedDateTime(DynamoDBConstants.MIN_DATE);
|
||||
doc.setRestoredDateTime(DynamoDBConstants.MIN_DATE);
|
||||
|
||||
save(doc);
|
||||
|
||||
}catch (Exception e){
|
||||
log.error("insert Error: {}", e.getMessage());
|
||||
throw new RestApiException(CommonCode.ERROR.getHttpStatus(), ErrorCode.DYNAMODB_CONNECTION_ERROR.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(RankRequest rankRequest) {
|
||||
LocalDateTime nowDate = LocalDateTime.now();
|
||||
|
||||
try {
|
||||
Key key = Key.builder()
|
||||
.partitionValue(DynamoDBConstants.PK_KEY_RANKING_SCHEDULER)
|
||||
.sortValue(rankRequest.getGuid())
|
||||
.build();
|
||||
|
||||
RankingScheduleDoc beforeDoc = findById(key);
|
||||
|
||||
if (beforeDoc != null) {
|
||||
RankingScheduleDoc afterDoc = deepCopy(beforeDoc, RankingScheduleDoc.class);
|
||||
|
||||
RankingScheduleAttrib attrib = objectMapper.readValue(afterDoc.getAttribValue(), RankingScheduleAttrib.class);
|
||||
attrib.setStartTime(convertUTCDate(rankRequest.getStartDt()));
|
||||
attrib.setEndTime(convertUTCDate(rankRequest.getEndDt()));
|
||||
attrib.setIntervalBaseTime(convertUTCDate(rankRequest.getBaseDt()));
|
||||
attrib.setRankingGuid(rankRequest.getGuid());
|
||||
attrib.setRankingMetaId(rankRequest.getMetaId());
|
||||
attrib.setEventActionScoreGroupId(rankRequest.getEventActionId());
|
||||
|
||||
Map<EIntervalType, Integer> intervalList = new HashMap<>();
|
||||
intervalList.put(EIntervalType.Refresh, rankRequest.getRefreshInterval());
|
||||
intervalList.put(EIntervalType.Initialization, rankRequest.getInitializationInterval());
|
||||
intervalList.put(EIntervalType.Snapshot, rankRequest.getSnapshotInterval());
|
||||
attrib.setInterval(intervalList);
|
||||
|
||||
afterDoc.setAttribValue(objectMapper.writeValueAsString(attrib));
|
||||
afterDoc.setUpdatedDateTime(CommonUtils.convertUTCDate(nowDate));
|
||||
|
||||
update(afterDoc);
|
||||
|
||||
log.info("RankingScheduleDoc Update Success: {}", objectMapper.writeValueAsString(afterDoc));
|
||||
|
||||
}
|
||||
}catch (Exception e){
|
||||
throw new RestApiException(CommonCode.ERROR.getHttpStatus(), ErrorCode.DYNAMODB_CONNECTION_ERROR.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public DynamodbOperationResult delete(String guid) {
|
||||
try{
|
||||
Key key = Key.builder()
|
||||
.partitionValue(DynamoDBConstants.PK_KEY_RANKING_SCHEDULER)
|
||||
.sortValue(guid)
|
||||
.build();
|
||||
RankingScheduleDoc doc = findById(key);
|
||||
|
||||
if(doc != null) {
|
||||
Key detailKey = Key.builder()
|
||||
.partitionValue(doc.getPK())
|
||||
.sortValue(doc.getSK())
|
||||
.build();
|
||||
|
||||
delete(detailKey);
|
||||
|
||||
log.info("RankingScheduleDoc Delete Success: {}", objectMapper.writeValueAsString(doc));
|
||||
|
||||
return new DynamodbOperationResult(true, "", doc);
|
||||
}
|
||||
return new DynamodbOperationResult(true, "null", null);
|
||||
}catch (Exception e){
|
||||
log.error("delete RankingScheduleDoc Error: {}", e.getMessage());
|
||||
return new DynamodbOperationResult(false, e.getMessage(), null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.caliverse.admin.dynamodb.repository.Impl;
|
||||
|
||||
import com.caliverse.admin.domain.entity.Event;
|
||||
import com.caliverse.admin.domain.entity.RewardEvent;
|
||||
import com.caliverse.admin.domain.entity.Message;
|
||||
import com.caliverse.admin.dynamodb.domain.atrrib.SystemMetaMailAttrib;
|
||||
import com.caliverse.admin.dynamodb.domain.doc.SystemMetaMailDoc;
|
||||
@@ -33,23 +33,23 @@ public class SystemMetaMailRepositoryImpl extends BaseDynamoDBRepository<SystemM
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insert(Event event) {
|
||||
public void insert(RewardEvent rewardEvent) {
|
||||
try {
|
||||
LocalDateTime nowDate = LocalDateTime.now();
|
||||
|
||||
SystemMetaMailAttrib attrib = new SystemMetaMailAttrib();
|
||||
attrib.setAttribType(DynamoDBConstants.ATTRIB_SYSTEMMAIL);
|
||||
attrib.setMailId(event.getId().intValue());
|
||||
attrib.setStartTime(convertUTCDate(event.getStartDt()));
|
||||
attrib.setEndTime(convertUTCDate(event.getEndDt()));
|
||||
attrib.setSenderNickName(createSystemMessages(event.getMailList(), DynamodbUtil::getSenderByLanguage));
|
||||
attrib.setTitle(createSystemMessages(event.getMailList(), Message::getTitle));
|
||||
attrib.setText(createSystemMessages(event.getMailList(), Message::getContent));
|
||||
attrib.setItemList(createMailItems(event.getItemList()));
|
||||
attrib.setMailId(rewardEvent.getId().intValue());
|
||||
attrib.setStartTime(convertUTCDate(rewardEvent.getStartDt()));
|
||||
attrib.setEndTime(convertUTCDate(rewardEvent.getEndDt()));
|
||||
attrib.setSenderNickName(createSystemMessages(rewardEvent.getMailList(), DynamodbUtil::getSenderByLanguage));
|
||||
attrib.setTitle(createSystemMessages(rewardEvent.getMailList(), Message::getTitle));
|
||||
attrib.setText(createSystemMessages(rewardEvent.getMailList(), Message::getContent));
|
||||
attrib.setItemList(createMailItems(rewardEvent.getItemList()));
|
||||
|
||||
SystemMetaMailDoc doc = new SystemMetaMailDoc();
|
||||
doc.setPK(DynamoDBConstants.PK_KEY_SYSTEM_MAIL);
|
||||
doc.setSK(String.valueOf(event.getId()));
|
||||
doc.setSK(String.valueOf(rewardEvent.getId()));
|
||||
doc.setDocType(DynamoDBConstants.DOC_SYSTEMMAIL);
|
||||
doc.setAttribValue(objectMapper.writeValueAsString(attrib));
|
||||
doc.setCreatedDateTime(convertUTCDate(nowDate));
|
||||
|
||||
@@ -0,0 +1,144 @@
|
||||
package com.caliverse.admin.dynamodb.repository.Impl;
|
||||
|
||||
import com.caliverse.admin.domain.request.WorldEventRequest;
|
||||
import com.caliverse.admin.dynamodb.domain.atrrib.WorldEventScheduleAttrib;
|
||||
import com.caliverse.admin.dynamodb.domain.doc.WorldEventScheduleDoc;
|
||||
import com.caliverse.admin.dynamodb.entity.DynamodbOperationResult;
|
||||
import com.caliverse.admin.dynamodb.repository.BaseDynamoDBRepository;
|
||||
import com.caliverse.admin.dynamodb.repository.WorldEventScheduleRepository;
|
||||
import com.caliverse.admin.dynamodb.service.DynamoDBOperations;
|
||||
import com.caliverse.admin.global.common.code.CommonCode;
|
||||
import com.caliverse.admin.global.common.code.ErrorCode;
|
||||
import com.caliverse.admin.global.common.constants.DynamoDBConstants;
|
||||
import com.caliverse.admin.global.common.exception.RestApiException;
|
||||
import com.caliverse.admin.global.common.utils.CommonUtils;
|
||||
import com.caliverse.admin.mongodb.service.DynamodbHistoryLogService;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
import software.amazon.awssdk.enhanced.dynamodb.Key;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.caliverse.admin.global.common.utils.CommonUtils.convertUTCDate;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
public class WorldEventRepositoryImpl extends BaseDynamoDBRepository<WorldEventScheduleDoc> implements WorldEventScheduleRepository {
|
||||
public WorldEventRepositoryImpl(DynamoDBOperations operations, DynamodbHistoryLogService dynamodbHistoryLogService, ObjectMapper objectMapper) {
|
||||
super(operations, WorldEventScheduleDoc.class, dynamodbHistoryLogService, objectMapper);
|
||||
}
|
||||
|
||||
private boolean isEvent(Integer sk){
|
||||
Key key = Key.builder()
|
||||
.partitionValue(DynamoDBConstants.PK_KEY_WORLD_EVENT_SCHEDULER)
|
||||
.sortValue(String.valueOf(sk))
|
||||
.build();
|
||||
|
||||
WorldEventScheduleDoc doc = findById(key);
|
||||
|
||||
return doc != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insert(WorldEventRequest worldEventRequest) {
|
||||
if(isEvent(worldEventRequest.getId().intValue())){
|
||||
log.error("insert EventId: {} is duplication", worldEventRequest.getId());
|
||||
throw new RestApiException(CommonCode.ERROR.getHttpStatus(), ErrorCode.DYNAMODB_CONNECTION_ERROR.getMessage());
|
||||
}
|
||||
|
||||
LocalDateTime nowDate = LocalDateTime.now();
|
||||
|
||||
try {
|
||||
WorldEventScheduleAttrib attrib = new WorldEventScheduleAttrib();
|
||||
attrib.setAttribType(DynamoDBConstants.ATTRIB_WORLD_EVENT_SCHEDULER);
|
||||
attrib.setActive(true);
|
||||
attrib.setId(worldEventRequest.getId().intValue());
|
||||
attrib.setStartTime(convertUTCDate(worldEventRequest.getStartDt()));
|
||||
attrib.setEndTime(convertUTCDate(worldEventRequest.getEndDt()));
|
||||
attrib.setGlobalEventContributionPointMax(worldEventRequest.getMaxPoint());
|
||||
attrib.setGlobalEventActionGroupId(worldEventRequest.getGlobalEventActionId());
|
||||
attrib.setPersonalEventActionGroupId(worldEventRequest.getPersonalEventActionId());
|
||||
|
||||
WorldEventScheduleDoc doc = new WorldEventScheduleDoc();
|
||||
doc.setPK(DynamoDBConstants.PK_KEY_WORLD_EVENT_SCHEDULER);
|
||||
doc.setSK(String.valueOf(worldEventRequest.getId()));
|
||||
doc.setDocType(DynamoDBConstants.DOC_WORLD_EVENT_SCHEDULER);
|
||||
doc.setAttribValue(objectMapper.writeValueAsString(attrib));
|
||||
doc.setCreatedDateTime(convertUTCDate(nowDate));
|
||||
doc.setUpdatedDateTime(convertUTCDate(nowDate));
|
||||
doc.setDeletedDateTime(DynamoDBConstants.MIN_DATE);
|
||||
doc.setRestoredDateTime(DynamoDBConstants.MIN_DATE);
|
||||
|
||||
save(doc);
|
||||
|
||||
}catch (Exception e){
|
||||
log.error("insert Error: {}", e.getMessage());
|
||||
throw new RestApiException(CommonCode.ERROR.getHttpStatus(), ErrorCode.DYNAMODB_CONNECTION_ERROR.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(WorldEventRequest worldEventRequest) {
|
||||
LocalDateTime nowDate = LocalDateTime.now();
|
||||
|
||||
try {
|
||||
Key key = Key.builder()
|
||||
.partitionValue(DynamoDBConstants.PK_KEY_WORLD_EVENT_SCHEDULER)
|
||||
.sortValue(String.valueOf(worldEventRequest.getId()))
|
||||
.build();
|
||||
|
||||
WorldEventScheduleDoc beforeDoc = findById(key);
|
||||
|
||||
if (beforeDoc != null) {
|
||||
WorldEventScheduleDoc afterDoc = deepCopy(beforeDoc, WorldEventScheduleDoc.class);
|
||||
|
||||
WorldEventScheduleAttrib attrib = objectMapper.readValue(afterDoc.getAttribValue(), WorldEventScheduleAttrib.class);
|
||||
attrib.setActive(true);
|
||||
attrib.setStartTime(convertUTCDate(worldEventRequest.getStartDt()));
|
||||
attrib.setEndTime(convertUTCDate(worldEventRequest.getEndDt()));
|
||||
attrib.setGlobalEventContributionPointMax(worldEventRequest.getMaxPoint());
|
||||
attrib.setGlobalEventActionGroupId(worldEventRequest.getGlobalEventActionId());
|
||||
attrib.setPersonalEventActionGroupId(worldEventRequest.getPersonalEventActionId());
|
||||
|
||||
afterDoc.setAttribValue(objectMapper.writeValueAsString(attrib));
|
||||
afterDoc.setUpdatedDateTime(CommonUtils.convertUTCDate(nowDate));
|
||||
|
||||
update(afterDoc);
|
||||
|
||||
log.info("WorldEventScheduleDoc Update Success: {}", objectMapper.writeValueAsString(afterDoc));
|
||||
|
||||
}
|
||||
}catch (Exception e){
|
||||
throw new RestApiException(CommonCode.ERROR.getHttpStatus(), ErrorCode.DYNAMODB_CONNECTION_ERROR.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public DynamodbOperationResult delete(String id) {
|
||||
try{
|
||||
Key key = Key.builder()
|
||||
.partitionValue(DynamoDBConstants.PK_KEY_BATTLE_EVENT)
|
||||
.sortValue(id)
|
||||
.build();
|
||||
WorldEventScheduleDoc doc = findById(key);
|
||||
|
||||
if(doc != null) {
|
||||
Key detailKey = Key.builder()
|
||||
.partitionValue(doc.getPK())
|
||||
.sortValue(doc.getSK())
|
||||
.build();
|
||||
|
||||
delete(detailKey);
|
||||
|
||||
log.info("WorldEventScheduleDoc Delete Success: {}", objectMapper.writeValueAsString(doc));
|
||||
|
||||
return new DynamodbOperationResult(true, "", doc);
|
||||
}
|
||||
return new DynamodbOperationResult(true, "null", null);
|
||||
}catch (Exception e){
|
||||
log.error("delete WorldEventScheduleDoc Error: {}", e.getMessage());
|
||||
return new DynamodbOperationResult(false, e.getMessage(), null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.caliverse.admin.dynamodb.repository;
|
||||
|
||||
import com.caliverse.admin.domain.request.RankRequest;
|
||||
import com.caliverse.admin.dynamodb.domain.doc.RankingScheduleDoc;
|
||||
import com.caliverse.admin.dynamodb.entity.DynamodbOperationResult;
|
||||
|
||||
public interface RankingSchedulerRepository extends DynamoDBRepository<RankingScheduleDoc> {
|
||||
void insert(RankRequest rankRequest);
|
||||
void update(RankRequest rankRequest);
|
||||
DynamodbOperationResult delete(String id);
|
||||
}
|
||||
@@ -1,14 +1,10 @@
|
||||
package com.caliverse.admin.dynamodb.repository;
|
||||
|
||||
import com.caliverse.admin.domain.entity.Event;
|
||||
import com.caliverse.admin.domain.entity.Item;
|
||||
import com.caliverse.admin.domain.entity.Message;
|
||||
import com.caliverse.admin.domain.entity.RewardEvent;
|
||||
import com.caliverse.admin.dynamodb.domain.doc.SystemMetaMailDoc;
|
||||
import com.caliverse.admin.dynamodb.entity.DynamodbOperationResult;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface SystemMetaMailRepository extends DynamoDBRepository<SystemMetaMailDoc> {
|
||||
void insert(Event event);
|
||||
void insert(RewardEvent rewardEvent);
|
||||
DynamodbOperationResult delete(String id);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.caliverse.admin.dynamodb.repository;
|
||||
|
||||
import com.caliverse.admin.domain.request.WorldEventRequest;
|
||||
import com.caliverse.admin.dynamodb.domain.doc.WorldEventScheduleDoc;
|
||||
import com.caliverse.admin.dynamodb.entity.DynamodbOperationResult;
|
||||
|
||||
public interface WorldEventScheduleRepository extends DynamoDBRepository<WorldEventScheduleDoc> {
|
||||
void insert(WorldEventRequest worldEventRequest);
|
||||
void update(WorldEventRequest worldEventRequest);
|
||||
DynamodbOperationResult delete(String id);
|
||||
}
|
||||
@@ -1,8 +1,7 @@
|
||||
package com.caliverse.admin.dynamodb.service;
|
||||
|
||||
import com.caliverse.admin.Indicators.entity.MoneyLogInfo;
|
||||
import com.caliverse.admin.domain.datacomponent.MetaDataHandler;
|
||||
import com.caliverse.admin.domain.entity.Event;
|
||||
import com.caliverse.admin.domain.entity.RewardEvent;
|
||||
import com.caliverse.admin.domain.entity.SEARCHTYPE;
|
||||
import com.caliverse.admin.domain.entity.metadata.MetaLandData;
|
||||
import com.caliverse.admin.domain.entity.metadata.MetaSystemMailData;
|
||||
@@ -15,15 +14,10 @@ import com.caliverse.admin.dynamodb.dto.PageResult;
|
||||
import com.caliverse.admin.dynamodb.entity.KeyParam;
|
||||
import com.caliverse.admin.dynamodb.repository.*;
|
||||
import com.caliverse.admin.global.common.annotation.DynamoDBTransaction;
|
||||
import com.caliverse.admin.global.common.constants.AdminConstants;
|
||||
import com.caliverse.admin.global.common.constants.CommonConstants;
|
||||
import com.caliverse.admin.global.common.constants.DynamoDBConstants;
|
||||
import com.caliverse.admin.global.common.utils.CommonUtils;
|
||||
import com.caliverse.admin.global.common.utils.DateUtils;
|
||||
import com.caliverse.admin.logs.Indicatordomain.StartEndTime;
|
||||
import com.caliverse.admin.logs.logservice.LogServiceHelper;
|
||||
import com.caliverse.admin.logs.logservice.indicators.IndicatorsMoneyService;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -47,8 +41,8 @@ public class DynamodbMailService {
|
||||
private final MetaDataHandler metaDataHandler;
|
||||
|
||||
@DynamoDBTransaction
|
||||
public void insertSystemMail(Event event){
|
||||
systemMetaMailRepository.insert(event);
|
||||
public void insertSystemMail(RewardEvent rewardEvent){
|
||||
systemMetaMailRepository.insert(rewardEvent);
|
||||
}
|
||||
|
||||
@DynamoDBTransaction
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.caliverse.admin.dynamodb.service;
|
||||
|
||||
import com.caliverse.admin.domain.entity.RankingSchedule;
|
||||
import com.caliverse.admin.domain.request.RankRequest;
|
||||
import com.caliverse.admin.dynamodb.repository.RankingSchedulerRepository;
|
||||
import com.caliverse.admin.global.common.annotation.DynamoDBTransaction;
|
||||
import com.caliverse.admin.global.common.constants.DynamoDBConstants;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import software.amazon.awssdk.enhanced.dynamodb.Key;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class DynamodbRankService {
|
||||
private final RankingSchedulerRepository rankingScheduleRepository;
|
||||
|
||||
@DynamoDBTransaction
|
||||
public void insertRankingSchedule(RankRequest rankRequest) {
|
||||
rankingScheduleRepository.insert(rankRequest);
|
||||
}
|
||||
|
||||
@DynamoDBTransaction
|
||||
public void updateRankingSchedule(RankRequest rankRequest) {
|
||||
rankingScheduleRepository.update(rankRequest);
|
||||
}
|
||||
|
||||
@DynamoDBTransaction
|
||||
public void deleteRankingSchedule(RankingSchedule rankingSchedule) {
|
||||
rankingScheduleRepository.delete(rankingSchedule.getGuid());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,42 +2,22 @@ package com.caliverse.admin.dynamodb.service;
|
||||
|
||||
import com.caliverse.admin.Indicators.entity.MoneyLogInfo;
|
||||
import com.caliverse.admin.domain.datacomponent.MetaDataHandler;
|
||||
import com.caliverse.admin.domain.entity.Event;
|
||||
import com.caliverse.admin.domain.entity.SEARCHTYPE;
|
||||
import com.caliverse.admin.domain.entity.metadata.MetaLandData;
|
||||
import com.caliverse.admin.domain.entity.metadata.MetaSystemMailData;
|
||||
import com.caliverse.admin.domain.request.LandRequest;
|
||||
import com.caliverse.admin.dynamodb.domain.atrrib.MailItemAttrib;
|
||||
import com.caliverse.admin.dynamodb.domain.atrrib.MailJsonAttrib;
|
||||
import com.caliverse.admin.domain.entity.WorldEvent;
|
||||
import com.caliverse.admin.domain.request.RankRequest;
|
||||
import com.caliverse.admin.domain.request.WorldEventRequest;
|
||||
import com.caliverse.admin.dynamodb.domain.atrrib.MoneyAttrib;
|
||||
import com.caliverse.admin.dynamodb.domain.atrrib.UserNicknameRegistryAttrib;
|
||||
import com.caliverse.admin.dynamodb.domain.doc.MailDoc;
|
||||
import com.caliverse.admin.dynamodb.domain.doc.MailJsonDoc;
|
||||
import com.caliverse.admin.dynamodb.dto.PageResult;
|
||||
import com.caliverse.admin.dynamodb.entity.KeyParam;
|
||||
import com.caliverse.admin.dynamodb.entity.MailItem;
|
||||
import com.caliverse.admin.dynamodb.repository.*;
|
||||
import com.caliverse.admin.global.common.annotation.DynamoDBTransaction;
|
||||
import com.caliverse.admin.global.common.constants.AdminConstants;
|
||||
import com.caliverse.admin.global.common.constants.CommonConstants;
|
||||
import com.caliverse.admin.global.common.constants.DynamoDBConstants;
|
||||
import com.caliverse.admin.global.common.utils.CommonUtils;
|
||||
import com.caliverse.admin.logs.Indicatordomain.StartEndTime;
|
||||
import com.caliverse.admin.logs.logservice.LogServiceHelper;
|
||||
import com.caliverse.admin.logs.logservice.indicators.IndicatorsMoneyService;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.node.ArrayNode;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import software.amazon.awssdk.enhanced.dynamodb.Key;
|
||||
import software.amazon.awssdk.services.dynamodb.model.AttributeValue;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
@@ -49,6 +29,7 @@ public class DynamodbService {
|
||||
private final SystemMetaMailRepository systemMetaMailRepository;
|
||||
private final MailRepository mailRepository;
|
||||
private final MailJsonRepository mailJsonRepository;
|
||||
private final WorldEventScheduleRepository worldEventScheduleRepository;
|
||||
|
||||
private final IndicatorsMoneyService moneyService;
|
||||
|
||||
@@ -71,4 +52,19 @@ public class DynamodbService {
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@DynamoDBTransaction
|
||||
public void insertWorldEventSchedule(WorldEventRequest worldEventRequest) {
|
||||
worldEventScheduleRepository.insert(worldEventRequest);
|
||||
}
|
||||
|
||||
@DynamoDBTransaction
|
||||
public void updateWorldEventSchedule(WorldEventRequest worldEventRequest) {
|
||||
worldEventScheduleRepository.update(worldEventRequest);
|
||||
}
|
||||
|
||||
@DynamoDBTransaction
|
||||
public void deleteWorldEventSchedule(WorldEvent worldEvent) {
|
||||
worldEventScheduleRepository.delete(worldEvent.getId().toString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.caliverse.admin.global.common.utils;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class DataHelper {
|
||||
public static LocalDateTime parseDateTime(Object dateObj) {
|
||||
if (dateObj == null || dateObj.toString().isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return LocalDateTime.parse(dateObj.toString().replace("+00:00", ""));
|
||||
} catch (Exception e) {
|
||||
log.warn("Failed to parse date: {}", dateObj);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static Float parseFloat(Object floatObj) {
|
||||
if (floatObj == null) {
|
||||
return null;
|
||||
}
|
||||
if (floatObj instanceof Number) {
|
||||
return ((Number) floatObj).floatValue();
|
||||
}
|
||||
try {
|
||||
return Float.parseFloat(floatObj.toString());
|
||||
} catch (NumberFormatException e) {
|
||||
log.warn("Failed to parse float: {}", floatObj);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static Double convertToDouble(Object value) {
|
||||
if (value == null) return null;
|
||||
if (value instanceof Double) return (Double) value;
|
||||
if (value instanceof Integer) return ((Integer) value).doubleValue();
|
||||
if (value instanceof Long) return ((Long) value).doubleValue();
|
||||
if (value instanceof String) {
|
||||
try {
|
||||
return Double.valueOf((String) value);
|
||||
} catch (NumberFormatException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package com.caliverse.admin.logs.entity;
|
||||
|
||||
public enum LogAction {
|
||||
None(""),
|
||||
AdminToolQuestTaskForceComplete("운영툴 명령으로 인한 퀘스트 Task 강제 완료"),
|
||||
AIChatDeleteCharacter("NPC 삭제"),
|
||||
AIChatDeleteUser("유저 삭제"),
|
||||
AIChatGetCharacter("NPC 조회"),
|
||||
@@ -81,6 +82,7 @@ public enum LogAction {
|
||||
ClaimReward("클레임 리워드 이벤트 보상"),
|
||||
ConvertCalium("칼리움 컨버터 변환"),
|
||||
ConvertExchangeCalium("칼리움 교환소 변환"),
|
||||
ContentsMove("메인 메뉴 컨텐츠 이동"),
|
||||
CraftFinish("제작 완료"),
|
||||
CraftHelp("제작 도움"),
|
||||
CraftRecipeRegister("제작 레시피 추가"),
|
||||
@@ -106,6 +108,12 @@ public enum LogAction {
|
||||
FillupCalium("칼리움 총량 누적"),
|
||||
FriendAdd("친구추가"),
|
||||
FriendDelete("친구삭세"),
|
||||
GameModeObjectInteraction("게임모드 오브젝트 상호작용"),
|
||||
GameModeObjectStateUpdate("게임모드 오브젝트 상태 변경"),
|
||||
GameModeUserDead("게임모드 유저 데드"),
|
||||
GameModeUserRespawn("게임모드 리스폰"),
|
||||
GameModePenalty("게임모드 패널티"),
|
||||
GameModeAddMatchCount("GameMode 매치카운트 증가"),
|
||||
GainLandProfit("랜드 수익 획득"),
|
||||
igmApiLogin("igmApi 로그인"),
|
||||
InviteParty("파티 초대"),
|
||||
@@ -136,8 +144,17 @@ public enum LogAction {
|
||||
MailRead("우편 읽기"),
|
||||
MailSend("우편 발송"),
|
||||
MailTaken("우편 첨부 수령"),
|
||||
MatchReserve("매칭 예약"),
|
||||
MatchCancel("매칭 취소"),
|
||||
MatchResult("매칭 결과"),
|
||||
MatchRoomUserJoin("매칭 룸 입장"),
|
||||
MatchRoomUserQuit("매칭 룸 퇴장"),
|
||||
MatchRoomCreate("매칭 룸 생성"),
|
||||
MatchRoomUpdate("매칭 룸 업데이트"),
|
||||
MatchRoomDestroy("매칭 룸 삭제"),
|
||||
ModifyLandInfo("랜드 정보 수정"),
|
||||
MoneyChange("재화 변경"),
|
||||
MoveToBeacon("비컨으로 이동"),
|
||||
ProductGive("결제 상품 지급"),
|
||||
ProductOpenFailed("결제 상품 오픈 실패"),
|
||||
ProductOpenSuccess("결제 상품 오픈 성공"),
|
||||
@@ -160,6 +177,11 @@ public enum LogAction {
|
||||
ReplySummonParty("파티 맴버 소환 응답"),
|
||||
ReservationEnterToServer("서버 이동 예약"),
|
||||
RewardProp("리워드 프랍"),
|
||||
RunRaceFinishReward("레이스 완주 보상"),
|
||||
RunRaceRespawnReward("레이스 리스폰 보상"),
|
||||
RunRaceUnFinishReward("레이스 미완주 보상"),
|
||||
RunRaceCheckPointAbusing("체크포인트 어뷰징"),
|
||||
RunRaceResultSummary("결과 요약"),
|
||||
SaveMyhome("마이홈 저장"),
|
||||
SeasonPassBuyCharged("시즌 패스 유료 구입"),
|
||||
SeasonPassStartNew("새로운 시즌 패스 시작"),
|
||||
@@ -215,6 +237,7 @@ public enum LogAction {
|
||||
UserLogout("유저 로그아웃"),
|
||||
UserLogoutSnapShot("게임 로그아웃 스냅샷"),
|
||||
UserReport("유저 신고"),
|
||||
UpdateGameModePlayerRegulation("게임모드 규정"),
|
||||
ItemDestroyByUser("아이템 제거 (사용자에 의해)"),
|
||||
ItemDestoryByExpiration("아이템 제거 (기간만료에 의해)"),
|
||||
|
||||
|
||||
@@ -82,6 +82,18 @@ public enum LogDomain {
|
||||
PlanetUserAuth("플래닛 유저 인증"),
|
||||
PlanetItemExchange("플래닛 아이템 교환"),
|
||||
|
||||
GameObjectInteraction("게임 오브젝트 인터렉션"),
|
||||
RunRaceFinishReward("러닝 완주 보상"),
|
||||
RunRaceRespawnReward("러닝 리스폰 보상"),
|
||||
RunRaceUnFinishReward("러닝 미완주 보상"),
|
||||
RunRaceCheckPointAbusing("러닝 체크포인트 어뷰징"),
|
||||
RunRaceRewardSummary("러닝 리워드 결과 요약"),
|
||||
GameModePenalty("게임모드 패널티"),
|
||||
GameModePlayRegulation("게임모드 규정"),
|
||||
MatchUser("매칭 유저"),
|
||||
MatchServerUser("매칭 서버 유저"),
|
||||
MatchRoom("매칭 룸"),
|
||||
|
||||
// IgmApi (전체 도메인이 누락됨)
|
||||
IgmApi("IgmApi"),
|
||||
BattleSnapshot("전투 스냅샷");
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.caliverse.admin.domain.entity.log.GenericLog;
|
||||
import com.caliverse.admin.domain.request.LogGenericRequest;
|
||||
import com.caliverse.admin.global.common.constants.AdminConstants;
|
||||
import com.caliverse.admin.global.common.utils.CommonUtils;
|
||||
import com.caliverse.admin.global.common.utils.DateUtils;
|
||||
import com.caliverse.admin.logs.Indicatordomain.GenericMongoLog;
|
||||
import com.caliverse.admin.logs.entity.LogAction;
|
||||
import com.caliverse.admin.logs.entity.LogDomain;
|
||||
@@ -278,8 +279,8 @@ public class BusinessLogGenericService extends BusinessLogServiceBase {
|
||||
}
|
||||
|
||||
private List<GenericMongoLog> loadRawLogData(LogGenericRequest logGenericRequest) {
|
||||
String startTime = logGenericRequest.getStartDt().toString().substring(0, 10);
|
||||
String endTime = logGenericRequest.getEndDt().toString().substring(0, 10);
|
||||
String startTime = DateUtils.stringToISODateTime(logGenericRequest.getStartDt());
|
||||
String endTime = DateUtils.stringToISODateTime(logGenericRequest.getEndDt());
|
||||
LogAction logAction = logGenericRequest.getLogAction();
|
||||
LogDomain logDomain = logGenericRequest.getLogDomain();
|
||||
SearchUserType searchUserType = logGenericRequest.getSearchType();
|
||||
|
||||
@@ -2,14 +2,18 @@ package com.caliverse.admin.logs.logservice.indicators;
|
||||
|
||||
import com.caliverse.admin.Indicators.Indicatordomain.IndicatorsLog;
|
||||
import com.caliverse.admin.Indicators.Indicatorsservice.base.IndicatorsLogLoadServiceBase;
|
||||
import com.caliverse.admin.Indicators.entity.CurrencyItemLogInfo;
|
||||
import com.caliverse.admin.Indicators.entity.CurrencyLogInfo;
|
||||
import com.caliverse.admin.Indicators.indicatorrepository.IndicatorCurrencyRepository;
|
||||
import com.caliverse.admin.domain.entity.common.SearchUserType;
|
||||
import com.caliverse.admin.global.common.constants.AdminConstants;
|
||||
import com.caliverse.admin.global.common.utils.DataHelper;
|
||||
import com.caliverse.admin.logs.Indicatordomain.CurrencyMongoLog;
|
||||
import com.caliverse.admin.logs.logservice.businesslogservice.BusinessLogCurrencyService;
|
||||
import com.caliverse.admin.mongodb.dto.MongoPageResult;
|
||||
import com.mongodb.BasicDBObject;
|
||||
import com.mongodb.client.MongoCollection;
|
||||
import com.mongodb.client.MongoCursor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.bson.Document;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -201,8 +205,8 @@ public class IndicatorsCurrencyService extends IndicatorsLogLoadServiceBase {
|
||||
.and("currencies.currencyAmount").as("currencyAmount");
|
||||
|
||||
List<AggregationOperation> baseOperations = new ArrayList<>(List.of(
|
||||
Aggregation.match(criteria),
|
||||
unwindOperation,
|
||||
Aggregation.match(criteria),
|
||||
projection,
|
||||
Aggregation.sort(orderBy.equals("DESC") ? Sort.Direction.DESC : Sort.Direction.ASC, AdminConstants.MONGO_DB_KEY_LOGTIME)
|
||||
));
|
||||
@@ -292,37 +296,100 @@ public class IndicatorsCurrencyService extends IndicatorsLogLoadServiceBase {
|
||||
}
|
||||
}
|
||||
|
||||
Criteria postUnwindCriteria = new Criteria();
|
||||
if(logAction != null && !logAction.isEmpty() && !logAction.equals("None")){
|
||||
postUnwindCriteria.and("currencies.action").is(logAction);
|
||||
}
|
||||
if(currencyType != null && !currencyType.isEmpty() && !currencyType.equals("None")){
|
||||
postUnwindCriteria.and("currencies.currencyType").is(currencyType);
|
||||
}
|
||||
if(amountDeltaType != null && !amountDeltaType.isEmpty() && !amountDeltaType.equals("None")){
|
||||
postUnwindCriteria.and("currencies.amountDeltaType").is(amountDeltaType);
|
||||
}
|
||||
|
||||
int totalCount = 0;
|
||||
|
||||
// 카운트 계산
|
||||
if(page != null && page != 0) {
|
||||
totalCount = getOptimizedCount(criteria, postUnwindCriteria);
|
||||
}
|
||||
|
||||
List<T> items = getDataWithLookup(criteria, postUnwindCriteria, startTime, endTime, orderBy, page, size, clazz);
|
||||
|
||||
return new MongoPageResult<>(items, totalCount);
|
||||
}
|
||||
|
||||
// 최적화된 카운트 메소드
|
||||
private int getOptimizedCount(Criteria criteria, Criteria postUnwindCriteria) {
|
||||
List<AggregationOperation> countOperations = new ArrayList<>();
|
||||
|
||||
countOperations.add(Aggregation.match(criteria));
|
||||
|
||||
countOperations.add(Aggregation.unwind("currencies"));
|
||||
|
||||
if (!postUnwindCriteria.getCriteriaObject().isEmpty()) {
|
||||
countOperations.add(Aggregation.match(postUnwindCriteria));
|
||||
}
|
||||
|
||||
countOperations.add(Aggregation.count().as("total"));
|
||||
|
||||
Aggregation countAggregation = Aggregation.newAggregation(countOperations);
|
||||
Document countResult = mongoTemplate.aggregate(
|
||||
countAggregation.withOptions(AggregationOptions.builder().allowDiskUse(true).build()),
|
||||
AdminConstants.MONGO_DB_COLLECTION_CURRENCY,
|
||||
Document.class
|
||||
).getUniqueMappedResult();
|
||||
|
||||
return countResult != null ? countResult.getInteger("total") : 0;
|
||||
}
|
||||
|
||||
// 데이터 조회 메소드
|
||||
private <T extends IndicatorsLog> List<T> getDataWithLookup(
|
||||
Criteria criteria,
|
||||
Criteria postUnwindCriteria,
|
||||
String startTime,
|
||||
String endTime,
|
||||
String orderBy,
|
||||
Integer page,
|
||||
Integer size,
|
||||
Class<T> clazz) {
|
||||
|
||||
UnwindOperation unwindOperation = Aggregation.unwind("currencies");
|
||||
|
||||
AggregationOperation lookup = context -> new Document("$lookup",
|
||||
new Document("from", "item")
|
||||
.append("let", new Document("tranId", "$currencies.tranId"))
|
||||
.append("pipeline", Arrays.asList(
|
||||
new Document("$unwind", "$itemDetails"),
|
||||
new Document("$match",
|
||||
new Document("$expr",
|
||||
new Document("$eq", Arrays.asList("$itemDetails.tranId", "$$tranId")))),
|
||||
new Document("$unwind", "$itemDetails.items"),
|
||||
new Document("$group",
|
||||
new Document("_id", "$itemDetails.tranId")
|
||||
.append("itemMIDs", new Document("$push", "$itemDetails.items.itemMID"))),
|
||||
new Document("$project",
|
||||
new Document("tranId", "$_id")
|
||||
.append("itemMIDString",
|
||||
new Document("$reduce",
|
||||
new Document("input", "$itemMIDs")
|
||||
.append("initialValue", "")
|
||||
.append("in",
|
||||
new Document("$cond", Arrays.asList(
|
||||
new Document("$eq", Arrays.asList("$$value", "")),
|
||||
new Document("$toString", "$$this"),
|
||||
new Document("$concat", Arrays.asList("$$value", "|", new Document("$toString", "$$this")))
|
||||
))))))
|
||||
))
|
||||
.append("as", "itemInfo"));
|
||||
//자바에서lookup은 성은부하가크다
|
||||
// AggregationOperation lookup = context -> new Document("$lookup",
|
||||
// new Document("from", "item")
|
||||
// .append("let", new Document("tranId", "$currencies.tranId"))
|
||||
// .append("pipeline", Arrays.asList(
|
||||
// new Document("$match",
|
||||
// new Document("logDay",
|
||||
// new Document("$gte", startTime)
|
||||
// .append("$lte", endTime))),
|
||||
// new Document("$unwind", "$itemDetails"),
|
||||
// new Document("$match",
|
||||
// new Document("$expr",
|
||||
// new Document("$eq", Arrays.asList("$itemDetails.tranId", "$$tranId")))),
|
||||
// new Document("$unwind", "$itemDetails.items"),
|
||||
// new Document("$group",
|
||||
// new Document("_id", "$itemDetails.tranId")
|
||||
// .append("itemMIDs", new Document("$addToSet", "$itemDetails.items.itemMID"))),
|
||||
// new Document("$project",
|
||||
// new Document("tranId", "$_id")
|
||||
// .append("itemMIDString",
|
||||
// new Document("$reduce",
|
||||
// new Document("input", "$itemMIDs")
|
||||
// .append("initialValue", "")
|
||||
// .append("in",
|
||||
// new Document("$cond", Arrays.asList(
|
||||
// new Document("$eq", Arrays.asList("$$value", "")),
|
||||
// new Document("$toString", "$$this"),
|
||||
// new Document("$concat", Arrays.asList("$$value", "|", new Document("$toString", "$$this")))
|
||||
// ))))))
|
||||
// ))
|
||||
// .append("as", "itemInfo"));
|
||||
|
||||
ProjectionOperation projection = Aggregation.project()
|
||||
.and("_id").as("id")
|
||||
.andExclude("_id")
|
||||
.and(AdminConstants.MONGO_DB_KEY_LOGDAY).as("logDay")
|
||||
.and(AdminConstants.MONGO_DB_KEY_ACCOUNT_ID).as("accountId")
|
||||
.and(AdminConstants.MONGO_DB_KEY_USER_GUID).as("userGuid")
|
||||
@@ -338,59 +405,34 @@ public class IndicatorsCurrencyService extends IndicatorsLogLoadServiceBase {
|
||||
ArrayOperators.arrayOf("itemInfo.itemMIDString").elementAt(0))
|
||||
.then("")).as("itemIDs");
|
||||
|
||||
List<AggregationOperation> baseOperations = new ArrayList<>(List.of(
|
||||
Aggregation.match(criteria),
|
||||
unwindOperation,
|
||||
lookup,
|
||||
projection,
|
||||
Aggregation.sort(orderBy.equals("DESC") ? Sort.Direction.DESC : Sort.Direction.ASC, AdminConstants.MONGO_DB_KEY_LOGTIME)
|
||||
));
|
||||
List<AggregationOperation> dataOperations = new ArrayList<>();
|
||||
|
||||
Criteria postUnwindCriteria = new Criteria();
|
||||
if(logAction != null && !logAction.isEmpty() && !logAction.equals("None")){
|
||||
postUnwindCriteria.and("action").is(logAction);
|
||||
}
|
||||
dataOperations.add(unwindOperation);
|
||||
|
||||
if(currencyType != null && !currencyType.isEmpty() && !currencyType.equals("None")){
|
||||
postUnwindCriteria.and("currencyType").is(currencyType);
|
||||
}
|
||||
|
||||
if(amountDeltaType != null && !amountDeltaType.isEmpty() && !amountDeltaType.equals("None")){
|
||||
postUnwindCriteria.and("amountDeltaType").is(amountDeltaType);
|
||||
}
|
||||
dataOperations.add(Aggregation.match(criteria));
|
||||
|
||||
if (!postUnwindCriteria.getCriteriaObject().isEmpty()) {
|
||||
baseOperations.add(Aggregation.match(postUnwindCriteria));
|
||||
dataOperations.add(Aggregation.match(postUnwindCriteria));
|
||||
}
|
||||
|
||||
int totalCount = 0;
|
||||
if(page != null && page != 0) {
|
||||
List<AggregationOperation> countOperations = new ArrayList<>(baseOperations);
|
||||
countOperations.add(Aggregation.count().as("total"));
|
||||
// dataOperations.add(lookup);
|
||||
|
||||
Aggregation countAggregation = Aggregation.newAggregation(countOperations);
|
||||
Document countResult = mongoTemplate.aggregate(
|
||||
countAggregation.withOptions(AggregationOptions.builder().allowDiskUse(true).build()),
|
||||
AdminConstants.MONGO_DB_COLLECTION_CURRENCY,
|
||||
Document.class
|
||||
).getUniqueMappedResult();
|
||||
totalCount = countResult != null ? countResult.getInteger("total") : 0;
|
||||
}
|
||||
dataOperations.add(Aggregation.sort(orderBy.equals("DESC") ? Sort.Direction.DESC : Sort.Direction.ASC, "currencies.logTime"));
|
||||
|
||||
List<AggregationOperation> dataOperations = new ArrayList<>(baseOperations);
|
||||
if(page != null && page != 0) {
|
||||
int skip = (page - 1) * size;
|
||||
dataOperations.add(Aggregation.skip((long) skip));
|
||||
dataOperations.add(Aggregation.limit(size));
|
||||
}
|
||||
|
||||
dataOperations.add(projection);
|
||||
|
||||
Aggregation aggregation = Aggregation.newAggregation(dataOperations);
|
||||
List<T> items = mongoTemplate.aggregate(
|
||||
return mongoTemplate.aggregate(
|
||||
aggregation.withOptions(AggregationOptions.builder().allowDiskUse(true).build()),
|
||||
AdminConstants.MONGO_DB_COLLECTION_CURRENCY,
|
||||
clazz
|
||||
).getMappedResults();
|
||||
|
||||
return new MongoPageResult<>(items, totalCount);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.caliverse.admin.logs.Indicatordomain.ItemMongoLog;
|
||||
import com.caliverse.admin.logs.logservice.businesslogservice.BusinessLogCurrencyService;
|
||||
import com.caliverse.admin.logs.logservice.businesslogservice.BusinessLogItemService;
|
||||
import com.caliverse.admin.mongodb.dto.MongoPageResult;
|
||||
import com.mongodb.client.MongoCollection;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.bson.Document;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -22,8 +23,7 @@ import org.springframework.data.mongodb.core.aggregation.*;
|
||||
import org.springframework.data.mongodb.core.query.Criteria;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
@@ -116,6 +116,7 @@ public class IndicatorsItemService extends IndicatorsLogLoadServiceBase {
|
||||
String searchType,
|
||||
String searchData,
|
||||
String tranId,
|
||||
String itemId,
|
||||
String logAction,
|
||||
String itemLargeType,
|
||||
String itemSmallType,
|
||||
@@ -202,6 +203,10 @@ public class IndicatorsItemService extends IndicatorsLogLoadServiceBase {
|
||||
postUnwindCriteria.and("countDeltaType").is(countDeltaType);
|
||||
}
|
||||
|
||||
if(itemId != null && !itemId.isEmpty()){
|
||||
postUnwindCriteria.and("itemId").is(Integer.parseInt(itemId));
|
||||
}
|
||||
|
||||
if (!postUnwindCriteria.getCriteriaObject().isEmpty()) {
|
||||
baseOperations.add(Aggregation.match(postUnwindCriteria));
|
||||
}
|
||||
@@ -236,4 +241,52 @@ public class IndicatorsItemService extends IndicatorsLogLoadServiceBase {
|
||||
|
||||
return new MongoPageResult<>(items, totalCount);
|
||||
}
|
||||
|
||||
public Map<String, String> getCurrencyItemLogData(
|
||||
Set<String> tranIds,
|
||||
String startTime,
|
||||
String endTime
|
||||
) {
|
||||
if (tranIds.isEmpty()) {
|
||||
return new HashMap<>();
|
||||
}
|
||||
|
||||
MongoCollection<Document> itemCollection = mongoTemplate.getCollection("item");
|
||||
|
||||
List<Document> pipeline = Arrays.asList(
|
||||
new Document("$match", new Document()
|
||||
.append("logDay", new Document("$gte", startTime).append("$lte", endTime))),
|
||||
|
||||
new Document("$unwind", "$itemDetails"),
|
||||
|
||||
new Document("$match", new Document()
|
||||
.append("itemDetails.tranId", new Document("$in", new ArrayList<>(tranIds)))),
|
||||
|
||||
new Document("$unwind", "$itemDetails.items"),
|
||||
|
||||
new Document("$group", new Document()
|
||||
.append("_id", "$itemDetails.tranId")
|
||||
.append("itemMIDs", new Document("$addToSet", "$itemDetails.items.itemMID"))),
|
||||
|
||||
new Document("$project", new Document()
|
||||
.append("tranId", "$_id")
|
||||
.append("itemMIDString", new Document("$reduce", new Document()
|
||||
.append("input", "$itemMIDs")
|
||||
.append("initialValue", "")
|
||||
.append("in", new Document("$cond", Arrays.asList(
|
||||
new Document("$eq", Arrays.asList("$$value", "")),
|
||||
new Document("$toString", "$$this"),
|
||||
new Document("$concat", Arrays.asList("$$value", "|", new Document("$toString", "$$this")))
|
||||
))))))
|
||||
);
|
||||
|
||||
Map<String, String> itemMap = new HashMap<>();
|
||||
itemCollection.aggregate(pipeline).forEach(doc -> {
|
||||
String tranId = doc.getString("tranId");
|
||||
String itemMIDString = doc.getString("itemMIDString");
|
||||
itemMap.put(tranId, itemMIDString != null ? itemMIDString : "");
|
||||
});
|
||||
|
||||
return itemMap;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.caliverse.admin.mongodb.domain;
|
||||
import com.caliverse.admin.domain.entity.log.LogAction;
|
||||
import com.caliverse.admin.domain.entity.log.LogCategory;
|
||||
import com.caliverse.admin.domain.entity.log.LogStatus;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
@@ -42,6 +43,7 @@ public class BusinessLog {
|
||||
|
||||
private String procId;
|
||||
|
||||
@JsonIgnoreProperties(value = {"messageContent"}, allowSetters = true)
|
||||
private Object domain;
|
||||
|
||||
@CompoundIndex(def = "{'category': 1, 'action': 1, 'logTime': -1}")
|
||||
|
||||
@@ -181,7 +181,7 @@ public class BusinessLogService {
|
||||
.build();
|
||||
|
||||
return saveLog(
|
||||
LogCategory.MESSAGE_QUEUE,
|
||||
LogCategory.S3,
|
||||
status,
|
||||
message,
|
||||
domain,
|
||||
|
||||
@@ -45,7 +45,7 @@ public class HistoryLogService {
|
||||
new Document("$addFields",
|
||||
new Document("logTimeString",
|
||||
new Document("$dateToString",
|
||||
new Document("format", "%Y-%m-%d")
|
||||
new Document("format", "%Y-%m-%dT%H:%M:%S")
|
||||
.append("date", "$logTime")
|
||||
)
|
||||
)
|
||||
|
||||
@@ -72,10 +72,6 @@ public class NoticeScheduler extends CommonScheduler {
|
||||
noticeList.forEach(notice -> {
|
||||
String key = "notice-" + notice.getId();
|
||||
if (!schedulerService.isTaskExist(key)) {
|
||||
if(notice.getEndDt().isBefore(startTime)){
|
||||
noticeService.updateNoticeStatus(notice.getId(), InGame.SENDSTATUS.FAIL);
|
||||
return;
|
||||
}
|
||||
processedCount.incrementAndGet();
|
||||
|
||||
Runnable taskRunner = new Runnable() {
|
||||
|
||||
174
src/main/resources/mappers/RankMapper.xml
Normal file
174
src/main/resources/mappers/RankMapper.xml
Normal file
@@ -0,0 +1,174 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.caliverse.admin.domain.dao.admin.RankMapper">
|
||||
<resultMap id="RankScheduleResultMap" type="com.caliverse.admin.domain.entity.RankingSchedule">
|
||||
<id property="id" column="id"/>
|
||||
<result property="rowNum" column="row_num"/>
|
||||
<result property="guid" column="guid"/>
|
||||
<result property="title" column="title"/>
|
||||
<result property="metaId" column="meta_id"/>
|
||||
<result property="eventActionId" column="event_action_id"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="startDt" column="start_dt"/>
|
||||
<result property="endDt" column="end_dt"/>
|
||||
<result property="baseDt" column="base_dt"/>
|
||||
<result property="refreshInterval" column="refresh_interval"/>
|
||||
<result property="initializationInterval" column="initialization_interval"/>
|
||||
<result property="snapshotInterval" column="snapshot_interval"/>
|
||||
<result property="deleted" column="deleted"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createDt" column="create_dt"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateDt" column="update_dt"/>
|
||||
</resultMap>
|
||||
|
||||
<!--리스트 조회-->
|
||||
<select id="getRankingScheduleList" resultMap="RankScheduleResultMap" parameterType="map">
|
||||
SELECT * FROM (
|
||||
SELECT (@row_number:=@row_number + 1) AS row_num, c.*
|
||||
FROM (
|
||||
SELECT
|
||||
a.id,
|
||||
a.guid,
|
||||
a.title,
|
||||
a.meta_id,
|
||||
a.event_action_id,
|
||||
CASE
|
||||
WHEN NOW() < a.start_dt THEN 'WAIT'
|
||||
WHEN NOW() >= a.start_dt AND NOW() <= a.end_dt THEN 'RUNNING'
|
||||
WHEN NOW() > a.end_dt THEN 'FINISH'
|
||||
END AS status,
|
||||
a.start_dt,
|
||||
a.end_dt,
|
||||
a.base_dt,
|
||||
a.refresh_interval,
|
||||
a.initialization_interval,
|
||||
a.snapshot_interval,
|
||||
(SELECT email FROM admin WHERE id = a.create_by) AS create_by,
|
||||
a.create_dt,
|
||||
(SELECT email FROM admin WHERE id = a.update_by) AS update_by,
|
||||
a.update_dt
|
||||
FROM ranking_schedule a
|
||||
WHERE 1 = 1
|
||||
AND a.deleted = 0
|
||||
|
||||
<if test="searchData != null and searchData != ''">
|
||||
AND a.title LIKE CONCAT('%',#{searchData},'%')
|
||||
</if>
|
||||
|
||||
<if test="status != null and status != ''">
|
||||
<choose>
|
||||
<when test="status != 'ALL'">
|
||||
AND CASE
|
||||
WHEN NOW() < a.start_dt THEN 'WAIT'
|
||||
WHEN NOW() >= a.start_dt AND NOW() <= a.end_dt THEN 'RUNNING'
|
||||
WHEN NOW() > a.end_dt THEN 'FINISH'
|
||||
END = #{status}
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
|
||||
<if test="startDate != null and startDate != '' and endDate !=null and endDate!= ''">
|
||||
AND a.start_dt >= #{startDate, jdbcType=TIMESTAMP}
|
||||
AND a.end_dt <= #{endDate, jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
|
||||
) c,
|
||||
(SELECT @row_number:=0) AS t
|
||||
ORDER BY
|
||||
CASE
|
||||
WHEN c.status = 'RUNNING' THEN 0
|
||||
WHEN c.status = 'WAIT' THEN 1
|
||||
WHEN c.status = 'FINISH' THEN 2
|
||||
ELSE 3
|
||||
END,
|
||||
c.create_dt
|
||||
) result
|
||||
<if test="orderby != null and orderby != ''">
|
||||
ORDER BY row_num ${orderby}
|
||||
</if>
|
||||
<if test="pageSize != null and pageSize != ''">
|
||||
LIMIT ${pageSize} OFFSET ${offset}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getTotal" resultType="java.lang.Integer" parameterType="map">
|
||||
SELECT count(*) FROM ranking_schedule WHERE deleted = 0
|
||||
</select>
|
||||
|
||||
<!--이벤트 상세 조회-->
|
||||
<select id="getRankingScheduleDetail" parameterType="java.lang.Long" resultMap="RankScheduleResultMap" >
|
||||
SELECT
|
||||
a.id
|
||||
, a.guid
|
||||
, a.title
|
||||
, a.meta_id
|
||||
, a.event_action_id
|
||||
, a.start_dt
|
||||
, a.end_dt
|
||||
, a.base_dt
|
||||
, a.refresh_interval
|
||||
, a.initialization_interval
|
||||
, a.snapshot_interval
|
||||
, CASE
|
||||
WHEN NOW() < a.start_dt THEN 'WAIT'
|
||||
WHEN NOW() >= a.start_dt AND NOW() <= a.end_dt THEN 'RUNNING'
|
||||
WHEN NOW() > a.end_dt THEN 'FINISH'
|
||||
END AS status
|
||||
, (SELECT email FROM admin WHERE id = a.create_by ) AS create_by
|
||||
, a.create_dt
|
||||
, (SELECT email FROM admin WHERE id = a.update_by ) AS update_by
|
||||
, a.update_dt
|
||||
FROM ranking_schedule a
|
||||
WHERE a.id = #{id}
|
||||
AND deleted = 0
|
||||
</select>
|
||||
|
||||
<select id="checkOverlap" parameterType="com.caliverse.admin.domain.request.RankRequest" resultType="java.lang.Integer">
|
||||
SELECT COUNT(*)
|
||||
FROM ranking_schedule a
|
||||
WHERE a.meta_id = #{metaId}
|
||||
AND a.deleted = 0
|
||||
AND a.meta_id != #{metaId}
|
||||
AND (
|
||||
(#{startDt} BETWEEN a.start_dt AND a.end_dt)
|
||||
OR (#{endDt} BETWEEN a.start_dt AND a.end_dt)
|
||||
OR (a.start_dt BETWEEN #{startDt} AND #{endDt})
|
||||
OR (a.end_dt BETWEEN #{startDt} AND #{endDt})
|
||||
)
|
||||
</select>
|
||||
|
||||
|
||||
<!--저장-->
|
||||
<insert id="postRankingSchedule" parameterType="com.caliverse.admin.domain.request.RankRequest" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO ranking_schedule (guid, title, meta_id, event_action_id, start_dt, end_dt, base_dt, refresh_interval, initialization_interval, snapshot_interval, create_by, update_by)
|
||||
VALUES (#{guid}, #{title}, #{metaId}, #{eventActionId}, #{startDt}, #{endDt}, #{baseDt}, #{refreshInterval}, #{initializationInterval}, #{snapshotInterval}, #{createBy}, #{updateBy})
|
||||
</insert>
|
||||
|
||||
<!--수정-->
|
||||
<update id="updateRankingSchedule" parameterType="com.caliverse.admin.domain.request.RankRequest">
|
||||
UPDATE ranking_schedule
|
||||
SET title = #{title}
|
||||
, meta_id = #{metaId}
|
||||
, event_action_id = #{eventActionId}
|
||||
, start_dt = #{startDt}
|
||||
, end_dt = #{endDt}
|
||||
, base_dt = #{baseDt}
|
||||
, refresh_interval = #{refreshInterval}
|
||||
, initialization_interval = #{initializationInterval}
|
||||
, snapshot_interval = #{snapshotInterval}
|
||||
, update_by = #{updateBy}
|
||||
, update_dt = NOW()
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<!--삭제-->
|
||||
<update id="deleteRankingSchedule" parameterType="map">
|
||||
UPDATE ranking_schedule
|
||||
SET deleted = 1
|
||||
, update_by = #{updateBy}
|
||||
, update_dt = NOW()
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -1,7 +1,7 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.caliverse.admin.domain.dao.admin.EventMapper">
|
||||
<resultMap id="EventResultMap" type="com.caliverse.admin.domain.entity.Event">
|
||||
<mapper namespace="com.caliverse.admin.domain.dao.admin.RewardEventMapper">
|
||||
<resultMap id="RewardEventResultMap" type="com.caliverse.admin.domain.entity.RewardEvent">
|
||||
<id property="id" column="id"/>
|
||||
<result property="rowNum" column="row_num"/>
|
||||
<result property="eventType" column="event_type"/>
|
||||
@@ -22,7 +22,7 @@
|
||||
</resultMap>
|
||||
|
||||
<!--이벤트 리스트 조회-->
|
||||
<select id="getEventList" resultMap="EventResultMap" parameterType="map">
|
||||
<select id="getEventList" resultMap="RewardEventResultMap" parameterType="map">
|
||||
SELECT *
|
||||
FROM(
|
||||
SELECT (@row_number:=@row_number + 1) AS row_num , c.* FROM
|
||||
@@ -146,7 +146,7 @@
|
||||
</select>
|
||||
|
||||
<!--이벤트 상세 조회-->
|
||||
<select id="getEventDetail" parameterType="java.lang.Long" resultMap="EventResultMap" >
|
||||
<select id="getEventDetail" parameterType="java.lang.Long" resultMap="RewardEventResultMap" >
|
||||
SELECT
|
||||
a.id
|
||||
, a.event_type
|
||||
@@ -181,7 +181,7 @@
|
||||
</select>
|
||||
|
||||
<!--이벤트 저장-->
|
||||
<insert id="postEvent" parameterType="com.caliverse.admin.domain.request.EventRequest" useGeneratedKeys="true" keyProperty="id">
|
||||
<insert id="postEvent" parameterType="com.caliverse.admin.domain.request.RewardEventRequest" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO event (event_type, start_dt, end_dt, create_by)
|
||||
VALUES (#{eventType}, #{startDt}, #{endDt}, #{createBy})
|
||||
</insert>
|
||||
@@ -201,7 +201,7 @@
|
||||
</insert>
|
||||
|
||||
<!--이벤트 수정-->
|
||||
<update id="updateEvent" parameterType="com.caliverse.admin.domain.request.EventRequest">
|
||||
<update id="updateEvent" parameterType="com.caliverse.admin.domain.request.RewardEventRequest">
|
||||
UPDATE event SET event_type = #{eventType}
|
||||
, start_dt = #{startDt}
|
||||
, end_dt = #{endDt}
|
||||
@@ -240,7 +240,7 @@
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="getScheduleEventList" resultMap="EventResultMap">
|
||||
<select id="getScheduleEventList" resultMap="RewardEventResultMap">
|
||||
SELECT id,
|
||||
event_type,
|
||||
status,
|
||||
158
src/main/resources/mappers/WorldEventMapper.xml
Normal file
158
src/main/resources/mappers/WorldEventMapper.xml
Normal file
@@ -0,0 +1,158 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.caliverse.admin.domain.dao.admin.WorldEventMapper">
|
||||
<resultMap id="WorldEventResultMap" type="com.caliverse.admin.domain.entity.WorldEvent">
|
||||
<id property="id" column="id"/>
|
||||
<result property="rowNum" column="row_num"/>
|
||||
<result property="title" column="title"/>
|
||||
<result property="globalEventActionId" column="global_event_action_id"/>
|
||||
<result property="personalEventActionId" column="personal_event_action_id"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="startDt" column="start_dt"/>
|
||||
<result property="endDt" column="end_dt"/>
|
||||
<result property="maxPoint" column="max_point"/>
|
||||
<result property="deleted" column="deleted"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createDt" column="create_dt"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateDt" column="update_dt"/>
|
||||
</resultMap>
|
||||
|
||||
<!--리스트 조회-->
|
||||
<select id="getWorldEventList" resultMap="WorldEventResultMap" parameterType="map">
|
||||
SELECT * FROM (
|
||||
SELECT (@row_number:=@row_number + 1) AS row_num, c.*
|
||||
FROM (
|
||||
SELECT
|
||||
a.id,
|
||||
a.title,
|
||||
a.global_event_action_id,
|
||||
a.personal_event_action_id,
|
||||
CASE
|
||||
WHEN NOW() < a.start_dt THEN 'WAIT'
|
||||
WHEN NOW() >= a.start_dt AND NOW() <= a.end_dt THEN 'RUNNING'
|
||||
WHEN NOW() > a.end_dt THEN 'FINISH'
|
||||
END AS status,
|
||||
a.start_dt,
|
||||
a.end_dt,
|
||||
max_point,
|
||||
(SELECT email FROM admin WHERE id = a.create_by) AS create_by,
|
||||
a.create_dt,
|
||||
(SELECT email FROM admin WHERE id = a.update_by) AS update_by,
|
||||
a.update_dt
|
||||
FROM world_event a
|
||||
WHERE 1 = 1
|
||||
AND a.deleted = 0
|
||||
|
||||
<if test="searchData != null and searchData != ''">
|
||||
AND a.title LIKE CONCAT('%',#{searchData},'%')
|
||||
</if>
|
||||
|
||||
<if test="status != null and status != ''">
|
||||
<choose>
|
||||
<when test="status != 'ALL'">
|
||||
AND CASE
|
||||
WHEN NOW() < a.start_dt THEN 'WAIT'
|
||||
WHEN NOW() >= a.start_dt AND NOW() <= a.end_dt THEN 'RUNNING'
|
||||
WHEN NOW() > a.end_dt THEN 'FINISH'
|
||||
END = #{status}
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
|
||||
<if test="startDate != null and startDate != '' and endDate !=null and endDate!= ''">
|
||||
AND a.start_dt >= #{startDate, jdbcType=TIMESTAMP}
|
||||
AND a.end_dt <= #{endDate, jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
|
||||
) c,
|
||||
(SELECT @row_number:=0) AS t
|
||||
ORDER BY
|
||||
CASE
|
||||
WHEN c.status = 'RUNNING' THEN 0
|
||||
WHEN c.status = 'WAIT' THEN 1
|
||||
WHEN c.status = 'FINISH' THEN 2
|
||||
ELSE 3
|
||||
END,
|
||||
c.create_dt
|
||||
) result
|
||||
<if test="orderby != null and orderby != ''">
|
||||
ORDER BY row_num ${orderby}
|
||||
</if>
|
||||
<if test="pageSize != null and pageSize != ''">
|
||||
LIMIT ${pageSize} OFFSET ${offset}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getTotal" resultType="java.lang.Integer" parameterType="map">
|
||||
SELECT count(*) FROM world_event WHERE deleted = 0
|
||||
</select>
|
||||
|
||||
<!--이벤트 상세 조회-->
|
||||
<select id="getWorldEventDetail" parameterType="java.lang.Long" resultMap="WorldEventResultMap" >
|
||||
SELECT
|
||||
a.id
|
||||
, a.title
|
||||
, a.global_event_action_id
|
||||
, a.personal_event_action_id
|
||||
, a.start_dt
|
||||
, a.end_dt
|
||||
, a.max_point
|
||||
, CASE
|
||||
WHEN NOW() < a.start_dt THEN 'WAIT'
|
||||
WHEN NOW() >= a.start_dt AND NOW() <= a.end_dt THEN 'RUNNING'
|
||||
WHEN NOW() > a.end_dt THEN 'FINISH'
|
||||
END AS status
|
||||
, (SELECT email FROM admin WHERE id = a.create_by ) AS create_by
|
||||
, a.create_dt
|
||||
, (SELECT email FROM admin WHERE id = a.update_by ) AS update_by
|
||||
, a.update_dt
|
||||
FROM world_event a
|
||||
WHERE a.id = #{id}
|
||||
AND deleted = 0
|
||||
</select>
|
||||
|
||||
<select id="checkOverlap" parameterType="com.caliverse.admin.domain.request.WorldEventRequest" resultType="java.lang.Integer">
|
||||
SELECT COUNT(*)
|
||||
FROM world_event a
|
||||
WHERE a.global_event_action_id = #{globalEventActionId}
|
||||
AND a.deleted = 0
|
||||
AND a.global_event_action_id != #{globalEventActionId}
|
||||
AND (
|
||||
(#{startDt} BETWEEN a.start_dt AND a.end_dt)
|
||||
OR (#{endDt} BETWEEN a.start_dt AND a.end_dt)
|
||||
OR (a.start_dt BETWEEN #{startDt} AND #{endDt})
|
||||
OR (a.end_dt BETWEEN #{startDt} AND #{endDt})
|
||||
)
|
||||
</select>
|
||||
|
||||
|
||||
<!--저장-->
|
||||
<insert id="postWorldEvent" parameterType="com.caliverse.admin.domain.request.WorldEventRequest" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO world_event (title, global_event_action_id, personal_event_action_id, start_dt, end_dt, max_point, create_by, update_by)
|
||||
VALUES (#{title}, #{globalEventActionId}, #{personalEventActionId}, #{startDt}, #{endDt}, #{maxPoint}, #{createBy}, #{updateBy})
|
||||
</insert>
|
||||
|
||||
<!--수정-->
|
||||
<update id="updateWorldEvent" parameterType="com.caliverse.admin.domain.request.WorldEventRequest">
|
||||
UPDATE world_event SET title = #{title}
|
||||
, global_event_action_id = #{globalEventActionId}
|
||||
, personal_event_action_id = #{personalEventActionId}
|
||||
, start_dt = #{startDt}
|
||||
, end_dt = #{endDt}
|
||||
, max_point = #{maxPoint}
|
||||
, update_by = #{updateBy}
|
||||
, update_dt = NOW()
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<!--삭제-->
|
||||
<update id="deleteWorldEvent" parameterType="map">
|
||||
UPDATE world_event
|
||||
SET deleted = 1
|
||||
, update_by = #{updateBy}
|
||||
, update_dt = NOW()
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -1,98 +0,0 @@
|
||||
-- Autogenerated: do not edit this file
|
||||
|
||||
CREATE TABLE BATCH_JOB_INSTANCE (
|
||||
JOB_INSTANCE_ID BIGINT NOT NULL PRIMARY KEY ,
|
||||
VERSION BIGINT ,
|
||||
JOB_NAME VARCHAR(100) NOT NULL,
|
||||
JOB_KEY VARCHAR(32) NOT NULL,
|
||||
constraint JOB_INST_UN unique (JOB_NAME, JOB_KEY)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE BATCH_JOB_EXECUTION (
|
||||
JOB_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY ,
|
||||
VERSION BIGINT ,
|
||||
JOB_INSTANCE_ID BIGINT NOT NULL,
|
||||
CREATE_TIME DATETIME(6) NOT NULL,
|
||||
START_TIME DATETIME(6) DEFAULT NULL ,
|
||||
END_TIME DATETIME(6) DEFAULT NULL ,
|
||||
STATUS VARCHAR(10) ,
|
||||
EXIT_CODE VARCHAR(2500) ,
|
||||
EXIT_MESSAGE VARCHAR(2500) ,
|
||||
LAST_UPDATED DATETIME(6),
|
||||
constraint JOB_INST_EXEC_FK foreign key (JOB_INSTANCE_ID)
|
||||
references BATCH_JOB_INSTANCE(JOB_INSTANCE_ID)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE BATCH_JOB_EXECUTION_PARAMS (
|
||||
JOB_EXECUTION_ID BIGINT NOT NULL ,
|
||||
PARAMETER_NAME VARCHAR(100) NOT NULL ,
|
||||
PARAMETER_TYPE VARCHAR(100) NOT NULL ,
|
||||
PARAMETER_VALUE VARCHAR(2500) ,
|
||||
IDENTIFYING CHAR(1) NOT NULL ,
|
||||
constraint JOB_EXEC_PARAMS_FK foreign key (JOB_EXECUTION_ID)
|
||||
references BATCH_JOB_EXECUTION(JOB_EXECUTION_ID)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE BATCH_STEP_EXECUTION (
|
||||
STEP_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY ,
|
||||
VERSION BIGINT NOT NULL,
|
||||
STEP_NAME VARCHAR(100) NOT NULL,
|
||||
JOB_EXECUTION_ID BIGINT NOT NULL,
|
||||
CREATE_TIME DATETIME(6) NOT NULL,
|
||||
START_TIME DATETIME(6) DEFAULT NULL ,
|
||||
END_TIME DATETIME(6) DEFAULT NULL ,
|
||||
STATUS VARCHAR(10) ,
|
||||
COMMIT_COUNT BIGINT ,
|
||||
READ_COUNT BIGINT ,
|
||||
FILTER_COUNT BIGINT ,
|
||||
WRITE_COUNT BIGINT ,
|
||||
READ_SKIP_COUNT BIGINT ,
|
||||
WRITE_SKIP_COUNT BIGINT ,
|
||||
PROCESS_SKIP_COUNT BIGINT ,
|
||||
ROLLBACK_COUNT BIGINT ,
|
||||
EXIT_CODE VARCHAR(2500) ,
|
||||
EXIT_MESSAGE VARCHAR(2500) ,
|
||||
LAST_UPDATED DATETIME(6),
|
||||
constraint JOB_EXEC_STEP_FK foreign key (JOB_EXECUTION_ID)
|
||||
references BATCH_JOB_EXECUTION(JOB_EXECUTION_ID)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE BATCH_STEP_EXECUTION_CONTEXT (
|
||||
STEP_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY,
|
||||
SHORT_CONTEXT VARCHAR(2500) NOT NULL,
|
||||
SERIALIZED_CONTEXT TEXT ,
|
||||
constraint STEP_EXEC_CTX_FK foreign key (STEP_EXECUTION_ID)
|
||||
references BATCH_STEP_EXECUTION(STEP_EXECUTION_ID)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE BATCH_JOB_EXECUTION_CONTEXT (
|
||||
JOB_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY,
|
||||
SHORT_CONTEXT VARCHAR(2500) NOT NULL,
|
||||
SERIALIZED_CONTEXT TEXT ,
|
||||
constraint JOB_EXEC_CTX_FK foreign key (JOB_EXECUTION_ID)
|
||||
references BATCH_JOB_EXECUTION(JOB_EXECUTION_ID)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE BATCH_STEP_EXECUTION_SEQ (
|
||||
ID BIGINT NOT NULL,
|
||||
UNIQUE_KEY CHAR(1) NOT NULL,
|
||||
constraint UNIQUE_KEY_UN unique (UNIQUE_KEY)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO BATCH_STEP_EXECUTION_SEQ (ID, UNIQUE_KEY) select * from (select 0 as ID, '0' as UNIQUE_KEY) as tmp where not exists(select * from BATCH_STEP_EXECUTION_SEQ);
|
||||
|
||||
CREATE TABLE BATCH_JOB_EXECUTION_SEQ (
|
||||
ID BIGINT NOT NULL,
|
||||
UNIQUE_KEY CHAR(1) NOT NULL,
|
||||
constraint UNIQUE_KEY_UN unique (UNIQUE_KEY)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO BATCH_JOB_EXECUTION_SEQ (ID, UNIQUE_KEY) select * from (select 0 as ID, '0' as UNIQUE_KEY) as tmp where not exists(select * from BATCH_JOB_EXECUTION_SEQ);
|
||||
|
||||
CREATE TABLE BATCH_JOB_SEQ (
|
||||
ID BIGINT NOT NULL,
|
||||
UNIQUE_KEY CHAR(1) NOT NULL,
|
||||
constraint UNIQUE_KEY_UN unique (UNIQUE_KEY)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO BATCH_JOB_SEQ (ID, UNIQUE_KEY) select * from (select 0 as ID, '0' as UNIQUE_KEY) as tmp where not exists(select * from BATCH_JOB_SEQ);
|
||||
Reference in New Issue
Block a user