Commit d3b7e5d4 by Aeolus

update

parent dc6c993d
......@@ -62,8 +62,6 @@ def run_rent_list():
if keyword:
where_sql += """
and CONCAT(rent.rent_no,
business.business_name,
machine.mac_no,
wx_user.phone) LIKE '%{keyword}%'
""".format(keyword=keyword)
......@@ -129,11 +127,13 @@ def get_rent_detail():
rent_detail.hatch_no, rent_detail.production_name,rent_detail.title, rent_detail.brand_id,
rent_detail.production_type_id, rent_detail.price,rent_detail.original_price,
rent_detail.weight, rent_detail.weight_unit, rent_detail.expiration_date,
rent_detail.expiration_date_unit, rent_detail.is_expiration_date,rent_detail.business_id
rent_detail.expiration_date_unit, rent_detail.is_expiration_date,rent_detail.business_id,
rent_detail.weight_error, rent_detail.img, rent_detail.tags, rent_detail.content,
rent_detail.summary, rent_detail.status,rent_detail.brand_name,
rent_detail.production_type_name,rent_detail.total,rent_detail.rent_count,
rent_detail.refund_total,rent_detail.refund_count, wx_user.phone,place.place_name
rent_detail.refund_total,rent_detail.refund_count, wx_user.phone,place.place_name,
rent_detail.production_id,rent.business_id, rent.created_at,rent.pay_time,
rent_detail.id as rent_detail_id,
"""
from_sql = """
FROM
......@@ -159,7 +159,8 @@ def get_rent_detail():
if result:
return_data = {
"rent_id": result.id, "rent_no": result.rent_no, "machine_no": result.machine_no, "user_id": result.user_id,
"rent_detail_id": result.rent_detail_id, "rent_no": result.rent_no, "machine_no": result.machine_no,
"user_id": result.user_id,
"phone": result.phone, "place_name": result.place_name,
"place_id": result.id, "is_pay": result.is_pay, "total": result.total, "rent_count": result.rent_count,
"refund_total": result.refund_total, "refund_count": result.refund_count, "business_id": result.business_id,
......@@ -173,6 +174,8 @@ def get_rent_detail():
"weight_error": result.weight_error,
"img": result.img, "tags": result.tags, "content": result.content,
"summary": result.summary, "status": result.status,
"create_time": result.created_at.strftime("%Y-%m-%d %H:%M:%S"),
"pay_time": result.pay_time.strftime("%Y-%m-%d %H:%M:%S"),
}
return BaseResponse({"data": return_data})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment