Browse Source

修改查询条件

zs 7 months ago
parent
commit
10b6c6f8b4

+ 1 - 1
src/controller/platform/demand.controller.ts

@@ -72,7 +72,7 @@ export class DemandController implements BaseController {
   async list(@Query() query: object) {
     const qobj = omit(query, ['skip', 'limit']);
     const others = pick(query, ['skip', 'limit']);
-    const { data, total } = await this.service.query(qobj, others);
+    const { data, total } = await this.service.query(qobj, others, { field: this.service.Opera.In });
     for (let i of data) {
       i = await this.serviceUtil.fillOnwer(i);
     }

+ 1 - 1
src/controller/platform/supply.controller.ts

@@ -72,7 +72,7 @@ export class SupplyController implements BaseController {
   async list(@Query() query: object) {
     const qobj = omit(query, ['skip', 'limit']);
     const others = pick(query, ['skip', 'limit']);
-    const { data, total } = await this.service.query(qobj, others);
+    const { data, total } = await this.service.query(qobj, others, { field: this.service.Opera.In });
     for (let i of data) {
       i = await this.serviceUtil.fillOnwer(i);
     }

+ 0 - 1
src/service/platform/demand.service.ts

@@ -12,7 +12,6 @@ export class DemandService extends BaseServiceV2 {
     const obj = {
       name: this.Opera.Like,
       industry: this.Opera.In,
-      field: this.Opera.In,
       area: this.Opera.Json,
       tags: this.Opera.Json,
     };

+ 0 - 1
src/service/platform/supply.service.ts

@@ -12,7 +12,6 @@ export class SupplyService extends BaseServiceV2 {
     const obj = {
       name: this.Opera.Like,
       industry: this.Opera.In,
-      field: this.Opera.In,
       area: this.Opera.Json,
       tags: this.Opera.Json,
     };

+ 3 - 3
src/service/util.service.ts

@@ -1216,10 +1216,10 @@ export class UtilService {
             if (type) val = await this.dealTypeValue(mapping, val);
             obj[field] = val;
           } else {
-            if(val) {
-              const arr = val.split(';')
+            if (val) {
+              const arr = val.split(';');
               obj[field] = arr;
-            } 
+            }
           }
         }
       }