전투이벤트 이벤트 아이디 처리 수정
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user