清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>
1 2 3 4 5 6 7 8 | def get_appsys_by_no( self , no): o_type = self .order_type(no) table_name = "t_order_" + o_type.lower() #: result = db.session.execute("SELECT * FROM %s where no = '%s'" %(table_name, no)) result = db.session.execute( "SELECT * FROM %s where no = :no" % table_name, { 'no' : no}) Record = namedtuple( 'Record' , result.keys()) records = [Record( * r) for r in result.fetchall()] return records[ 0 ] if records else None |