1
0

marge: 合并代码

This commit is contained in:
TsMask
2023-11-13 18:28:13 +08:00
parent 6caf373ab5
commit 21a5e210eb
77 changed files with 1001 additions and 664 deletions

View File

@@ -50,7 +50,7 @@ func (s *SysJobLogController) List(c *gin.Context) {
func (s *SysJobLogController) Info(c *gin.Context) {
jobLogId := c.Param("jobLogId")
if jobLogId == "" {
c.JSON(400, result.CodeMsg(400, "参数错误"))
c.JSON(400, result.CodeMsg(400, "parameter error"))
return
}
data := s.sysJobLogService.SelectJobLogById(jobLogId)
@@ -67,7 +67,7 @@ func (s *SysJobLogController) Info(c *gin.Context) {
func (s *SysJobLogController) Remove(c *gin.Context) {
jobLogIds := c.Param("jobLogIds")
if jobLogIds == "" {
c.JSON(400, result.CodeMsg(400, "参数错误"))
c.JSON(400, result.CodeMsg(400, "parameter error"))
return
}
@@ -80,7 +80,8 @@ func (s *SysJobLogController) Remove(c *gin.Context) {
}
rows := s.sysJobLogService.DeleteJobLogByIds(uniqueIDs)
if rows > 0 {
msg := fmt.Sprintf("删除成功:%d", rows)
// 删除成功:%d
msg := fmt.Sprintf("Deleted successfully: %d", rows)
c.JSON(200, result.OkMsg(msg))
return
}
@@ -107,7 +108,7 @@ func (s *SysJobLogController) Export(c *gin.Context) {
querys := ctx.BodyJSONMap(c)
data := s.sysJobLogService.SelectJobLogPage(querys)
if data["total"].(int64) == 0 {
c.JSON(200, result.ErrMsg("导出数据记录为空"))
c.JSON(200, result.ErrMsg("Export data record is empty"))
return
}
rows := data["rows"].([]model.SysJobLog)
@@ -116,14 +117,14 @@ func (s *SysJobLogController) Export(c *gin.Context) {
fileName := fmt.Sprintf("jobLog_export_%d_%d.xlsx", len(rows), time.Now().UnixMilli())
// 第一行表头标题
headerCells := map[string]string{
"A1": "日志序号",
"B1": "任务名称",
"C1": "任务组名",
"D1": "调用目标",
"E1": "传入参数",
"F1": "日志信息",
"G1": "执行状态",
"H1": "记录时间",
"A1": "JobLogID",
"B1": "JobName",
"C1": "JobGroupName",
"D1": "InvokeTarget",
"E1": "TargetParams",
"F1": "JobMsg",
"G1": "Status",
"H1": "Time",
}
// 读取任务组名字典数据
dictSysJobGroup := s.sysDictDataService.SelectDictDataByType("sys_job_group")
@@ -140,9 +141,9 @@ func (s *SysJobLogController) Export(c *gin.Context) {
}
}
// 状态
statusValue := "失败"
statusValue := "Fail"
if row.Status == "1" {
statusValue = "成功"
statusValue = "Success"
}
dataCells = append(dataCells, map[string]any{
"A" + idx: row.JobLogID,