bigmeng 7 лет назад
Родитель
Сommit
fc59df6eeb

+ 1 - 1
mybatis-plus-generator/src/main/resources/templates/entity.java.vm

@@ -139,7 +139,7 @@ public class ${entity} implements Serializable {
     public String toString() {
         return "${entity}{" +
 #foreach($field in ${table.fields})
-#if($!{velocityCount}==1)
+#if($!{foreach.index}==0)
         "${field.propertyName}=" + ${field.propertyName} +
 #else
         ", ${field.propertyName}=" + ${field.propertyName} +

+ 1 - 1
mybatis-plus-generator/src/main/resources/templates/entity.kt.vm

@@ -89,7 +89,7 @@ class ${entity} : Serializable {
     override fun toString(): String {
         return "${entity}{" +
 #foreach($field in ${table.fields})
-#if($!{velocityCount}==1)
+#if($!{foreach.index}==0)
         "${field.propertyName}=" + ${field.propertyName} +
 #else
         ", ${field.propertyName}=" + ${field.propertyName} +