【7.1.5】修复limit 1引起的多数据库不兼容的问题

pull/22/head
fengshuonan 2021-10-12 20:50:54 +08:00
parent 3855159d96
commit 4565482608
1 changed files with 1 additions and 2 deletions

View File

@ -101,8 +101,7 @@ public class ApiResourceServiceImpl extends ServiceImpl<ApiResourceMapper, ApiRe
LambdaQueryWrapper<ApiResource> apiResourceLambdaQueryWrapper = new LambdaQueryWrapper<>();
apiResourceLambdaQueryWrapper.eq(ApiResource::getGroupId, apiResourceRequest.getGroupId());
apiResourceLambdaQueryWrapper.orderByDesc(ApiResource::getResourceSort);
apiResourceLambdaQueryWrapper.last("LIMIT 1");
ApiResource resource = this.getOne(apiResourceLambdaQueryWrapper);
ApiResource resource = this.getOne(apiResourceLambdaQueryWrapper, false);
if (ObjectUtil.isNotEmpty(resource)) {
index = resource.getResourceSort();
}