搭建PVB架构,实现前端的基础布局、菜单、表格、图示等功能

This commit is contained in:
lixiaoyuan
2025-08-20 19:00:22 +08:00
parent 5de7687bcc
commit 7e965b6fb4
142 changed files with 28270 additions and 411 deletions

View File

@@ -192,20 +192,21 @@ bool DaoEntity::queryFields(string keys, const string& sql_c, PageInfo& pageinfo
return true;
}
pageinfo.page_max = pageinfo.total / pageinfo.page_size + (pageinfo.total % pageinfo.page_size > 0 ? 1 : 0);
pageinfo.pageCount = pageinfo.total / pageinfo.pageSize + (pageinfo.total % pageinfo.pageSize > 0 ? 1 : 0);
oss.str("");
if (pageinfo.page_id <= 0)
if (pageinfo.pageIndex <= 0)
{
pageinfo.page_id = 1;
pageinfo.pageIndex = 1;
}
int start = (pageinfo.page_id - 1) * pageinfo.page_size;
oss << "SELECT " << keys << " FROM `" << tableName_ << "` " << sql_c << " LIMIT " << start << "," << pageinfo.page_size << ";";
int start = (pageinfo.pageIndex - 1) * pageinfo.pageSize;
oss << "SELECT " << keys << " FROM `" << tableName_ << "` " << sql_c << " LIMIT " << start << "," << pageinfo.pageSize << ";";
return this->db_->exec(oss.str().c_str(), result);
}
bool DaoEntity::updateFields(DataFields& fields, const string& sql_c)
{
string sql = fields.get_update_sql(tableName_, sql_c);
std::cout << sql;
if (sql_c.empty())
{
//Spdlogger::error("[DB] update condition is empty, not exec, sql={}", sql);