mirror of https://gitee.com/stylefeng/roses
【7.1.5】修复limit 1引起的多数据库不兼容的问题
parent
3855159d96
commit
4565482608
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue