260508_02_ENH: Comment조회 및 수정 시 IDKEY에 SUFFIX 적용
This commit is contained in:
@@ -19,6 +19,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
@@ -27,6 +28,9 @@ public class StatisticsService {
|
||||
|
||||
private final DataMapper dataMapper;
|
||||
|
||||
@Value("${kri.kfpa-comment-idkey-suffix:}")
|
||||
private String kfpaCommentIdkeySuffix;
|
||||
|
||||
public Map<String, List<CsiDataDto>> getCsiData() {
|
||||
List<CsiDataEntity> csiDataList = dataMapper.selectDivCsiData(KFPA_DASH_PKEY);
|
||||
|
||||
@@ -54,6 +58,8 @@ public class StatisticsService {
|
||||
).with("div", div);
|
||||
}
|
||||
|
||||
String suffixedIdkey = idkey + kfpaCommentIdkeySuffix;
|
||||
|
||||
List<ObjectTypeCsiRankEntity> objectTypeCsiRankList =
|
||||
dataMapper.selectDivObjectTypeCsiRank(KFPA_DASH_PKEY).stream()
|
||||
.filter(entity -> entity.getDiv().equals(div))
|
||||
@@ -66,7 +72,8 @@ public class StatisticsService {
|
||||
DivCommentEntity divCommentEntity = divCommentCache.computeIfAbsent(
|
||||
div,
|
||||
key -> {
|
||||
DivCommentEntity selectedComment = dataMapper.selectDivComment(KFPA_COMMENT_PKEY, idkey);
|
||||
DivCommentEntity selectedComment =
|
||||
dataMapper.selectDivComment(KFPA_COMMENT_PKEY, suffixedIdkey);
|
||||
return selectedComment == null ? DivCommentEntity.empty() : selectedComment;
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user