Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

demo-codegen:修复hutool-all-5.4.5里面PageUtil的默认firstPageNo为0导致前端获取第一页数据时设置currentPage=1获取不到第一页数据;修复在db.query时未指定大小写敏感导致Entity的父类customKey默认会将字段名改变成小写导致前端无法获取映射值 #281

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.xkcoding.codegen.service.impl;

import cn.hutool.core.io.IoUtil;
import cn.hutool.core.util.PageUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.db.Db;
import cn.hutool.db.Entity;
Expand Down Expand Up @@ -51,8 +52,9 @@ public class CodeGenServiceImpl implements CodeGenService {
public PageResult<Entity> listTables(TableRequest request) {
HikariDataSource dataSource = DbUtil.buildFromTableRequest(request);
Db db = new Db(dataSource);

db.setCaseInsensitive(false);
Page page = new Page(request.getCurrentPage(), request.getPageSize());
PageUtil.setFirstPageNo(1);
int start = page.getStartPosition();
int pageSize = page.getPageSize();

Expand Down