products_data
This commit is contained in:
@@ -59,11 +59,25 @@ class ProductsService(BaseService):
|
|||||||
# data = db.session.execute(PRODUCT_LIST)
|
# data = db.session.execute(PRODUCT_LIST)
|
||||||
products_data = Products.get_user_product_list(member_id)
|
products_data = Products.get_user_product_list(member_id)
|
||||||
|
|
||||||
logger.error(f"Product Data ****** *****: {products_data}")
|
logger.info(f"Product Data ****** *****: {products_data}")
|
||||||
|
|
||||||
|
products_data = [{
|
||||||
|
'id': t.id,
|
||||||
|
'uid': t.uid,
|
||||||
|
'product_id': t.product_id,
|
||||||
|
'description': t.description,
|
||||||
|
'name': t.name,
|
||||||
|
'status': t.status,
|
||||||
|
'created_at': t.created_at.isoformat() if t.created_at else None,
|
||||||
|
'updated_at': t.updated_at.isoformat() if t.updated_at else None,
|
||||||
|
'banner': t.banner,
|
||||||
|
} for t in products]
|
||||||
|
|
||||||
|
|
||||||
# Simulate processing
|
# Simulate processing
|
||||||
response_data = {
|
response_data = {
|
||||||
"products_data": data,
|
"products_data": products.to_dict(),
|
||||||
|
"products_data22": products_data,
|
||||||
"member_id": 0,
|
"member_id": 0,
|
||||||
"uid": 0,
|
"uid": 0,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,8 +73,8 @@ class Products(db.Model):
|
|||||||
'id': self.id,
|
'id': self.id,
|
||||||
'uid': self.uid,
|
'uid': self.uid,
|
||||||
'product_id': self.product_id,
|
'product_id': self.product_id,
|
||||||
'productId': self.product_id,
|
|
||||||
'name': self.name,
|
'name': self.name,
|
||||||
|
'description' : self.description,
|
||||||
'status': self.status,
|
'status': self.status,
|
||||||
'added': self.added,
|
'added': self.added,
|
||||||
'updated': self.updated,
|
'updated': self.updated,
|
||||||
|
|||||||
Reference in New Issue
Block a user