1
0

merge: 合并代码20241018

This commit is contained in:
TsMask
2024-10-18 17:26:59 +08:00
parent 49860c2f28
commit 17f57175c7
289 changed files with 21476 additions and 12863 deletions

View File

@@ -21,18 +21,16 @@ import (
// 实例化控制层 SysJobLogController 结构体
var NewSysJobLog = &SysJobLogController{
sysJobLogService: service.NewSysJobLogImpl,
sysDictDataService: systemService.NewSysDictDataImpl,
sysJobLogService: service.NewSysJobLog,
sysDictDataService: systemService.NewSysDictData,
}
// 调度任务日志信息
//
// PATH /monitor/jobLog
type SysJobLogController struct {
// 调度任务日志服务
sysJobLogService service.ISysJobLog
// 字典数据服务
sysDictDataService systemService.ISysDictData
sysJobLogService *service.SysJobLog // 调度任务日志服务
sysDictDataService *systemService.SysDictData // 字典数据服务
}
// 调度任务日志列表
@@ -44,7 +42,7 @@ func (s *SysJobLogController) List(c *gin.Context) {
querys := ctx.QueryMap(c)
// 任务ID优先级更高
if v, ok := querys["jobId"]; ok && v != nil {
jobInfo := service.NewSysJobImpl.SelectJobById(v.(string))
jobInfo := service.NewSysJob.SelectJobById(v.(string))
querys["jobName"] = jobInfo.JobName
querys["jobGroup"] = jobInfo.JobGroup
}
@@ -131,15 +129,18 @@ func (s *SysJobLogController) Clean(c *gin.Context) {
func (s *SysJobLogController) Export(c *gin.Context) {
language := ctx.AcceptLanguage(c)
// 查询结果,根据查询条件结果,单页最大值限制
// querys := ctx.BodyJSONMap(c)
// data := s.sysJobLogService.SelectJobLogPage(querys)
// if data["total"].(int64) == 0 {
// c.JSON(200, result.ErrMsg("Export data record is empty"))
// return
// }
// rows := data["rows"].([]model.SysJobLog)
querys := ctx.BodyJSONMap(c)
querys["pageNum"] = 1
querys["pageSize"] = 10000
data := s.sysJobLogService.SelectJobLogPage(querys)
if parse.Number(data["total"]) == 0 {
// 导出数据记录为空
c.JSON(200, result.ErrMsg(i18n.TKey(language, "app.common.exportEmpty")))
return
}
rows := data["rows"].([]model.SysJobLog)
rows := s.sysJobLogService.SelectJobLogList(model.SysJobLog{})
// rows := s.sysJobLogService.SelectJobLogList(model.SysJobLog{})
if len(rows) <= 0 {
// 导出数据记录为空
c.JSON(200, result.ErrMsg(i18n.TKey(language, "app.common.exportEmpty")))