Commit 482af6ab authored by 赵杰's avatar 赵杰

app端的表查询

parent 78bf307a
...@@ -80,7 +80,7 @@ class UserCustomerDataAdaptor: ...@@ -80,7 +80,7 @@ class UserCustomerDataAdaptor:
tamp_diagnose_app_session = tamp_diagnose_app.session tamp_diagnose_app_session = tamp_diagnose_app.session
tamp_product_session = tamp_product.session tamp_product_session = tamp_product.session
tamp_fund_session = tamp_fund.session tamp_fund_session = tamp_fund.session
sql_user = """select f1.fund_id, f2.realname,f3.customer_name,f1.type,f1.order_type,f1.pay_date,f1.subscription_fee,f1.confirm_share_date,f1.confirm_share,f1.confirm_amount,f1.nav,f1.folio_name from tamp_diagnose_app.customer_order_view f1, tamp_user.user_info f2,tamp_user.customer_info f3 where f2.id=f1.user_id and f3.id=f1.customer_id and f1.delete_tag=0 and user_id='{}' and customer_id='{}'""".format(self.user_id, self.customer_id) sql_user = """select f1.fund_id, f2.realname,f3.customer_name,f1.type,f1.order_type,f1.pay_date,f1.subscription_fee,f1.confirm_share_date,f1.confirm_share,f1.confirm_amount,f1.nav,f1.folio_name from tamp_diagnose_app.customer_order_view f1, tamp_user.user_info f2,tamp_diagnose_app.customer_view f3 where f2.id=f1.user_id and f3.id=f1.customer_id and f1.delete_tag=0 and user_id='{}' and customer_id='{}'""".format(self.user_id, self.customer_id)
cur = tamp_diagnose_app_session.execute(sql_user) cur = tamp_diagnose_app_session.execute(sql_user)
data = cur.fetchall() data = cur.fetchall()
order_df = pd.DataFrame(list(data), columns=['fund_id', 'username', 'customer_name', 'type', 'order_type', 'pay_date', order_df = pd.DataFrame(list(data), columns=['fund_id', 'username', 'customer_name', 'type', 'order_type', 'pay_date',
......
...@@ -10,7 +10,7 @@ import pandas as pd ...@@ -10,7 +10,7 @@ import pandas as pd
import numpy as np import numpy as np
import datetime import datetime
from decimal import Decimal from decimal import Decimal
from app.service.data_service_v2_1 import UserCustomerDataAdaptor from app.service.data_service_v2 import UserCustomerDataAdaptor
from app.utils.week_evaluation import * from app.utils.week_evaluation import *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment