使用 fastapi 重构
This commit is contained in:
parent
aab79ea2d2
commit
9544b7773a
@ -22,8 +22,8 @@ def get_list(db: Session = Depends(database),
|
||||
query = db.query(JiaKaoBaoDian)
|
||||
if len(keyword) > 0:
|
||||
query = query.filter(
|
||||
JiaKaoBaoDian.question.like("%%%s%%" % keyword),
|
||||
JiaKaoBaoDian.illiteracy_explain.like("%%%s%%" % keyword),)
|
||||
JiaKaoBaoDian.question.like("%%%s%%" % keyword) |
|
||||
JiaKaoBaoDian.illiteracy_explain.like("%%%s%%" % keyword))
|
||||
if order_by_wrong_rate:
|
||||
query = query.order_by(JiaKaoBaoDian.wrong_rate.desc())
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user