Skip to content

Commit

Permalink
fix: 2.5.0
Browse files Browse the repository at this point in the history
1. 修复看板重试场景列表统计错误
2. 修复通知和场景列表页查询问题
3. 删除retry_summary的多余索引问题
  • Loading branch information
open-snail2 committed Dec 11, 2023
1 parent 29f7d15 commit 02b9001
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 24 deletions.
3 changes: 1 addition & 2 deletions doc/sql/easy_retry_mysql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -435,8 +435,7 @@ CREATE TABLE `retry_summary`
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`),
KEY `idx_namespace_id_group_name_scene_name` (`namespace_id`, `group_name`, scene_name),
UNIQUE KEY `uk_scene_name_trigger_at` (`namespace_id`, `group_name`, `scene_name`, `trigger_at`) USING BTREE
) ENGINE = InnoDB
AUTO_INCREMENT = 1
DEFAULT CHARSET = utf8mb4 COMMENT ='DashBoard_Retry';
DEFAULT CHARSET = utf8mb4 COMMENT ='DashBoard_Retry';
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@
<select id="retryTaskList"
resultType="com.aizuda.easy.retry.template.datasource.persistence.dataobject.DashboardRetryLineResponseDO$Task">
SELECT group_name AS groupName,
sum(CASE WHEN (group_status = 1) THEN 1 ELSE 0 END) AS run,
sum(CASE WHEN (scene_status = 1) THEN 1 ELSE 0 END) AS run,
count(*) AS total
FROM group_config
FROM scene_config
WHERE namespace_id = #{namespaceId}
GROUP BY namespace_id, group_name
</select>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,22 +177,21 @@ public int updateRetryTaskStatus(RetryTaskUpdateStatusRequestVO requestVO) {
}

if (RetryStatusEnum.FINISH.getStatus().equals(retryStatusEnum.getStatus())) {

RetryTaskLogMessage retryTaskLogMessage = new RetryTaskLogMessage();
retryTaskLogMessage.setUniqueId(retryTask.getUniqueId());
retryTaskLogMessage.setGroupName(retryTask.getGroupName());
retryTaskLogMessage.setMessage("手动操作完成");
retryTaskLogMessage.setCreateDt(LocalDateTime.now());
retryTaskLogMessageMapper.insert(retryTaskLogMessage);

RetryTaskLog retryTaskLog = new RetryTaskLog();
retryTaskLog.setRetryStatus(RetryStatusEnum.FINISH.getStatus());
retryTaskLogMapper.update(retryTaskLog, new LambdaUpdateWrapper<RetryTaskLog>()
.eq(RetryTaskLog::getNamespaceId, namespaceId)
.eq(RetryTaskLog::getUniqueId, retryTask.getUniqueId())
.eq(RetryTaskLog::getGroupName, retryTask.getGroupName()));
}

RetryTaskLog retryTaskLog = new RetryTaskLog();
retryTaskLog.setRetryStatus(requestVO.getRetryStatus());
retryTaskLogMapper.update(retryTaskLog, new LambdaUpdateWrapper<RetryTaskLog>()
.eq(RetryTaskLog::getNamespaceId, namespaceId)
.eq(RetryTaskLog::getUniqueId, retryTask.getUniqueId())
.eq(RetryTaskLog::getGroupName, retryTask.getGroupName()));

retryTask.setUpdateDt(LocalDateTime.now());
return retryTaskAccess.updateById(requestVO.getGroupName(), namespaceId, retryTask);
}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/dashboard/RetryAnalysis.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</a-row>
<a-row :gutter="24" type="flex" :style="{ marginTop: '24px' }">
<a-col :xl="12" :lg="24" :md="24" :sm="24" :xs="24">
<a-card :loading="loading" :bordered="false" :title="$t('dashboard.analysis.online-top-search')" :style="{ height: '100%' }">
<a-card :loading="loading" :bordered="false" title="场景列表" :style="{ height: '100%' }">
<s-table
ref="table"
size="default"
Expand All @@ -28,7 +28,7 @@
<div>
<div>
<v-chart :force-fit="true" :height="405" :data="pieData" :scale="pieScale" >
<v-tooltip :showTitle="true" dataKey="value*percent" />
<v-tooltip :showTitle="false" dataKey="name*percent" />
<v-axis />
<v-legend dataKey="value" />
<v-pie position="percent" color="value" :vStyle="pieStyle" />
Expand Down
5 changes: 0 additions & 5 deletions frontend/src/views/task/NotifyList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,6 @@ export default {
created () {
getAllGroupNameList().then((res) => {
this.groupNameList = res.data
if (this.groupNameList !== null && this.groupNameList.length > 0) {
this.queryParam['groupName'] = this.groupNameList[0]
this.$refs.table.refresh(true)
this.handleChange(this.groupNameList[0])
}
})
const groupName = this.$route.query.groupName
Expand Down
5 changes: 0 additions & 5 deletions frontend/src/views/task/SceneList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,6 @@ export default {
created () {
getAllGroupNameList().then((res) => {
this.groupNameList = res.data
if (this.groupNameList !== null && this.groupNameList.length > 0) {
this.queryParam['groupName'] = this.groupNameList[0]
this.$refs.table.refresh(true)
this.handleChange(this.groupNameList[0])
}
})
},
methods: {
Expand Down

0 comments on commit 02b9001

Please sign in to comment.