فهرست منبع

regex productname

animeic 1 سال پیش
والد
کامیت
25cca99835
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  1. 4 0
      boxcost/api/supplier.go

+ 4 - 0
boxcost/api/supplier.go

@@ -270,6 +270,10 @@ func SupplierBillList(c *gin.Context, apictx *ApiSession) (interface{}, error) {
 	}
 	query["supplierId"] = userId
 	query["isSend"] = true
+	if _productName, ok := query["productName"]; ok {
+		delete(query, "productName")
+		query["productName"] = bson.M{"$regex": _productName.(string)}
+	}
 
 	collectName := ""
 	switch billType {