mp status
This commit is contained in:
@@ -610,10 +610,11 @@ def panel_products(current_user):
|
||||
# print(products_data)
|
||||
user_id = current_user["user"]["id"]
|
||||
PRODUCT_LIST = f"""SELECT p.id,p.uid,p.product_id,p.name,p.description,p.status,p.banner,
|
||||
'Activate Now' AS status_text
|
||||
mp.status AS prov_status,
|
||||
(CASE WHEN mp.status =6 THEN 'Preparing' WHEN mp.status=7 THEN 'Active' ELSE 'Activate Now' END) AS status_text
|
||||
FROM products p
|
||||
RIGHT JOIN members_products mp ON mp.product_id = p.product_id
|
||||
WHERE mp.member_id ={user_id}
|
||||
LEFT JOIN members_products mp ON mp.product_id = p.product_id
|
||||
AND mp.member_id ={user_id}
|
||||
ORDER BY p.id ASC"""
|
||||
print( PRODUCT_LIST )
|
||||
with connection.cursor(cursor_factory=psycopg2.extras.DictCursor) as cursor:
|
||||
|
||||
Reference in New Issue
Block a user