|
|
@@ -91,16 +91,15 @@ class MySqlDao:
|
|
|
|
|
|
def get_product_by_id(self, city_uuid, product_id):
|
|
|
"""根据city_uuid 和 product_id 从表中获取拼柜信息"""
|
|
|
- query = f"""
|
|
|
+ query = text(f"""
|
|
|
SELECT *
|
|
|
FROM {self._product_tablename}
|
|
|
WHERE city_uuid = :city_uuid
|
|
|
AND product_code = :product_id
|
|
|
- """
|
|
|
+ """)
|
|
|
params = {"city_uuid": city_uuid, "product_id": product_id}
|
|
|
- data = self.db_helper.load_data_with_page(query, params)
|
|
|
-
|
|
|
- return data
|
|
|
+ result = self.db_helper.fetch_one(query, params)
|
|
|
+ return pd.DataFrame([dict(result._mapping)] if result else [])
|
|
|
|
|
|
def get_cust_by_ids(self, city_uuid, cust_id_list):
|
|
|
"""根据零售户列表查询其信息"""
|