From ea038a5437d2073121d7be840c929e196180d263 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Fri, 30 Jul 2021 22:33:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81=E7=94=9F?= =?UTF-8?q?=E6=88=90=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-modules/ruoyi-gen/src/main/resources/vm/java/controller.java.vm | 4 ++-- ruoyi-modules/ruoyi-gen/src/main/resources/vm/java/mapper.java.vm | 2 +- ruoyi-modules/ruoyi-gen/src/main/resources/vm/xml/mapper.xml.vm | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/java/controller.java.vm b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/java/controller.java.vm index 600044f..62192bd 100644 --- a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/java/controller.java.vm +++ b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/java/controller.java.vm @@ -78,7 +78,7 @@ public class ${ClassName}Controller extends BaseController @GetMapping(value = "/{${pkColumn.javaField}}") public AjaxResult getInfo(@PathVariable("${pkColumn.javaField}") ${pkColumn.javaType} ${pkColumn.javaField}) { - return AjaxResult.success(${className}Service.select${ClassName}ById(${pkColumn.javaField})); + return AjaxResult.success(${className}Service.select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaField})); } /** @@ -111,6 +111,6 @@ public class ${ClassName}Controller extends BaseController @DeleteMapping("/{${pkColumn.javaField}s}") public AjaxResult remove(@PathVariable ${pkColumn.javaType}[] ${pkColumn.javaField}s) { - return toAjax(${className}Service.delete${ClassName}ByIds(${pkColumn.javaField}s)); + return toAjax(${className}Service.delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaField}s)); } } diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/java/mapper.java.vm b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/java/mapper.java.vm index a2f3b51..f744640 100644 --- a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/java/mapper.java.vm +++ b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/java/mapper.java.vm @@ -86,6 +86,6 @@ public interface ${ClassName}Mapper * @param ${pkColumn.javaField} ${functionName}ID * @return 结果 */ - public int delete${subClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}); + public int delete${subClassName}By${subTableFkClassName}(${pkColumn.javaType} ${pkColumn.javaField}); #end } diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/xml/mapper.xml.vm b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/xml/mapper.xml.vm index e1891d2..0c681d9 100644 --- a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/xml/mapper.xml.vm +++ b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/xml/mapper.xml.vm @@ -121,7 +121,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + delete from ${subTableName} where ${subTableFkName} = #{${subTableFkclassName}}