!97 一些优化

* refactor: 重构表格分页组件,适配大数据量分页
* fix:定时任务修复
* feat: gaussdb单独提出来
This commit is contained in:
zongyangleo
2024-01-30 13:09:26 +00:00
committed by Coder慌
parent d0b71a1c40
commit fc1b9ef35d
12 changed files with 183 additions and 61 deletions

View File

@@ -14,7 +14,6 @@ import (
"strings"
"github.com/gin-gonic/gin"
"github.com/google/uuid"
)
type DataSyncTask struct {
@@ -46,13 +45,6 @@ func (d *DataSyncTask) SaveTask(rc *req.Ctx) {
task.DataSql = sql
form.DataSql = sql
key := task.TaskKey
// 判断key为空就生成随机key
if key == "" {
key = uuid.New().String()
task.TaskKey = key
}
rc.ReqParam = form
biz.ErrIsNil(d.DataSyncTaskApp.Save(rc.MetaCtx, task))
}
@@ -88,7 +80,7 @@ func (d *DataSyncTask) ChangeStatus(rc *req.Ctx) {
func (d *DataSyncTask) Run(rc *req.Ctx) {
taskId := getTaskId(rc.GinCtx)
rc.ReqParam = taskId
d.DataSyncTaskApp.RunCronJob(taskId)
_ = d.DataSyncTaskApp.RunCronJob(taskId)
}
func (d *DataSyncTask) Stop(rc *req.Ctx) {