diff --git a/src/main/java/com/ruoyi/project/tool/gen/util/GenUtils.java b/src/main/java/com/ruoyi/project/tool/gen/util/GenUtils.java index a2ac8bc7..7f784cd2 100644 --- a/src/main/java/com/ruoyi/project/tool/gen/util/GenUtils.java +++ b/src/main/java/com/ruoyi/project/tool/gen/util/GenUtils.java @@ -142,7 +142,7 @@ public class GenUtils if (template.contains("Mapper.java.vm")) { - return javaPath + "mapper" + "/" + "I" + className + "Mapper.java"; + return javaPath + "mapper" + "/" + className + "Mapper.java"; } if (template.contains("Service.java.vm")) diff --git a/src/main/resources/static/ruoyi/login.js b/src/main/resources/static/ruoyi/login.js index 70d6ce8c..2235edbc 100644 --- a/src/main/resources/static/ruoyi/login.js +++ b/src/main/resources/static/ruoyi/login.js @@ -17,7 +17,7 @@ $.validator.setDefaults({ function login() { var username = $("input[name='username']").val().trim(); var password = $("input[name='password']").val().trim(); - var validateCode = $("input[name='validateCode']").val().trim(); + var validateCode = $("input[name='validateCode']").val(); var rememberMe = $("input[name='rememberme']").is(':checked'); $.ajax({ type: "POST", diff --git a/src/main/resources/templates/system/user/profile/avatar.html b/src/main/resources/templates/system/user/profile/avatar.html index a997268d..a859dd6a 100644 --- a/src/main/resources/templates/system/user/profile/avatar.html +++ b/src/main/resources/templates/system/user/profile/avatar.html @@ -4,6 +4,7 @@ 用户头像修改 +
@@ -44,7 +45,7 @@ $(window).load(function() { var img = cropper.getBlob(); var formdata = new FormData(); formdata.append("avatarfile", img); - formdata.append("userId", 1); + formdata.append("userId", $("#userId").val()); $.ajax({ url: ctx + "system/user/profile/updateAvatar", data: formdata, diff --git a/src/main/resources/templates/vm/java/Controller.java.vm b/src/main/resources/templates/vm/java/Controller.java.vm index 36228763..aae46f5e 100644 --- a/src/main/resources/templates/vm/java/Controller.java.vm +++ b/src/main/resources/templates/vm/java/Controller.java.vm @@ -34,7 +34,7 @@ public class ${className}Controller extends BaseController @GetMapping() @RequiresPermissions("${moduleName}:${classname}:view") - String ${classname}() + public String ${classname}() { return prefix + "/${classname}"; } diff --git a/src/main/resources/templates/vm/java/Mapper.java.vm b/src/main/resources/templates/vm/java/Mapper.java.vm index 4634a638..341099d7 100644 --- a/src/main/resources/templates/vm/java/Mapper.java.vm +++ b/src/main/resources/templates/vm/java/Mapper.java.vm @@ -9,7 +9,7 @@ import java.util.List; * @author ${author} * @date ${datetime} */ -public interface I${className}Mapper +public interface ${className}Mapper { /** diff --git a/src/main/resources/templates/vm/java/ServiceImpl.java.vm b/src/main/resources/templates/vm/java/ServiceImpl.java.vm index a45815c3..2e4acce8 100644 --- a/src/main/resources/templates/vm/java/ServiceImpl.java.vm +++ b/src/main/resources/templates/vm/java/ServiceImpl.java.vm @@ -4,7 +4,7 @@ import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.common.utils.StringUtils; -import ${package}.mapper.I${className}Mapper; +import ${package}.mapper.${className}Mapper; import ${package}.domain.${className}; import ${package}.service.I${className}Service; @@ -18,7 +18,7 @@ import ${package}.service.I${className}Service; public class ${className}ServiceImpl implements I${className}Service { @Autowired - private I${className}Mapper ${classname}Mapper; + private ${className}Mapper ${classname}Mapper; /** * 查询${tableComment}信息 diff --git a/src/main/resources/templates/vm/xml/Mapper.xml.vm b/src/main/resources/templates/vm/xml/Mapper.xml.vm index fd1b7181..1d54359d 100644 --- a/src/main/resources/templates/vm/xml/Mapper.xml.vm +++ b/src/main/resources/templates/vm/xml/Mapper.xml.vm @@ -2,7 +2,7 @@ - + #foreach ($column in $columns)