Commit de316649172e8e2481f6df31933d789a0b3a1c85
1 parent
6143930a
修改className移除前缀方法
Showing
1 changed file
with
2 additions
and
2 deletions
yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/service/codegen/impl/ToolCodegenEngine.java
| ... | ... | @@ -150,8 +150,8 @@ public class ToolCodegenEngine { |
| 150 | 150 | bindingMap.put("simpleModuleName", simpleModuleName); // 将 system 转成 sys |
| 151 | 151 | bindingMap.put("simpleModuleName_upperFirst", upperFirst(simpleModuleName)); // 将 sys 转成 Sys |
| 152 | 152 | // className 相关 |
| 153 | - String simpleClassName = subAfter(table.getClassName(), upperFirst(simpleModuleName) | |
| 154 | - , false); // 将 TestDictType 转换成 DictType. 因为在 create 等方法后,不需要带上 Test 前缀 | |
| 153 | + // 去掉指定前缀 将 TestDictType 转换成 DictType. 因为在 create 等方法后,不需要带上 Test 前缀 | |
| 154 | + String simpleClassName = removePrefix(table.getClassName(), upperFirst(simpleModuleName)); | |
| 155 | 155 | bindingMap.put("simpleClassName", simpleClassName); |
| 156 | 156 | bindingMap.put("simpleClassName_underlineCase", toUnderlineCase(simpleClassName)); // 将 DictType 转换成 dict_type |
| 157 | 157 | bindingMap.put("classNameVar", lowerFirst(simpleClassName)); // 将 DictType 转换成 dictType,用于变量 | ... | ... |