修改分页-页码数据类型

duizhaopin
apan 2 years ago
parent 8fc2408989
commit f5ad1e62e9

@ -107,8 +107,8 @@ def drug_return():
@drug_router.route("/use_or_return_list", methods=["GET", "POST"]) @drug_router.route("/use_or_return_list", methods=["GET", "POST"])
def drug_use_retur_list(): def drug_use_retur_list():
status = request.values.get("status") status = request.values.get("status")
page = request.values.get("page", 1) page = int(request.values.get("page", 1))
page_size = request.values.get("page_size", 10) page_size = int(request.values.get("page_size", 10))
page_param = PageParam(page, page_size) page_param = PageParam(page, page_size)
data = BllMedicament().drug_use_return(status=status, page_param=page_param) data = BllMedicament().drug_use_return(status=status, page_param=page_param)
return jsonify(Utils.true_return(data={"total_count": page_param.totalRecords, "data": Utils.msyql_table_model(data)})) return jsonify(Utils.true_return(data={"total_count": page_param.totalRecords, "data": Utils.msyql_table_model(data)}))

Loading…
Cancel
Save