|
@@ -69,6 +69,9 @@ func SupplierPrice(r *GinRouter) {
|
|
|
if query["supplierId"] != nil {
|
|
|
query["supplierId"], _ = primitive.ObjectIDFromHex(query["supplierId"].(string))
|
|
|
}
|
|
|
+ if query["productId"] != nil {
|
|
|
+ query["productId"], _ = primitive.ObjectIDFromHex(query["productId"].(string))
|
|
|
+ }
|
|
|
return query
|
|
|
},
|
|
|
|
|
@@ -129,6 +132,9 @@ func SupplierPrice(r *GinRouter) {
|
|
|
if query["supplierId"] != nil {
|
|
|
query["supplierId"], _ = primitive.ObjectIDFromHex(query["supplierId"].(string))
|
|
|
}
|
|
|
+ if query["productId"] != nil {
|
|
|
+ query["productId"], _ = primitive.ObjectIDFromHex(query["productId"].(string))
|
|
|
+ }
|
|
|
return query
|
|
|
},
|
|
|
SearchPostProcess: func(page *repo.PageResult, c *gin.Context, apictx *ApiSession, query map[string]interface{}) (interface{}, error) {
|
|
@@ -187,6 +193,9 @@ func SupplierPrice(r *GinRouter) {
|
|
|
if query["supplierId"] != nil {
|
|
|
query["supplierId"], _ = primitive.ObjectIDFromHex(query["supplierId"].(string))
|
|
|
}
|
|
|
+ if query["productId"] != nil {
|
|
|
+ query["productId"], _ = primitive.ObjectIDFromHex(query["productId"].(string))
|
|
|
+ }
|
|
|
return query
|
|
|
},
|
|
|
SearchPostProcess: func(page *repo.PageResult, c *gin.Context, apictx *ApiSession, query map[string]interface{}) (interface{}, error) {
|