chore: 优化部分命名和提示

This commit is contained in:
2024-07-18 23:57:58 +08:00
parent eb8fe92088
commit c57670aa77
2 changed files with 13 additions and 13 deletions

View File

@@ -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<InstanceType<typeof ${classNamePrefix}DetailDrawer>>()
// 详情
const onDetail = (item: ${classNamePrefix}Resp) => {
${classNamePrefix}DetailDrawerRef.value?.onDetail(item.id)
const onDetail = (record: ${classNamePrefix}Resp) => {
${classNamePrefix}DetailDrawerRef.value?.onDetail(record.id)
}
</script>

View File

@@ -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("连接任务调度中心异常");
}
}
}