Skip to content

Commit

Permalink
查询历史记录脚本改为ID排序,DATE无索引
Browse files Browse the repository at this point in the history
  • Loading branch information
HateBaozi committed Apr 6, 2023
1 parent 16ef868 commit 1276ee0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/helper/db_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,11 +289,11 @@ def get_transfer_history(self, search, page, rownum):
| (TRANSFERHISTORY.TITLE.like(search))).count()
data = self._db.query(TRANSFERHISTORY).filter((TRANSFERHISTORY.SOURCE_FILENAME.like(search))
| (TRANSFERHISTORY.TITLE.like(search))).order_by(
TRANSFERHISTORY.DATE.desc()).limit(int(rownum)).offset(begin_pos).all()
TRANSFERHISTORY.ID.desc()).limit(int(rownum)).offset(begin_pos).all()
return count, data
else:
return self._db.query(TRANSFERHISTORY).count(), self._db.query(TRANSFERHISTORY).order_by(
TRANSFERHISTORY.DATE.desc()).limit(int(rownum)).offset(begin_pos).all()
TRANSFERHISTORY.ID.desc()).limit(int(rownum)).offset(begin_pos).all()

def get_transfer_info_by_id(self, logid):
"""
Expand Down

0 comments on commit 1276ee0

Please sign in to comment.