Skip to content

Commit

Permalink
Merge pull request #191 from Targoman/create_apitoken
Browse files Browse the repository at this point in the history
fix extrafilter error
  • Loading branch information
kambizzandi authored Aug 10, 2022
2 parents 245a544 + 811a30a commit 0e9dd0e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Interfaces/API/intfSQLBasedModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ QVariantMap intfSQLBasedModule::SelectOne(
_fnTouchQuery(Query);

if (_extraFilters.isEmpty() == false)
Query.andWhere(_extraFilters);
Query.andWhere(clsCondition().andCond(_extraFilters));

QVariantMap Result = Query.one();

Expand Down Expand Up @@ -134,21 +134,21 @@ QVariantMap intfSQLBasedModule::SelectOne(

ORMSelectQuery Query = this->makeSelectQuery(APICALLBOOM_PARAM, "", _translate)
.setPksByPath(_pksByPath)
.pageIndex(_pageIndex)
.pageSize(_pageSize)
.addCSVCols(_cols)
.orderBy(_orderBy)
.groupBy(_groupBy)
.addFilters(_filters)
// .andWhere(_extraFilters)
.pageIndex(_pageIndex)
.pageSize(_pageSize)
.setCacheTime(_cacheTime)
;

if (_fnTouchQuery != nullptr)
_fnTouchQuery(Query);

if (_extraFilters.isEmpty() == false)
Query.andWhere(_extraFilters);
Query.andWhere(clsCondition().andCond(_extraFilters));

/*QVariantList*/ TAPI::stuTable Result = Query.all();

Expand Down Expand Up @@ -177,21 +177,21 @@ TAPI::stuTable intfSQLBasedModule::SelectAllWithCount(

ORMSelectQuery Query = this->makeSelectQuery(APICALLBOOM_PARAM, "", _translate)
.setPksByPath(_pksByPath)
.pageIndex(_pageIndex)
.pageSize(_pageSize)
.addCSVCols(_cols)
.orderBy(_orderBy)
.groupBy(_groupBy)
.addFilters(_filters)
// .andWhere(_extraFilters)
.pageIndex(_pageIndex)
.pageSize(_pageSize)
.setCacheTime(_cacheTime)
;

if (_fnTouchQuery != nullptr)
_fnTouchQuery(Query);

if (_extraFilters.isEmpty() == false)
Query.andWhere(_extraFilters);
Query.andWhere(clsCondition().andCond(_extraFilters));

TAPI::stuTable Result = Query.allWithCount();

Expand Down

0 comments on commit 0e9dd0e

Please sign in to comment.