修改原有框架中英文映射

This commit is contained in:
2026-03-17 18:09:10 +08:00
parent e7b8f4cae9
commit bdf50e61f5
81 changed files with 1956 additions and 735 deletions

View File

@@ -50,7 +50,7 @@ class CrontabLogic extends BaseLogic
6 => "0 {$minute} {$hour} * * {$week}",
7 => "0 {$minute} {$hour} {$day} * *",
8 => "0 {$minute} {$hour} {$day} {$month} *",
default => throw new ApiException("任务类型异常"),
default => throw new ApiException('Invalid task type'),
};
// 定时任务模型新增
@@ -95,13 +95,13 @@ class CrontabLogic extends BaseLogic
6 => "0 {$minute} {$hour} * * {$week}",
7 => "0 {$minute} {$hour} {$day} * *",
8 => "0 {$minute} {$hour} {$day} {$month} *",
default => throw new ApiException("任务类型异常"),
default => throw new ApiException('Invalid task type'),
};
// 查询任务数据
$model = $this->model->findOrEmpty($id);
if ($model->isEmpty()) {
throw new ApiException('数据不存在');
throw new ApiException('Data not found');
}
$result = $model->save([
@@ -134,7 +134,7 @@ class CrontabLogic extends BaseLogic
{
if (is_array($ids)) {
if (count($ids) > 1) {
throw new ApiException('禁止批量删除操作');
throw new ApiException('Batch delete is not allowed');
}
$ids = $ids[0];
}
@@ -157,7 +157,7 @@ class CrontabLogic extends BaseLogic
{
$model = $this->model->findOrEmpty($id);
if ($model->isEmpty()) {
throw new ApiException('数据不存在');
throw new ApiException('Data not found');
}
$result = $model->save(['status' => $status]);
if ($result) {