Merge remote-tracking branch 'origin/jenkins_with_weblogic' into jenkins_with_weblogic
This commit is contained in:
@@ -0,0 +1,93 @@
|
||||
package com.eactive.eai.rms.data.entity.onl.kjb.statistics;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.IdClass;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* API Gateway 일별 처리 통계
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "API_STATS_DAY")
|
||||
@IdClass(ApiStatsDayId.class)
|
||||
public class ApiStatsDay implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@Column(name = "STAT_TIME", nullable = false)
|
||||
private LocalDate statTime;
|
||||
|
||||
@Id
|
||||
@Column(name = "API_NAME", nullable = false, length = 100)
|
||||
private String apiName;
|
||||
|
||||
@Id
|
||||
@Column(name = "GW_INSTANCE_ID", nullable = false, length = 50)
|
||||
private String gwInstanceId;
|
||||
|
||||
@Id
|
||||
@Column(name = "BIZ_DIV_CODE", nullable = false, length = 50)
|
||||
private String bizDivCode = "NONE";
|
||||
|
||||
@Id
|
||||
@Column(name = "CLIENT_ID", nullable = false, length = 100)
|
||||
private String clientId = "NONE";
|
||||
|
||||
@Id
|
||||
@Column(name = "INBOUND_ADAPTER", nullable = false, length = 100)
|
||||
private String inboundAdapter = "NONE";
|
||||
|
||||
@Id
|
||||
@Column(name = "OUTBOUND_ADAPTER", nullable = false, length = 100)
|
||||
private String outboundAdapter = "NONE";
|
||||
|
||||
@Column(name = "TOTAL_CNT", nullable = false)
|
||||
private Long totalCnt = 0L;
|
||||
|
||||
@Column(name = "SUCCESS_CNT", nullable = false)
|
||||
private Long successCnt = 0L;
|
||||
|
||||
@Column(name = "TIMEOUT_CNT", nullable = false)
|
||||
private Long timeoutCnt = 0L;
|
||||
|
||||
@Column(name = "SYSTEM_ERR_CNT", nullable = false)
|
||||
private Long systemErrCnt = 0L;
|
||||
|
||||
@Column(name = "BIZ_ERR_CNT", nullable = false)
|
||||
private Long bizErrCnt = 0L;
|
||||
|
||||
@Column(name = "SEQ900_TIMEOUT_CNT", nullable = false)
|
||||
private Long seq900TimeoutCnt = 0L;
|
||||
|
||||
@Column(name = "SEQ900_SYSTEM_ERR_CNT", nullable = false)
|
||||
private Long seq900SystemErrCnt = 0L;
|
||||
|
||||
@Column(name = "SEQ900_BIZ_ERR_CNT", nullable = false)
|
||||
private Long seq900BizErrCnt = 0L;
|
||||
|
||||
@Column(name = "AVG_RESP_TIME", precision = 10, scale = 3)
|
||||
private BigDecimal avgRespTime = BigDecimal.ZERO;
|
||||
|
||||
@Column(name = "MIN_RESP_TIME", precision = 10, scale = 3)
|
||||
private BigDecimal minRespTime = BigDecimal.ZERO;
|
||||
|
||||
@Column(name = "MAX_RESP_TIME", precision = 10, scale = 3)
|
||||
private BigDecimal maxRespTime = BigDecimal.ZERO;
|
||||
|
||||
@Column(name = "P50_RESP_TIME", precision = 10, scale = 3)
|
||||
private BigDecimal p50RespTime = BigDecimal.ZERO;
|
||||
|
||||
@Column(name = "P95_RESP_TIME", precision = 10, scale = 3)
|
||||
private BigDecimal p95RespTime = BigDecimal.ZERO;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.eactive.eai.rms.data.entity.onl.kjb.statistics;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* API 통계 일별 복합키
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ApiStatsDayId implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private LocalDate statTime;
|
||||
private String apiName;
|
||||
private String gwInstanceId;
|
||||
private String bizDivCode;
|
||||
private String clientId;
|
||||
private String inboundAdapter;
|
||||
private String outboundAdapter;
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
package com.eactive.eai.rms.data.entity.onl.kjb.statistics;
|
||||
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
/**
|
||||
* API 통계 일별 Repository
|
||||
*/
|
||||
interface ApiStatsDayRepository extends BaseRepository<ApiStatsDay, ApiStatsDayId> {
|
||||
|
||||
}
|
||||
+152
@@ -0,0 +1,152 @@
|
||||
package com.eactive.eai.rms.data.entity.onl.kjb.statistics;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.jpa.AbstractDataService;
|
||||
import com.eactive.ext.kjb.statistics.ui.ApiStatsChartUI;
|
||||
import com.eactive.ext.kjb.statistics.ui.ApiStatsSearch;
|
||||
import com.querydsl.core.BooleanBuilder;
|
||||
import com.querydsl.core.types.Projections;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class ApiStatsDayService
|
||||
extends AbstractDataService<ApiStatsDay, ApiStatsDayId, ApiStatsDayRepository> {
|
||||
|
||||
private static final int MAX_DAYS = 31;
|
||||
|
||||
public Page<ApiStatsDay> selectList(ApiStatsSearch search, Pageable pageable) {
|
||||
QApiStatsDay q = QApiStatsDay.apiStatsDay;
|
||||
BooleanBuilder builder = buildSearchConditions(q, search);
|
||||
return repository.findAll(builder, pageable);
|
||||
}
|
||||
|
||||
public List<ApiStatsDay> selectListForExcel(ApiStatsSearch search) {
|
||||
QApiStatsDay q = QApiStatsDay.apiStatsDay;
|
||||
BooleanBuilder builder = buildSearchConditions(q, search);
|
||||
|
||||
return getJPAQueryFactory()
|
||||
.selectFrom(q)
|
||||
.where(builder)
|
||||
.orderBy(q.statTime.desc())
|
||||
.fetch();
|
||||
}
|
||||
|
||||
public List<ApiStatsChartUI> selectChartData(ApiStatsSearch search) {
|
||||
QApiStatsDay q = QApiStatsDay.apiStatsDay;
|
||||
BooleanBuilder builder = new BooleanBuilder();
|
||||
|
||||
calculateDateRange(search);
|
||||
if (search.getParsedStartDate() != null) {
|
||||
builder.and(q.statTime.goe(search.getParsedStartDate()));
|
||||
builder.and(q.statTime.loe(search.getParsedEndDate()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchApiName())) {
|
||||
builder.and(q.apiName.containsIgnoreCase(search.getSearchApiName()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchGwInstanceId())) {
|
||||
builder.and(q.gwInstanceId.containsIgnoreCase(search.getSearchGwInstanceId()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchBizDivCode())) {
|
||||
builder.and(q.bizDivCode.containsIgnoreCase(search.getSearchBizDivCode()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchClientId())) {
|
||||
builder.and(q.clientId.containsIgnoreCase(search.getSearchClientId()));
|
||||
}
|
||||
|
||||
return getJPAQueryFactory()
|
||||
.select(Projections.constructor(ApiStatsChartUI.class,
|
||||
q.statTime,
|
||||
q.totalCnt.sum(),
|
||||
q.successCnt.sum(),
|
||||
q.timeoutCnt.sum(),
|
||||
q.systemErrCnt.sum(),
|
||||
q.bizErrCnt.sum(),
|
||||
q.seq900TimeoutCnt.sum(),
|
||||
q.seq900SystemErrCnt.sum(),
|
||||
q.seq900BizErrCnt.sum(),
|
||||
q.avgRespTime.avg(),
|
||||
q.p50RespTime.avg(),
|
||||
q.p95RespTime.avg()))
|
||||
.from(q)
|
||||
.where(builder)
|
||||
.groupBy(q.statTime)
|
||||
.orderBy(q.statTime.asc())
|
||||
.fetch();
|
||||
}
|
||||
|
||||
private BooleanBuilder buildSearchConditions(QApiStatsDay q, ApiStatsSearch search) {
|
||||
BooleanBuilder builder = new BooleanBuilder();
|
||||
|
||||
calculateDateRange(search);
|
||||
if (search.getParsedStartDate() != null) {
|
||||
builder.and(q.statTime.goe(search.getParsedStartDate()));
|
||||
builder.and(q.statTime.loe(search.getParsedEndDate()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchApiName())) {
|
||||
builder.and(q.apiName.containsIgnoreCase(search.getSearchApiName()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchGwInstanceId())) {
|
||||
builder.and(q.gwInstanceId.containsIgnoreCase(search.getSearchGwInstanceId()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchBizDivCode())) {
|
||||
builder.and(q.bizDivCode.containsIgnoreCase(search.getSearchBizDivCode()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchClientId())) {
|
||||
builder.and(q.clientId.containsIgnoreCase(search.getSearchClientId()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchInboundAdapter())) {
|
||||
builder.and(q.inboundAdapter.containsIgnoreCase(search.getSearchInboundAdapter()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchOutboundAdapter())) {
|
||||
builder.and(q.outboundAdapter.containsIgnoreCase(search.getSearchOutboundAdapter()));
|
||||
}
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
/**
|
||||
* 조회 기간 계산 (최대 31일 제한)
|
||||
*/
|
||||
private void calculateDateRange(ApiStatsSearch search) {
|
||||
if (StringUtils.isBlank(search.getSearchStartDateTime())) {
|
||||
return;
|
||||
}
|
||||
|
||||
LocalDate startDate = LocalDate.parse(search.getSearchStartDateTime(),
|
||||
DateTimeFormatter.ofPattern("yyyyMMdd"));
|
||||
LocalDate endDate;
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchEndDateTime())) {
|
||||
endDate = LocalDate.parse(search.getSearchEndDateTime(),
|
||||
DateTimeFormatter.ofPattern("yyyyMMdd"));
|
||||
// 31일 초과 시 시작날짜 기준 31일 후로 강제 설정
|
||||
if (java.time.Period.between(startDate, endDate).getDays() > MAX_DAYS) {
|
||||
endDate = startDate.plusDays(MAX_DAYS);
|
||||
}
|
||||
} else {
|
||||
endDate = startDate.plusDays(MAX_DAYS);
|
||||
}
|
||||
|
||||
search.setParsedStartDate(startDate);
|
||||
search.setParsedEndDate(endDate);
|
||||
}
|
||||
}
|
||||
+44
@@ -60,6 +60,47 @@ public class ApiStatsHourService
|
||||
return repository.findAll(builder, pageable);
|
||||
}
|
||||
|
||||
public List<ApiStatsHour> selectListForExcel(ApiStatsSearch search) {
|
||||
QApiStatsHour q = QApiStatsHour.apiStatsHour;
|
||||
BooleanBuilder builder = new BooleanBuilder();
|
||||
|
||||
calculateDateRange(search);
|
||||
if (search.getParsedStartDateTime() != null) {
|
||||
builder.and(q.statTime.goe(search.getParsedStartDateTime()));
|
||||
builder.and(q.statTime.loe(search.getParsedEndDateTime()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchApiName())) {
|
||||
builder.and(q.apiName.containsIgnoreCase(search.getSearchApiName()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchGwInstanceId())) {
|
||||
builder.and(q.gwInstanceId.containsIgnoreCase(search.getSearchGwInstanceId()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchBizDivCode())) {
|
||||
builder.and(q.bizDivCode.containsIgnoreCase(search.getSearchBizDivCode()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchClientId())) {
|
||||
builder.and(q.clientId.containsIgnoreCase(search.getSearchClientId()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchInboundAdapter())) {
|
||||
builder.and(q.inboundAdapter.containsIgnoreCase(search.getSearchInboundAdapter()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchOutboundAdapter())) {
|
||||
builder.and(q.outboundAdapter.containsIgnoreCase(search.getSearchOutboundAdapter()));
|
||||
}
|
||||
|
||||
return getJPAQueryFactory()
|
||||
.selectFrom(q)
|
||||
.where(builder)
|
||||
.orderBy(q.statTime.desc())
|
||||
.fetch();
|
||||
}
|
||||
|
||||
public List<ApiStatsChartUI> selectChartData(ApiStatsSearch search) {
|
||||
QApiStatsHour q = QApiStatsHour.apiStatsHour;
|
||||
BooleanBuilder builder = new BooleanBuilder();
|
||||
@@ -94,6 +135,9 @@ public class ApiStatsHourService
|
||||
q.timeoutCnt.sum(),
|
||||
q.systemErrCnt.sum(),
|
||||
q.bizErrCnt.sum(),
|
||||
q.seq900TimeoutCnt.sum(),
|
||||
q.seq900SystemErrCnt.sum(),
|
||||
q.seq900BizErrCnt.sum(),
|
||||
q.avgRespTime.avg(),
|
||||
q.p50RespTime.avg(),
|
||||
q.p95RespTime.avg()))
|
||||
|
||||
+44
@@ -62,6 +62,47 @@ public class ApiStatsMinuteService
|
||||
return repository.findAll(builder, pageable);
|
||||
}
|
||||
|
||||
public List<ApiStatsMinute> selectListForExcel(ApiStatsSearch search) {
|
||||
QApiStatsMinute q = QApiStatsMinute.apiStatsMinute;
|
||||
BooleanBuilder builder = new BooleanBuilder();
|
||||
|
||||
calculateDateRange(search);
|
||||
if (search.getParsedStartDateTime() != null) {
|
||||
builder.and(q.statTime.goe(search.getParsedStartDateTime()));
|
||||
builder.and(q.statTime.loe(search.getParsedEndDateTime()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchApiName())) {
|
||||
builder.and(q.apiName.containsIgnoreCase(search.getSearchApiName()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchGwInstanceId())) {
|
||||
builder.and(q.gwInstanceId.containsIgnoreCase(search.getSearchGwInstanceId()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchBizDivCode())) {
|
||||
builder.and(q.bizDivCode.containsIgnoreCase(search.getSearchBizDivCode()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchClientId())) {
|
||||
builder.and(q.clientId.containsIgnoreCase(search.getSearchClientId()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchInboundAdapter())) {
|
||||
builder.and(q.inboundAdapter.containsIgnoreCase(search.getSearchInboundAdapter()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchOutboundAdapter())) {
|
||||
builder.and(q.outboundAdapter.containsIgnoreCase(search.getSearchOutboundAdapter()));
|
||||
}
|
||||
|
||||
return getJPAQueryFactory()
|
||||
.selectFrom(q)
|
||||
.where(builder)
|
||||
.orderBy(q.statTime.desc())
|
||||
.fetch();
|
||||
}
|
||||
|
||||
public List<ApiStatsChartUI> selectChartData(ApiStatsSearch search) {
|
||||
QApiStatsMinute q = QApiStatsMinute.apiStatsMinute;
|
||||
BooleanBuilder builder = new BooleanBuilder();
|
||||
@@ -96,6 +137,9 @@ public class ApiStatsMinuteService
|
||||
q.timeoutCnt.sum(),
|
||||
q.systemErrCnt.sum(),
|
||||
q.bizErrCnt.sum(),
|
||||
q.seq900TimeoutCnt.sum(),
|
||||
q.seq900SystemErrCnt.sum(),
|
||||
q.seq900BizErrCnt.sum(),
|
||||
q.avgRespTime.avg(),
|
||||
q.p50RespTime.avg(),
|
||||
q.p95RespTime.avg()))
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
package com.eactive.eai.rms.data.entity.onl.kjb.statistics;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.IdClass;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* API Gateway 월별 처리 통계
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "API_STATS_MONTH")
|
||||
@IdClass(ApiStatsMonthId.class)
|
||||
public class ApiStatsMonth implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@Column(name = "STAT_TIME", nullable = false, length = 6)
|
||||
private String statTime; // YYYYMM format
|
||||
|
||||
@Id
|
||||
@Column(name = "API_NAME", nullable = false, length = 100)
|
||||
private String apiName;
|
||||
|
||||
@Id
|
||||
@Column(name = "GW_INSTANCE_ID", nullable = false, length = 50)
|
||||
private String gwInstanceId;
|
||||
|
||||
@Id
|
||||
@Column(name = "BIZ_DIV_CODE", nullable = false, length = 50)
|
||||
private String bizDivCode = "NONE";
|
||||
|
||||
@Id
|
||||
@Column(name = "CLIENT_ID", nullable = false, length = 100)
|
||||
private String clientId = "NONE";
|
||||
|
||||
@Id
|
||||
@Column(name = "INBOUND_ADAPTER", nullable = false, length = 100)
|
||||
private String inboundAdapter = "NONE";
|
||||
|
||||
@Id
|
||||
@Column(name = "OUTBOUND_ADAPTER", nullable = false, length = 100)
|
||||
private String outboundAdapter = "NONE";
|
||||
|
||||
@Column(name = "TOTAL_CNT", nullable = false)
|
||||
private Long totalCnt = 0L;
|
||||
|
||||
@Column(name = "SUCCESS_CNT", nullable = false)
|
||||
private Long successCnt = 0L;
|
||||
|
||||
@Column(name = "TIMEOUT_CNT", nullable = false)
|
||||
private Long timeoutCnt = 0L;
|
||||
|
||||
@Column(name = "SYSTEM_ERR_CNT", nullable = false)
|
||||
private Long systemErrCnt = 0L;
|
||||
|
||||
@Column(name = "BIZ_ERR_CNT", nullable = false)
|
||||
private Long bizErrCnt = 0L;
|
||||
|
||||
@Column(name = "SEQ900_TIMEOUT_CNT", nullable = false)
|
||||
private Long seq900TimeoutCnt = 0L;
|
||||
|
||||
@Column(name = "SEQ900_SYSTEM_ERR_CNT", nullable = false)
|
||||
private Long seq900SystemErrCnt = 0L;
|
||||
|
||||
@Column(name = "SEQ900_BIZ_ERR_CNT", nullable = false)
|
||||
private Long seq900BizErrCnt = 0L;
|
||||
|
||||
@Column(name = "AVG_RESP_TIME", precision = 10, scale = 3)
|
||||
private BigDecimal avgRespTime = BigDecimal.ZERO;
|
||||
|
||||
@Column(name = "MIN_RESP_TIME", precision = 10, scale = 3)
|
||||
private BigDecimal minRespTime = BigDecimal.ZERO;
|
||||
|
||||
@Column(name = "MAX_RESP_TIME", precision = 10, scale = 3)
|
||||
private BigDecimal maxRespTime = BigDecimal.ZERO;
|
||||
|
||||
@Column(name = "P50_RESP_TIME", precision = 10, scale = 3)
|
||||
private BigDecimal p50RespTime = BigDecimal.ZERO;
|
||||
|
||||
@Column(name = "P95_RESP_TIME", precision = 10, scale = 3)
|
||||
private BigDecimal p95RespTime = BigDecimal.ZERO;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.eactive.eai.rms.data.entity.onl.kjb.statistics;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* API 통계 월별 복합키
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ApiStatsMonthId implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String statTime; // YYYYMM format
|
||||
private String apiName;
|
||||
private String gwInstanceId;
|
||||
private String bizDivCode;
|
||||
private String clientId;
|
||||
private String inboundAdapter;
|
||||
private String outboundAdapter;
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
package com.eactive.eai.rms.data.entity.onl.kjb.statistics;
|
||||
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
/**
|
||||
* API 통계 월별 Repository
|
||||
*/
|
||||
interface ApiStatsMonthRepository extends BaseRepository<ApiStatsMonth, ApiStatsMonthId> {
|
||||
|
||||
}
|
||||
+153
@@ -0,0 +1,153 @@
|
||||
package com.eactive.eai.rms.data.entity.onl.kjb.statistics;
|
||||
|
||||
import java.time.YearMonth;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.jpa.AbstractDataService;
|
||||
import com.eactive.ext.kjb.statistics.ui.ApiStatsChartUI;
|
||||
import com.eactive.ext.kjb.statistics.ui.ApiStatsSearch;
|
||||
import com.querydsl.core.BooleanBuilder;
|
||||
import com.querydsl.core.types.Projections;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class ApiStatsMonthService
|
||||
extends AbstractDataService<ApiStatsMonth, ApiStatsMonthId, ApiStatsMonthRepository> {
|
||||
|
||||
private static final int MAX_MONTHS = 24;
|
||||
|
||||
public Page<ApiStatsMonth> selectList(ApiStatsSearch search, Pageable pageable) {
|
||||
QApiStatsMonth q = QApiStatsMonth.apiStatsMonth;
|
||||
BooleanBuilder builder = buildSearchConditions(q, search);
|
||||
return repository.findAll(builder, pageable);
|
||||
}
|
||||
|
||||
public List<ApiStatsMonth> selectListForExcel(ApiStatsSearch search) {
|
||||
QApiStatsMonth q = QApiStatsMonth.apiStatsMonth;
|
||||
BooleanBuilder builder = buildSearchConditions(q, search);
|
||||
|
||||
return getJPAQueryFactory()
|
||||
.selectFrom(q)
|
||||
.where(builder)
|
||||
.orderBy(q.statTime.desc())
|
||||
.fetch();
|
||||
}
|
||||
|
||||
public List<ApiStatsChartUI> selectChartData(ApiStatsSearch search) {
|
||||
QApiStatsMonth q = QApiStatsMonth.apiStatsMonth;
|
||||
BooleanBuilder builder = new BooleanBuilder();
|
||||
|
||||
calculateDateRange(search);
|
||||
if (search.getParsedStartMonth() != null) {
|
||||
builder.and(q.statTime.goe(search.getParsedStartMonth()));
|
||||
builder.and(q.statTime.loe(search.getParsedEndMonth()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchApiName())) {
|
||||
builder.and(q.apiName.containsIgnoreCase(search.getSearchApiName()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchGwInstanceId())) {
|
||||
builder.and(q.gwInstanceId.containsIgnoreCase(search.getSearchGwInstanceId()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchBizDivCode())) {
|
||||
builder.and(q.bizDivCode.containsIgnoreCase(search.getSearchBizDivCode()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchClientId())) {
|
||||
builder.and(q.clientId.containsIgnoreCase(search.getSearchClientId()));
|
||||
}
|
||||
|
||||
return getJPAQueryFactory()
|
||||
.select(Projections.constructor(ApiStatsChartUI.class,
|
||||
q.statTime,
|
||||
q.totalCnt.sum(),
|
||||
q.successCnt.sum(),
|
||||
q.timeoutCnt.sum(),
|
||||
q.systemErrCnt.sum(),
|
||||
q.bizErrCnt.sum(),
|
||||
q.seq900TimeoutCnt.sum(),
|
||||
q.seq900SystemErrCnt.sum(),
|
||||
q.seq900BizErrCnt.sum(),
|
||||
q.avgRespTime.avg(),
|
||||
q.p50RespTime.avg(),
|
||||
q.p95RespTime.avg()))
|
||||
.from(q)
|
||||
.where(builder)
|
||||
.groupBy(q.statTime)
|
||||
.orderBy(q.statTime.asc())
|
||||
.fetch();
|
||||
}
|
||||
|
||||
private BooleanBuilder buildSearchConditions(QApiStatsMonth q, ApiStatsSearch search) {
|
||||
BooleanBuilder builder = new BooleanBuilder();
|
||||
|
||||
calculateDateRange(search);
|
||||
if (search.getParsedStartMonth() != null) {
|
||||
builder.and(q.statTime.goe(search.getParsedStartMonth()));
|
||||
builder.and(q.statTime.loe(search.getParsedEndMonth()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchApiName())) {
|
||||
builder.and(q.apiName.containsIgnoreCase(search.getSearchApiName()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchGwInstanceId())) {
|
||||
builder.and(q.gwInstanceId.containsIgnoreCase(search.getSearchGwInstanceId()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchBizDivCode())) {
|
||||
builder.and(q.bizDivCode.containsIgnoreCase(search.getSearchBizDivCode()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchClientId())) {
|
||||
builder.and(q.clientId.containsIgnoreCase(search.getSearchClientId()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchInboundAdapter())) {
|
||||
builder.and(q.inboundAdapter.containsIgnoreCase(search.getSearchInboundAdapter()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchOutboundAdapter())) {
|
||||
builder.and(q.outboundAdapter.containsIgnoreCase(search.getSearchOutboundAdapter()));
|
||||
}
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
/**
|
||||
* 조회 기간 계산 (최대 24개월 제한)
|
||||
*/
|
||||
private void calculateDateRange(ApiStatsSearch search) {
|
||||
if (StringUtils.isBlank(search.getSearchStartDateTime())) {
|
||||
return;
|
||||
}
|
||||
|
||||
YearMonth startMonth = YearMonth.parse(search.getSearchStartDateTime(),
|
||||
DateTimeFormatter.ofPattern("yyyyMM"));
|
||||
YearMonth endMonth;
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchEndDateTime())) {
|
||||
endMonth = YearMonth.parse(search.getSearchEndDateTime(),
|
||||
DateTimeFormatter.ofPattern("yyyyMM"));
|
||||
// 12개월 초과 시 시작월 기준 12개월 후로 강제 설정
|
||||
long monthsBetween = java.time.temporal.ChronoUnit.MONTHS.between(startMonth, endMonth);
|
||||
if (monthsBetween > MAX_MONTHS) {
|
||||
endMonth = startMonth.plusMonths(MAX_MONTHS);
|
||||
}
|
||||
} else {
|
||||
endMonth = startMonth.plusMonths(MAX_MONTHS);
|
||||
}
|
||||
|
||||
search.setParsedStartMonth(startMonth.format(DateTimeFormatter.ofPattern("yyyyMM")));
|
||||
search.setParsedEndMonth(endMonth.format(DateTimeFormatter.ofPattern("yyyyMM")));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package com.eactive.eai.rms.data.entity.onl.kjb.statistics;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.IdClass;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* API Gateway 연간 처리 통계
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "API_STATS_YEAR")
|
||||
@IdClass(ApiStatsYearId.class)
|
||||
public class ApiStatsYear implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@Column(name = "STAT_TIME", nullable = false, length = 4)
|
||||
private String statTime; // YYYY format
|
||||
|
||||
@Id
|
||||
@Column(name = "API_NAME", nullable = false, length = 100)
|
||||
private String apiName;
|
||||
|
||||
@Id
|
||||
@Column(name = "GW_INSTANCE_ID", nullable = false, length = 50)
|
||||
private String gwInstanceId;
|
||||
|
||||
@Id
|
||||
@Column(name = "BIZ_DIV_CODE", nullable = false, length = 50)
|
||||
private String bizDivCode = "NONE";
|
||||
|
||||
@Id
|
||||
@Column(name = "CLIENT_ID", nullable = false, length = 100)
|
||||
private String clientId = "NONE";
|
||||
|
||||
@Id
|
||||
@Column(name = "INBOUND_ADAPTER", nullable = false, length = 100)
|
||||
private String inboundAdapter = "NONE";
|
||||
|
||||
@Id
|
||||
@Column(name = "OUTBOUND_ADAPTER", nullable = false, length = 100)
|
||||
private String outboundAdapter = "NONE";
|
||||
|
||||
@Column(name = "TOTAL_CNT", nullable = false)
|
||||
private Long totalCnt = 0L;
|
||||
|
||||
@Column(name = "SUCCESS_CNT", nullable = false)
|
||||
private Long successCnt = 0L;
|
||||
|
||||
@Column(name = "TIMEOUT_CNT", nullable = false)
|
||||
private Long timeoutCnt = 0L;
|
||||
|
||||
@Column(name = "SYSTEM_ERR_CNT", nullable = false)
|
||||
private Long systemErrCnt = 0L;
|
||||
|
||||
@Column(name = "BIZ_ERR_CNT", nullable = false)
|
||||
private Long bizErrCnt = 0L;
|
||||
|
||||
@Column(name = "SEQ900_TIMEOUT_CNT", nullable = false)
|
||||
private Long seq900TimeoutCnt = 0L;
|
||||
|
||||
@Column(name = "SEQ900_SYSTEM_ERR_CNT", nullable = false)
|
||||
private Long seq900SystemErrCnt = 0L;
|
||||
|
||||
@Column(name = "SEQ900_BIZ_ERR_CNT", nullable = false)
|
||||
private Long seq900BizErrCnt = 0L;
|
||||
|
||||
@Column(name = "AVG_RESP_TIME", precision = 10, scale = 3)
|
||||
private BigDecimal avgRespTime = BigDecimal.ZERO;
|
||||
|
||||
@Column(name = "MIN_RESP_TIME", precision = 10, scale = 3)
|
||||
private BigDecimal minRespTime = BigDecimal.ZERO;
|
||||
|
||||
@Column(name = "MAX_RESP_TIME", precision = 10, scale = 3)
|
||||
private BigDecimal maxRespTime = BigDecimal.ZERO;
|
||||
|
||||
@Column(name = "P50_RESP_TIME", precision = 10, scale = 3)
|
||||
private BigDecimal p50RespTime = BigDecimal.ZERO;
|
||||
|
||||
@Column(name = "P95_RESP_TIME", precision = 10, scale = 3)
|
||||
private BigDecimal p95RespTime = BigDecimal.ZERO;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.eactive.eai.rms.data.entity.onl.kjb.statistics;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* API 통계 연간 복합키
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ApiStatsYearId implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String statTime; // YYYY format
|
||||
private String apiName;
|
||||
private String gwInstanceId;
|
||||
private String bizDivCode;
|
||||
private String clientId;
|
||||
private String inboundAdapter;
|
||||
private String outboundAdapter;
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
package com.eactive.eai.rms.data.entity.onl.kjb.statistics;
|
||||
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
/**
|
||||
* API 통계 연간 Repository
|
||||
*/
|
||||
interface ApiStatsYearRepository extends BaseRepository<ApiStatsYear, ApiStatsYearId> {
|
||||
|
||||
}
|
||||
+143
@@ -0,0 +1,143 @@
|
||||
package com.eactive.eai.rms.data.entity.onl.kjb.statistics;
|
||||
|
||||
import java.time.Year;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.jpa.AbstractDataService;
|
||||
import com.eactive.ext.kjb.statistics.ui.ApiStatsChartUI;
|
||||
import com.eactive.ext.kjb.statistics.ui.ApiStatsSearch;
|
||||
import com.querydsl.core.BooleanBuilder;
|
||||
import com.querydsl.core.types.Projections;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class ApiStatsYearService
|
||||
extends AbstractDataService<ApiStatsYear, ApiStatsYearId, ApiStatsYearRepository> {
|
||||
|
||||
public Page<ApiStatsYear> selectList(ApiStatsSearch search, Pageable pageable) {
|
||||
QApiStatsYear q = QApiStatsYear.apiStatsYear;
|
||||
BooleanBuilder builder = buildSearchConditions(q, search);
|
||||
return repository.findAll(builder, pageable);
|
||||
}
|
||||
|
||||
public List<ApiStatsYear> selectListForExcel(ApiStatsSearch search) {
|
||||
QApiStatsYear q = QApiStatsYear.apiStatsYear;
|
||||
BooleanBuilder builder = buildSearchConditions(q, search);
|
||||
|
||||
return getJPAQueryFactory()
|
||||
.selectFrom(q)
|
||||
.where(builder)
|
||||
.orderBy(q.statTime.desc())
|
||||
.fetch();
|
||||
}
|
||||
|
||||
public List<ApiStatsChartUI> selectChartData(ApiStatsSearch search) {
|
||||
QApiStatsYear q = QApiStatsYear.apiStatsYear;
|
||||
BooleanBuilder builder = new BooleanBuilder();
|
||||
|
||||
calculateDateRange(search);
|
||||
if (search.getParsedStartYear() != null) {
|
||||
builder.and(q.statTime.goe(search.getParsedStartYear()));
|
||||
builder.and(q.statTime.loe(search.getParsedEndYear()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchApiName())) {
|
||||
builder.and(q.apiName.containsIgnoreCase(search.getSearchApiName()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchGwInstanceId())) {
|
||||
builder.and(q.gwInstanceId.containsIgnoreCase(search.getSearchGwInstanceId()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchBizDivCode())) {
|
||||
builder.and(q.bizDivCode.containsIgnoreCase(search.getSearchBizDivCode()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchClientId())) {
|
||||
builder.and(q.clientId.containsIgnoreCase(search.getSearchClientId()));
|
||||
}
|
||||
|
||||
return getJPAQueryFactory()
|
||||
.select(Projections.constructor(ApiStatsChartUI.class,
|
||||
q.statTime,
|
||||
q.totalCnt.sum(),
|
||||
q.successCnt.sum(),
|
||||
q.timeoutCnt.sum(),
|
||||
q.systemErrCnt.sum(),
|
||||
q.bizErrCnt.sum(),
|
||||
q.seq900TimeoutCnt.sum(),
|
||||
q.seq900SystemErrCnt.sum(),
|
||||
q.seq900BizErrCnt.sum(),
|
||||
q.avgRespTime.avg(),
|
||||
q.p50RespTime.avg(),
|
||||
q.p95RespTime.avg()))
|
||||
.from(q)
|
||||
.where(builder)
|
||||
.groupBy(q.statTime)
|
||||
.orderBy(q.statTime.asc())
|
||||
.fetch();
|
||||
}
|
||||
|
||||
private BooleanBuilder buildSearchConditions(QApiStatsYear q, ApiStatsSearch search) {
|
||||
BooleanBuilder builder = new BooleanBuilder();
|
||||
|
||||
calculateDateRange(search);
|
||||
if (search.getParsedStartYear() != null) {
|
||||
builder.and(q.statTime.goe(search.getParsedStartYear()));
|
||||
builder.and(q.statTime.loe(search.getParsedEndYear()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchApiName())) {
|
||||
builder.and(q.apiName.containsIgnoreCase(search.getSearchApiName()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchGwInstanceId())) {
|
||||
builder.and(q.gwInstanceId.containsIgnoreCase(search.getSearchGwInstanceId()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchBizDivCode())) {
|
||||
builder.and(q.bizDivCode.containsIgnoreCase(search.getSearchBizDivCode()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchClientId())) {
|
||||
builder.and(q.clientId.containsIgnoreCase(search.getSearchClientId()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchInboundAdapter())) {
|
||||
builder.and(q.inboundAdapter.containsIgnoreCase(search.getSearchInboundAdapter()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchOutboundAdapter())) {
|
||||
builder.and(q.outboundAdapter.containsIgnoreCase(search.getSearchOutboundAdapter()));
|
||||
}
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
/**
|
||||
* 조회 기간 계산
|
||||
*/
|
||||
private void calculateDateRange(ApiStatsSearch search) {
|
||||
if (StringUtils.isBlank(search.getSearchStartDateTime())) {
|
||||
return;
|
||||
}
|
||||
|
||||
Year startYear = Year.parse(search.getSearchStartDateTime());
|
||||
Year endYear;
|
||||
|
||||
if (StringUtils.isNotBlank(search.getSearchEndDateTime())) {
|
||||
endYear = Year.parse(search.getSearchEndDateTime());
|
||||
} else {
|
||||
endYear = Year.now();
|
||||
}
|
||||
|
||||
search.setParsedStartYear(String.valueOf(startYear.getValue()));
|
||||
search.setParsedEndYear(String.valueOf(endYear.getValue()));
|
||||
}
|
||||
}
|
||||
+35
-22
@@ -44,38 +44,47 @@ public class EAILogRepositoryImpl implements EAILogRepository {
|
||||
|
||||
QEAIMessageEntity qeaiMessageEntity = QEAIMessageEntity.eAIMessageEntity;
|
||||
|
||||
JPAQuery<?> query = new JPAQueryFactory(em).from(entityPathBase);
|
||||
appendConditions(eaiLogSearch, qeaiLog, entityPathBase, query);
|
||||
JPAQuery<?> query = new JPAQueryFactory(em)
|
||||
.from(entityPathBase)
|
||||
.leftJoin(qeaiMessageEntity)
|
||||
.on(qeaiLog.eaisvcname.eq(qeaiMessageEntity.eaisvcname));
|
||||
|
||||
appendConditions(eaiLogSearch, qeaiLog, entityPathBase, query, qeaiMessageEntity);
|
||||
|
||||
long totalCount = query.select(qeaiLog.id.msgdpstyms.count()).fetchOne();
|
||||
|
||||
if (totalCount == 0) {
|
||||
return new PageImpl<>(new ArrayList<>(), pageable, 0);
|
||||
}
|
||||
if (totalCount == 0) {
|
||||
return new PageImpl<>(new ArrayList<>(), pageable, 0);
|
||||
}
|
||||
|
||||
List<EAILogDto> list = query
|
||||
// .select(Projections.constructor(EAILogDto.class, qeaiLog, qeaiMessageEntity.eaisvcdesc))
|
||||
.select(Projections.constructor(EAILogDto.class,
|
||||
qeaiLog.id, qeaiLog.trackasiskey1ctnt, qeaiLog.trackasiskey2ctnt, qeaiLog.keymgtmsgctnt,
|
||||
qeaiLog.eaisvcname, qeaiLog.extbizcd, qeaiLog.refkey, qeaiLog.clientname,
|
||||
qeaiLog.orgname, qeaiLog.msgprcssyms, qeaiLog.companycode, qeaiLog.eaierrctnt,
|
||||
qeaiMessageEntity.eaisvcdesc))
|
||||
.from(entityPathBase)
|
||||
.leftJoin(qeaiMessageEntity)
|
||||
.on(qeaiLog.eaisvcname.eq(qeaiMessageEntity.eaisvcname))
|
||||
.orderBy(qeaiLog.id.msgdpstyms.desc(), qeaiLog.id.eaisvcserno.asc(), qeaiLog.id.logprcssserno.asc())
|
||||
.limit(1000)
|
||||
.fetch();
|
||||
List<EAILogDto> list = query
|
||||
// .select(Projections.constructor(EAILogDto.class, qeaiLog, qeaiMessageEntity.eaisvcdesc))
|
||||
.select(Projections.constructor(EAILogDto.class,
|
||||
qeaiLog.id, qeaiLog.trackasiskey1ctnt, qeaiLog.trackasiskey2ctnt, qeaiLog.keymgtmsgctnt,
|
||||
qeaiLog.eaisvcname, qeaiLog.extbizcd, qeaiLog.refkey, qeaiLog.clientname,
|
||||
qeaiLog.orgname, qeaiLog.msgprcssyms, qeaiLog.companycode, qeaiLog.eaierrctnt,
|
||||
qeaiMessageEntity.eaisvcdesc))
|
||||
// .from(...) --> 이미 위에서 선언했으므로 생략
|
||||
// .leftJoin(...) --> 이미 위에서 선언했으므로 생략
|
||||
.orderBy(qeaiLog.id.msgdpstyms.desc(), qeaiLog.id.eaisvcserno.asc(), qeaiLog.id.logprcssserno.asc())
|
||||
.limit(1000)
|
||||
.fetch();
|
||||
|
||||
return new PageImpl<>(list, pageable, totalCount);
|
||||
return new PageImpl<>(list, pageable, totalCount);
|
||||
}
|
||||
|
||||
public Map<String, Long> countDetailedTransactions(Class<? extends EAILog> clazz, EAILogSearch eaiLogSearch) {
|
||||
QEAILog qeaiLog = QEAILog.eAILog;
|
||||
EntityPathBase<?> entityPathBase = new EntityPathBase<>(clazz, qeaiLog.getMetadata().getName());
|
||||
|
||||
QEAIMessageEntity qeaiMessageEntity = QEAIMessageEntity.eAIMessageEntity;
|
||||
|
||||
JPAQuery<?> query = new JPAQueryFactory(em).from(entityPathBase);
|
||||
appendConditions(eaiLogSearch, qeaiLog, entityPathBase, query);
|
||||
JPAQuery<?> query = new JPAQueryFactory(em)
|
||||
.from(entityPathBase)
|
||||
.leftJoin(qeaiMessageEntity)
|
||||
.on(qeaiLog.eaisvcname.eq(qeaiMessageEntity.eaisvcname));
|
||||
|
||||
appendConditions(eaiLogSearch, qeaiLog, entityPathBase, query, qeaiMessageEntity);
|
||||
|
||||
List<Tuple> results = query.select(
|
||||
qeaiLog.id.logprcssserno, // 로그 처리 상태
|
||||
@@ -91,7 +100,7 @@ public class EAILogRepositoryImpl implements EAILogRepository {
|
||||
return reult;
|
||||
}
|
||||
|
||||
private void appendConditions(EAILogSearch eaiLogSearch, QEAILog qeaiLog, EntityPathBase<?> entityPathBase, JPAQuery<?> query) {
|
||||
private void appendConditions(EAILogSearch eaiLogSearch, QEAILog qeaiLog, EntityPathBase<?> entityPathBase, JPAQuery<?> query, QEAIMessageEntity qeaiMessageEntity) {
|
||||
|
||||
if (StringUtils.equalsIgnoreCase(eaiLogSearch.getAuthChk(), "Y")) {
|
||||
QUserBusiness qUserBusiness = QUserBusiness.userBusiness;
|
||||
@@ -127,6 +136,10 @@ public class EAILogRepositoryImpl implements EAILogRepository {
|
||||
if (StringUtils.isNotBlank(eaiLogSearch.getSearchEaiSvcName())) {
|
||||
query.where(qeaiLog.eaisvcname.containsIgnoreCase(eaiLogSearch.getSearchEaiSvcName()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(eaiLogSearch.getSearchEaiSvcDesc())) {
|
||||
query.where(qeaiMessageEntity.eaisvcdesc.containsIgnoreCase(eaiLogSearch.getSearchEaiSvcDesc()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(eaiLogSearch.getSearchKeyMgtMsgCtnt())) {
|
||||
query.where(qeaiLog.keymgtmsgctnt.contains(eaiLogSearch.getSearchKeyMgtMsgCtnt()));
|
||||
|
||||
Reference in New Issue
Block a user