!39 生成代码类名称不以模块名开头simpleClassName为空

Merge pull request !39 from 夜丶点缀了一个人的落寞/protection-lxm
This commit is contained in:
芋道源码 2021-08-28 08:12:05 +00:00 committed by Gitee
commit 1a17e5ecb8
1 changed files with 2 additions and 2 deletions

View File

@ -150,8 +150,8 @@ public class ToolCodegenEngine {
bindingMap.put("simpleModuleName", simpleModuleName); // system 转成 sys bindingMap.put("simpleModuleName", simpleModuleName); // system 转成 sys
bindingMap.put("simpleModuleName_upperFirst", upperFirst(simpleModuleName)); // sys 转成 Sys bindingMap.put("simpleModuleName_upperFirst", upperFirst(simpleModuleName)); // sys 转成 Sys
// className 相关 // className 相关
String simpleClassName = subAfter(table.getClassName(), upperFirst(simpleModuleName) // 去掉指定前缀 TestDictType 转换成 DictType. 因为在 create 等方法后不需要带上 Test 前缀
, false); // TestDictType 转换成 DictType. 因为在 create 等方法后不需要带上 Test 前缀 String simpleClassName = removePrefix(table.getClassName(), upperFirst(simpleModuleName));
bindingMap.put("simpleClassName", simpleClassName); bindingMap.put("simpleClassName", simpleClassName);
bindingMap.put("simpleClassName_underlineCase", toUnderlineCase(simpleClassName)); // DictType 转换成 dict_type bindingMap.put("simpleClassName_underlineCase", toUnderlineCase(simpleClassName)); // DictType 转换成 dict_type
bindingMap.put("classNameVar", lowerFirst(simpleClassName)); // DictType 转换成 dictType用于变量 bindingMap.put("classNameVar", lowerFirst(simpleClassName)); // DictType 转换成 dictType用于变量