전투시스템 업데이트 부분 수정
This commit is contained in:
@@ -55,9 +55,9 @@ public class BattleController {
|
|||||||
|
|
||||||
@PutMapping("/event/stop/{id}")
|
@PutMapping("/event/stop/{id}")
|
||||||
public ResponseEntity<BattleEventResponse> updateStopBattleEvent(
|
public ResponseEntity<BattleEventResponse> updateStopBattleEvent(
|
||||||
@PathVariable("id")Long id, @RequestBody BattleEventRequest battleEventRequest){
|
@PathVariable("id")Long id){
|
||||||
|
|
||||||
return ResponseEntity.ok().body(battleEventService.updateStopBattleEvent(id, battleEventRequest));
|
return ResponseEntity.ok().body(battleEventService.updateStopBattleEvent(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping("/event/delete")
|
@DeleteMapping("/event/delete")
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import com.caliverse.admin.domain.dao.admin.BattleMapper;
|
|||||||
import com.caliverse.admin.domain.datacomponent.MetaDataHandler;
|
import com.caliverse.admin.domain.datacomponent.MetaDataHandler;
|
||||||
import com.caliverse.admin.domain.entity.BattleEvent;
|
import com.caliverse.admin.domain.entity.BattleEvent;
|
||||||
import com.caliverse.admin.domain.entity.HISTORYTYPE;
|
import com.caliverse.admin.domain.entity.HISTORYTYPE;
|
||||||
import com.caliverse.admin.domain.entity.LandAuction;
|
|
||||||
import com.caliverse.admin.domain.entity.metadata.MetaBattleConfigData;
|
import com.caliverse.admin.domain.entity.metadata.MetaBattleConfigData;
|
||||||
import com.caliverse.admin.domain.entity.metadata.MetaBattleRewardData;
|
import com.caliverse.admin.domain.entity.metadata.MetaBattleRewardData;
|
||||||
import com.caliverse.admin.domain.request.BattleEventRequest;
|
import com.caliverse.admin.domain.request.BattleEventRequest;
|
||||||
@@ -199,6 +198,18 @@ public class BattleEventService {
|
|||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int operation_time = calcEndTime(battleEventRequest);
|
||||||
|
battleEventRequest.setEventOperationTime(operation_time);
|
||||||
|
|
||||||
|
// 일자만 필요해서 UTC시간으로 변경되다보니 한국시간(+9)을 더해서 마지막시간으로 설정
|
||||||
|
LocalDateTime end_dt_kst = battleEventRequest.getEventEndDt()
|
||||||
|
.plusHours(9)
|
||||||
|
.withHour(23)
|
||||||
|
.withMinute(59)
|
||||||
|
.withSecond(59)
|
||||||
|
.withNano(0);
|
||||||
|
battleEventRequest.setEventEndDt(end_dt_kst);
|
||||||
|
|
||||||
int result = battleMapper.updateBattleEvent(battleEventRequest);
|
int result = battleMapper.updateBattleEvent(battleEventRequest);
|
||||||
log.info("AdminToolDB BattleEvent Update Complete: {}", battleEventRequest);
|
log.info("AdminToolDB BattleEvent Update Complete: {}", battleEventRequest);
|
||||||
|
|
||||||
@@ -228,7 +239,7 @@ public class BattleEventService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Transactional(transactionManager = "transactionManager")
|
@Transactional(transactionManager = "transactionManager")
|
||||||
public BattleEventResponse updateStopBattleEvent(Long id, BattleEventRequest battleEventRequest){
|
public BattleEventResponse updateStopBattleEvent(Long id){
|
||||||
Map<String,Object> map = new HashMap<>();
|
Map<String,Object> map = new HashMap<>();
|
||||||
|
|
||||||
BattleEvent info = battleMapper.getBattleEventDetail(id);
|
BattleEvent info = battleMapper.getBattleEventDetail(id);
|
||||||
|
|||||||
Reference in New Issue
Block a user