From c57670aa77b7e0e0a7ef1fedcb5ef22520717695 Mon Sep 17 00:00:00 2001 From: Charles7c Date: Thu, 18 Jul 2024 23:57:58 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E4=BC=98=E5=8C=96=E9=83=A8=E5=88=86?= =?UTF-8?q?=E5=91=BD=E5=90=8D=E5=92=8C=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/templates/frontend/index.ftl | 12 ++++++------ .../java/top/continew/admin/job/api/JobClient.java | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/continew-admin-plugins/continew-admin-generator/src/main/resources/templates/frontend/index.ftl b/continew-admin-plugins/continew-admin-generator/src/main/resources/templates/frontend/index.ftl index e7b9c180..0874d069 100644 --- a/continew-admin-plugins/continew-admin-generator/src/main/resources/templates/frontend/index.ftl +++ b/continew-admin-plugins/continew-admin-generator/src/main/resources/templates/frontend/index.ftl @@ -172,8 +172,8 @@ const reset = () => { } // 删除 -const onDelete = (item: ${classNamePrefix}Resp) => { - return handleDelete(() => delete${classNamePrefix}(item.id), { +const onDelete = (record: ${classNamePrefix}Resp) => { + return handleDelete(() => delete${classNamePrefix}(record.id), { content: `是否确定删除该条数据?`, showModal: true }) @@ -191,14 +191,14 @@ const onAdd = () => { } // 修改 -const onUpdate = (item: ${classNamePrefix}Resp) => { - ${classNamePrefix}AddModalRef.value?.onUpdate(item.id) +const onUpdate = (record: ${classNamePrefix}Resp) => { + ${classNamePrefix}AddModalRef.value?.onUpdate(record.id) } const ${classNamePrefix}DetailDrawerRef = ref>() // 详情 -const onDetail = (item: ${classNamePrefix}Resp) => { - ${classNamePrefix}DetailDrawerRef.value?.onDetail(item.id) +const onDetail = (record: ${classNamePrefix}Resp) => { + ${classNamePrefix}DetailDrawerRef.value?.onDetail(record.id) } diff --git a/continew-admin-plugins/continew-admin-job/src/main/java/top/continew/admin/job/api/JobClient.java b/continew-admin-plugins/continew-admin-job/src/main/java/top/continew/admin/job/api/JobClient.java index f0443984..f602d176 100644 --- a/continew-admin-plugins/continew-admin-job/src/main/java/top/continew/admin/job/api/JobClient.java +++ b/continew-admin-plugins/continew-admin-job/src/main/java/top/continew/admin/job/api/JobClient.java @@ -59,9 +59,9 @@ public class JobClient { private final String password; public JobClient(String url, String username, String password) { - Assert.notBlank(url, "任务调度服务 URL 不能为空"); - Assert.notBlank(username, "任务调度服务用户名不能为空"); - Assert.notBlank(password, "任务调度服务密码不能为空"); + Assert.notBlank(url, "任务调度中心 URL 不能为空"); + Assert.notBlank(username, "任务调度中心用户名不能为空"); + Assert.notBlank(password, "任务调度中心密码不能为空"); this.url = url; this.username = username; this.password = password; @@ -85,7 +85,7 @@ public class JobClient { return result.getData(); } catch (Exception e) { log.error("Request job server failed, error msg: {}", e.getMessage(), e); - throw new IllegalStateException(e); + throw new IllegalStateException("连接任务调度中心异常"); } } @@ -110,7 +110,7 @@ public class JobClient { return page; } catch (Exception e) { log.error("Request job server failed, error msg: {}", e.getMessage(), e); - throw new IllegalStateException(e); + throw new IllegalStateException("连接任务调度中心异常"); } } @@ -143,7 +143,7 @@ public class JobClient { httpRequest.body(JSONUtil.toJsonStr(paramMap)); HttpResponse response = httpRequest.execute(); if (!response.isOk() || response.body() == null) { - throw new IllegalStateException("连接任务调度中心错误"); + throw new IllegalStateException("连接任务调度中心异常"); } Result result = JSONUtil.toBean(response.body(), Result.class); if (!STATUS_SUCCESS.equals(result.getStatus())) { @@ -160,7 +160,7 @@ public class JobClient { */ private void checkResponse(ResponseEntity responseEntity) { if (!responseEntity.getStatusCode().is2xxSuccessful() || responseEntity.getBody() == null) { - throw new IllegalStateException("连接任务调度中心错误"); + throw new IllegalStateException("连接任务调度中心异常"); } } }