diff --git a/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/controller/GenDsConfController.java b/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/controller/GenDsConfController.java index 78092372..60bd7ae9 100755 --- a/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/controller/GenDsConfController.java +++ b/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/controller/GenDsConfController.java @@ -71,7 +71,7 @@ public class GenDsConfController { * @return R */ @GetMapping("/{id}") - public R getById(@PathVariable("id") Integer id) { + public R getById(@PathVariable("id") Long id) { return R.ok(datasourceConfService.getById(id)); } diff --git a/pig-visual/pig-codegen/src/main/resources/template/element/form.vue.vm b/pig-visual/pig-codegen/src/main/resources/template/element/form.vue.vm index d5fb0cf8..f7fbf7f6 100644 --- a/pig-visual/pig-codegen/src/main/resources/template/element/form.vue.vm +++ b/pig-visual/pig-codegen/src/main/resources/template/element/form.vue.vm @@ -58,6 +58,7 @@ init (id) { this.visible = true; this.canSubmit = true; + this.dataForm.${pk.lowerAttrName} = undefined this.$nextTick(() => { this.$refs['dataForm'].resetFields() if (id) {