from flask import Blueprint from flask import Flask, abort, request, jsonify import json from flask import jsonify from be.model import postgreSQLORM from be.model.postgreSQLORM import User,Store_Book,User_Store,New_Order,New_Order_Detail bp_testconn = Blueprint("testconn",__name__,url_prefix="/testconn") @bp_testconn.route("/test",methods=['GET']) def test(): user_id: str = request.args.get("user_id") print(user_id) try: ss = postgreSQLORM.session.query(User).filter(User.user_id==user_id).all() for i in ss: print('user_id',i.user_id) except: print("error") return "connect success"