Procházet zdrojové kódy

代码生成增加时间排序

jun hu před 1 rokem
rodič
revize
5cec2ed2a0

+ 4 - 0
ruoyi-generator/src/main/resources/vm/java/serviceImpl.java.vm

@@ -168,6 +168,10 @@ public class ${ClassName}ServiceImpl extends ServiceImpl<${ClassName}Mapper, ${C
                 ${ClassName}::get$AttrName ,params.get("begin$AttrName"), params.get("end$AttrName"));
         #end
     #end
+    #if($column.javaField == 'createTime')
+        #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
+        lqw.orderByDesc(${ClassName}::get$AttrName);
+    #end
 #end
         return lqw;
     }