랜드 소유권 변경시 우편 발송
This commit is contained in:
@@ -60,6 +60,7 @@ public enum ErrorCode {
|
||||
ERROR_AUCTION_STATUS_IMPOSSIBLE("수정할 수 없는 경매상태입니다."),
|
||||
ERROR_AUCTION_LAND_OWNER("해당 랜드는 소유자가 존재하여 경매를 진행할 수 없습니다."),
|
||||
ERROR_LAND_OWNER_CHANGES_RESERVATION("소유권 변경 예약을 취소할 수 없는 상태입니다."),
|
||||
ERROR_LAND_OWNER_CHANGES_DUPLICATION("등록된 소유권 변경 존재합니다."),
|
||||
|
||||
//Battle
|
||||
ERROR_BATTLE_EVENT_TIME_OVER("해당 시간에 속하는 이벤트가 존재합니다."),
|
||||
|
||||
@@ -14,8 +14,11 @@ public class CommonConstants {
|
||||
public static final String LAND_PUBLIC = "public";
|
||||
public static final String LAND_AUCTION = "auction";
|
||||
public static final String LAND_EVENT = "event";
|
||||
public static final String SYSTEM_MAIL_LAND_TRANS_KEY = "LandTrans";
|
||||
|
||||
public static final String FORMAT_DATE_ISO_DATETIME_MILLIS = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'";
|
||||
public static final String FORMAT_DATE_ISO_DATETIME_MILLIS_NANO = "yyyy-MM-dd'T'HH:mm:ss.SSSSSSS'Z'";
|
||||
public static final String FORMAT_DATE_DATETIME = "yyyy-MM-dd HH:mm:ss";
|
||||
public static final String FORMAT_DATE_ISO_DATETIME = "yyyy-MM-dd'T'HH:mm:ss";
|
||||
public static final String FORMAT_DATE_MAIL_DATETIME = "yyyy/MM/dd/HH:mm:ss:SS";
|
||||
}
|
||||
|
||||
@@ -22,6 +22,8 @@ public class DynamoDBConstants {
|
||||
public static final String PK_KEY_ACCOUNT_BASE = "account_base#";
|
||||
public static final String PK_KEY_USER_BASE = "user_base#";
|
||||
public static final String PK_KEY_NICKNAME = "nickname#";
|
||||
public static final String PK_KEY_RECV_MAIL = "recv_mail#";
|
||||
public static final String PK_KEY_SENT_MAIL = "sent_mail#";
|
||||
|
||||
//SK
|
||||
|
||||
@@ -37,6 +39,7 @@ public class DynamoDBConstants {
|
||||
public static final String ATTRIB_BUILDING = "BuildingAttrib";
|
||||
public static final String ATTRIB_OWNED_LAND = "OwnedLandAttrib";
|
||||
public static final String ATTRIB_OWNED_BUILDING = "OwnedBuildingAttrib";
|
||||
public static final String ATTRIB_MAIL = "MailAttrib";
|
||||
|
||||
//DOC
|
||||
public static final String DOC_SYSTEMMAIL = "SystemMetaMailDoc";
|
||||
@@ -49,12 +52,14 @@ public class DynamoDBConstants {
|
||||
public static final String DOC_BUILDING = "BuildingDoc";
|
||||
public static final String DOC_OWNED_LAND = "OwnedLandDoc";
|
||||
public static final String DOC_OWNED_BUILDING = "OwnedBuildingDoc";
|
||||
public static final String DOC_Mail = "MailDoc";
|
||||
|
||||
//SCHEMA
|
||||
public static final String SCHEMA_UPDATE_TIME = "UpdatedDateTime";
|
||||
|
||||
//ETC
|
||||
public static final String EMPTY = "empty";
|
||||
public static final String TTL = "TTL";
|
||||
public static final String MIN_DATE = "1970-01-01T00:00:00.000Z";
|
||||
public static final String DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSSSSS";
|
||||
}
|
||||
|
||||
@@ -11,4 +11,5 @@ public class MetadataConstants {
|
||||
public static final String JSON_LIST_LAND = "LandMetaDataList";
|
||||
public static final String JSON_LIST_BATTLE_CONFIG = "BattleFFAConfigMetaDataList";
|
||||
public static final String JSON_LIST_BATTLE_REWARD = "BattleFFARewardMetaDataList";
|
||||
public static final String JSON_LIST_SYSTEM_META = "SystemMailMetaDataList";
|
||||
}
|
||||
|
||||
@@ -3,9 +3,7 @@ package com.caliverse.admin.global.common.utils;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.time.*;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.regex.*;
|
||||
|
||||
@@ -34,8 +32,6 @@ import com.google.protobuf.ByteString;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import java.util.Base64;
|
||||
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class CommonUtils {
|
||||
@@ -74,6 +70,10 @@ public class CommonUtils {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getCreateGuId() {
|
||||
return UUID.randomUUID().toString();
|
||||
}
|
||||
|
||||
public static String objectToString(Object object){
|
||||
if (object == null) {
|
||||
return "";
|
||||
|
||||
@@ -2,10 +2,7 @@ package com.caliverse.admin.global.common.utils;
|
||||
|
||||
import com.caliverse.admin.global.common.constants.CommonConstants;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneId;
|
||||
import java.time.ZoneOffset;
|
||||
import java.time.*;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
public class DateUtils {
|
||||
@@ -25,6 +22,11 @@ public class DateUtils {
|
||||
return date.atOffset(ZoneOffset.UTC).format(formatter);
|
||||
}
|
||||
|
||||
public static String stringToISODateTimeMillisNano(LocalDateTime date){
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(CommonConstants.FORMAT_DATE_ISO_DATETIME_MILLIS_NANO);
|
||||
return date.atOffset(ZoneOffset.UTC).format(formatter);
|
||||
}
|
||||
|
||||
public static LocalDateTime stringISOToLocalDateTime(String date){
|
||||
Instant instant = Instant.parse(date);
|
||||
return LocalDateTime.ofInstant(instant, ZoneId.systemDefault());
|
||||
@@ -44,4 +46,17 @@ public class DateUtils {
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSSSSS");
|
||||
return date.format(formatter);
|
||||
}
|
||||
|
||||
public static String getMailDateFormat(LocalDateTime date){
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(CommonConstants.FORMAT_DATE_MAIL_DATETIME);
|
||||
return date.atOffset(ZoneOffset.UTC).format(formatter);
|
||||
}
|
||||
|
||||
public static LocalDateTime getMaxTime(){
|
||||
return LocalDateTime.of(3000, 1, 1, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
public static long dateToISOUnixTime(LocalDateTime date){
|
||||
return date.atOffset(ZoneOffset.UTC).toEpochSecond();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
package com.caliverse.admin.global.component.transaction;
|
||||
|
||||
import com.caliverse.admin.global.common.utils.CommonUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.support.TransactionSynchronizationManager;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@Component
|
||||
public class TransactionIdManager {
|
||||
private static final String TRANSACTION_ID_KEY = "TRANSACTION_ID";
|
||||
@@ -12,13 +11,10 @@ public class TransactionIdManager {
|
||||
public String getCurrentTransactionId() {
|
||||
String currentId = (String) TransactionSynchronizationManager.getResource(TRANSACTION_ID_KEY);
|
||||
if (currentId == null) {
|
||||
currentId = generateTransactionId();
|
||||
currentId = CommonUtils.getCreateGuId();
|
||||
TransactionSynchronizationManager.bindResource(TRANSACTION_ID_KEY, currentId);
|
||||
}
|
||||
return currentId;
|
||||
}
|
||||
|
||||
private String generateTransactionId() {
|
||||
return UUID.randomUUID().toString();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user