style: 错误信息英文返回-monitor 模块路由

This commit is contained in:
TsMask
2023-11-08 14:57:08 +08:00
parent a102f772cb
commit d456b735fb
7 changed files with 93 additions and 80 deletions

View File

@@ -1,7 +1,7 @@
package service
import (
"errors"
"fmt"
"ems.agt/src/framework/constants/common"
"ems.agt/src/framework/cron"
@@ -85,7 +85,8 @@ func (r *SysJobImpl) DeleteJobByIds(jobIds []string) (int64, error) {
// 检查是否存在
jobs := r.sysJobRepository.SelectJobByIds(jobIds)
if len(jobs) <= 0 {
return 0, errors.New("没有权限访问调度任务数据!")
// 没有可访问调度任务数据!
return 0, fmt.Errorf("There is no accessible scheduling task data!")
}
if len(jobs) == len(jobIds) {
// 清除任务
@@ -95,7 +96,8 @@ func (r *SysJobImpl) DeleteJobByIds(jobIds []string) (int64, error) {
rows := r.sysJobRepository.DeleteJobByIds(jobIds)
return rows, nil
}
return 0, errors.New("删除调度任务信息失败!")
// 删除调度任务信息失败!
return 0, fmt.Errorf("Failed to delete scheduling task information!")
}
// ChangeStatus 任务调度状态修改