<div class=”cnblogs_code”>
Tokens.query.filter(Tokens.user_id ==== db.cast(current_time,db.DATE)).all()
查询当日数据
查询当日之前的数据,则用<
https://segmentfault.com/q/1010000014045246/a-1020000014048078
Tokens.query.filter(Tokens.user_id==user_id,db.cast(Tokens.create_time,db.DATE)==db.cast(current_time,db.DATE)).all()
<div class=”cnblogs_code”>
Tokens.query.filter(Tokens.user_id ==== db.cast(current_time,db.DATE)).all()
查询当日数据
查询当日之前的数据,则用<
https://segmentfault.com/q/1010000014045246/a-1020000014048078