|
|
@@ -252,10 +252,10 @@ class MySqlDao:
|
|
|
query = f"SELECT DISTINCT product_code FROM {self._order_tablename} WHERE city_uuid = :city_uuid"
|
|
|
params = {"city_uuid": city_uuid}
|
|
|
|
|
|
- data = pd.DataFrame(self.db_helper.fetch_all(text(query), params))
|
|
|
-
|
|
|
+ data = self.db_helper.load_data_with_page(query, params)
|
|
|
+
|
|
|
return data
|
|
|
-
|
|
|
+
|
|
|
# def get_product_from_order(self, city_uuid):
|
|
|
# query = f"SELECT cust_code, product_code FROM {self._order_tablename} WHERE city_uuid = :city_uuid"
|
|
|
# params = {"city_uuid": city_uuid}
|
|
|
@@ -273,10 +273,10 @@ class MySqlDao:
|
|
|
query = f"SELECT DISTINCT BB_RETAIL_CUSTOMER_CODE FROM {self._cust_tablename} WHERE BA_CITY_ORG_CODE = :city_uuid"
|
|
|
params = {"city_uuid": city_uuid}
|
|
|
|
|
|
- data = pd.DataFrame(self.db_helper.fetch_all(text(query), params))
|
|
|
-
|
|
|
+ data = self.db_helper.load_data_with_page(query, params)
|
|
|
+
|
|
|
return data
|
|
|
-
|
|
|
+
|
|
|
def data_preprocess(self, data: pd.DataFrame):
|
|
|
"""数据预处理"""
|
|
|
data.drop(["cust_uuid", "longitude", "latitude", "range_radius"], axis=1, inplace=True)
|