def get_advance(): """ 获取每个小组晋级的队伍 """ teams = Points.select().where(Points.team_order << [1, 2]) data = [Points.get_one(id=t.id).get_dict() for t in teams] return json_data(data)
def get_true_goals(): """ 获取每个小组净胜球最大的队伍 """ teams = Points.select(Points.group, Points.team, fn.Max(Points.true_goal)).where( Points.team == Points.team).group_by(Points.group) data = [g.get_dict() for g in teams] return json_data(data)