From 631b1cbd6b81359badc5e76ac88b1fc94b0fe185 Mon Sep 17 00:00:00 2001 From: fuzhengwei <184172133@qq.com> Date: Thu, 23 Dec 2021 07:44:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E5=82=85=E5=93=A5,fix=EF=BC=9A?= =?UTF-8?q?=E7=BC=96=E8=AF=91=E6=A3=80=E6=9F=A5=E6=8F=90=E9=86=92=20psiFie?= =?UTF-8?q?ld.getName();=20=E6=9B=BF=E6=8D=A2=20psiField.getNameIdentifier?= =?UTF-8?q?().getText();?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 2 +- .../idea/plugin/domain/service/AbstractGenerateVo2Dto.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index b51d356..a175ddc 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ plugins { group 'cn.bugstack.idea.plugin' -version '2.2.0' +version '2.2.2' apply plugin: 'java' apply plugin: 'idea' diff --git a/src/main/java/cn/bugstack/guide/idea/plugin/domain/service/AbstractGenerateVo2Dto.java b/src/main/java/cn/bugstack/guide/idea/plugin/domain/service/AbstractGenerateVo2Dto.java index c916c42..0496237 100644 --- a/src/main/java/cn/bugstack/guide/idea/plugin/domain/service/AbstractGenerateVo2Dto.java +++ b/src/main/java/cn/bugstack/guide/idea/plugin/domain/service/AbstractGenerateVo2Dto.java @@ -60,7 +60,7 @@ protected List getMethods(PsiClass psiClass, String regex, String typeSt if (isUsedLombok(psiClass)) { PsiField[] fields = psiClass.getFields(); for (PsiField psiField : fields) { - String name = psiField.getName(); + String name = psiField.getNameIdentifier().getText(); methodList.add(typeStr + name.substring(0, 1).toUpperCase() + name.substring(1)); }