lrf402788946 4 年之前
父节点
当前提交
9dfb877261
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      app/service/users/product.js

+ 5 - 0
app/service/users/product.js

@@ -13,6 +13,11 @@ class ProductService extends CrudService {
     this.organization = this.ctx.model.Organization;
   }
   async query({ skip = 0, limit = 0, ...query } = {}) {
+    if (query.name) {
+      query['%name%'] = query.name;
+      delete query.name;
+    }
+    query = this.ctx.service.util.util.dealQuery(query);
     const { code, company, ...oq } = query;
     let res = [];
     let total = 0;