Commit 90f35b99 authored by duanruiming's avatar duanruiming

[add] 策略优化记录添加关联事件eventId

parent bc7e92d7
...@@ -62,6 +62,8 @@ public class ImbalanceAlgorithmDTO { ...@@ -62,6 +62,8 @@ public class ImbalanceAlgorithmDTO {
// 开始 = 1 结束 = -1 // 开始 = 1 结束 = -1
private Integer control_method; private Integer control_method;
private Integer control_duration; private Integer control_duration;
@JsonProperty("event_id")
private String eventId;
@Data @Data
@JsonIgnoreProperties(ignoreUnknown = true) @JsonIgnoreProperties(ignoreUnknown = true)
......
...@@ -41,5 +41,6 @@ public class PhaseEmptyDataDTO { ...@@ -41,5 +41,6 @@ public class PhaseEmptyDataDTO {
/** 响应内容 */ /** 响应内容 */
private String responseContent; private String responseContent;
private Integer isSuccessed; private Integer isSuccessed;
private String eventId;
} }
} }
...@@ -63,4 +63,6 @@ public class CrossStrategyResultEntity { ...@@ -63,4 +63,6 @@ public class CrossStrategyResultEntity {
private Integer dt; private Integer dt;
@TableField("duration") @TableField("duration")
private Integer duration; private Integer duration;
@TableField("event_id")
private String eventId;
} }
...@@ -59,6 +59,7 @@ public class CrossStrategyOptServiceImpl implements CrossStrategyOptService { ...@@ -59,6 +59,7 @@ public class CrossStrategyOptServiceImpl implements CrossStrategyOptService {
entity.setInsertTime(new Date(createStamp)); entity.setInsertTime(new Date(createStamp));
entity.setCountDown(countDown); entity.setCountDown(countDown);
entity.setExtendTime(countDown); entity.setExtendTime(countDown);
entity.setEventId(idx.getEventId());
if (rtnType < 0) { if (rtnType < 0) {
if (Objects.nonNull(idx.getResponseCode()) && !Objects.equals(-1, idx.getResponseCode())) { if (Objects.nonNull(idx.getResponseCode()) && !Objects.equals(-1, idx.getResponseCode())) {
entity.setResponseCode(idx.getResponseCode()); entity.setResponseCode(idx.getResponseCode());
...@@ -145,6 +146,7 @@ public class CrossStrategyOptServiceImpl implements CrossStrategyOptService { ...@@ -145,6 +146,7 @@ public class CrossStrategyOptServiceImpl implements CrossStrategyOptService {
crossStrategyResultEntity.setData(mapper.writeValueAsString(dto.getData())); crossStrategyResultEntity.setData(mapper.writeValueAsString(dto.getData()));
crossStrategyResultEntity.setResponseContent(dto.getResponseContent()); crossStrategyResultEntity.setResponseContent(dto.getResponseContent());
crossStrategyResultEntity.setDuration(dto.getControl_duration()); crossStrategyResultEntity.setDuration(dto.getControl_duration());
crossStrategyResultEntity.setEventId(dto.getEventId());
if (Objects.nonNull(issueTime)) { if (Objects.nonNull(issueTime)) {
String parse = DateUtil.format(issueTime, "yyyyMMdd"); String parse = DateUtil.format(issueTime, "yyyyMMdd");
crossStrategyResultEntity.setDt(Integer.valueOf(parse)); crossStrategyResultEntity.setDt(Integer.valueOf(parse));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment