diff --git a/app/service/data_service_v2_1.py b/app/service/data_service_v2_1.py index 536b4ea38f4831e46234d99372ab5aaa50b98a62..26ed58d95edf6c83b09dd3fa1fe44a1288778d10 100644 --- a/app/service/data_service_v2_1.py +++ b/app/service/data_service_v2_1.py @@ -84,10 +84,10 @@ class UserCustomerDataAdaptor: tamp_diagnose_app_session = tamp_diagnose_app.session tamp_product_session = tamp_product.session tamp_fund_session = tamp_fund.session - sql_user = """select f1.fund_id, f2.realname,f3.customer_name,f3.valueSex,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, f1.comefrom 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) + sql_user = """select f1.id, f1.fund_id, f2.realname,f3.customer_name,f3.valueSex,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, f1.comefrom 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) data = cur.fetchall() - order_df = pd.DataFrame(list(data), columns=['fund_id', 'username', 'customer_name', 'valueSex', 'type', 'order_type', 'pay_date', + order_df = pd.DataFrame(list(data), columns=['order_id', 'fund_id', 'username', 'customer_name', 'valueSex', 'type', 'order_type', 'pay_date', 'subscription_fee', 'confirm_share_date', 'confirm_share', 'confirm_amount', 'nav', 'folio_name', 'comefrom']) cur_fund_id = list(order_df["fund_id"].unique())