Commit e171e8c3 by dong

fix202302017

parent 869e1980
......@@ -390,9 +390,19 @@ def attract_enterprise():
return jsonify(code=RET.PARAMERR, msg="参数不完整")
try:
enterprise = Enterprise.query.filter(or_(
Enterprise.c_type == inid,
Enterprise.c_type1 == inid,
Enterprise.c_type2 == inid
))
if product:
enterprise = enterprise.filter(or_(
Enterprise.product_all.like("%{}%".format(product)),
Enterprise.product_all1.like("%{}%".format(product)),
Enterprise.product_all2.like("%{}%".format(product))
))
enterprise_obj = Enterprise.query.filter(
enterprise_obj = enterprise.filter(
# Enterprise.product_all.like("%{}%".format(product)) if product else text(''),
Enterprise.entype.like('%{}%'.format(entype)) if entype else text(''),
Enterprise.company_name.like('%{}%'.format(company_name)) if company_name else text(''),
......
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