Override public Result listCarManage entity String nativeSql = SELECT COUNT FROM app_car_manage ; nativeSql += commonentity; Long count = dynamicQuerynativeQueryCountnativeSql
The code above is a method in a Java class that handles the listing of CarManage entities. The method takes in a CarManage object as a parameter and returns a Result object.
The method starts by constructing a native SQL query to count the number of records in the app_car_manage table. The common() method is called to add additional conditions to the query based on the values of the properties in the CarManage object.
The count is then used to create a PageBean object, which will be used to store the result of the query.
If there are records in the table, the method constructs another native SQL query to retrieve a list of CarManage objects. Again, the common() method is called to add additional conditions to the query.
The query is then sorted by the gmt_create column in descending order, and a Pageable object is created based on the pageNo and pageSize properties of the CarManage object.
Finally, the dynamicQuery object is used to execute the query and retrieve a list of CarManage objects. The list and count are used to create a new PageBean object, which is returned as the result of the method
原文地址: https://www.cveoy.top/t/topic/dsIG 著作权归作者所有。请勿转载和采集!