Ver Fonte

修改消息

zs há 8 meses atrás
pai
commit
075aa439b7

+ 1 - 1
src/controller/system/message.controller.ts

@@ -100,7 +100,7 @@ export class RegionController implements BaseController {
     const user = get(this.ctx, 'user');
     if (!user) return 0;
     qobj['to.user'] = get(user, 'id');
-    const result = await this.service.query(qobj, { selects: ['id'] });
+    const result = await this.service.query(qobj);
     return get(result, 'total');
   }
 

+ 4 - 4
src/frame/BaseServiceV2.ts

@@ -189,9 +189,9 @@ export abstract class BaseServiceV2 {
           break;
         case this.Opera.JsonObject:
           const jokeys = key.split('.');
-          let jorootCol = head(jokeys);
-          let jolastKey = last(jokeys);
-          let jopath = jokeys.filter(f => f !== jorootCol && f !== jolastKey);
+          const jorootCol = head(jokeys);
+          const jolastKey = last(jokeys);
+          const jopath = jokeys.filter(f => f !== jorootCol && f !== jolastKey);
           str = `"${jorootCol}" `;
           for (const jok of jopath) {
             str = `${str} -> ${jok}`;
@@ -228,7 +228,7 @@ export abstract class BaseServiceV2 {
             const numObj = getObject(path, lastKey, numberValue);
             let numVal = JSON.stringify([numObj]);
             const valueStrNum = `${valueStr}Num`;
-            str = `${str} OR "${rootCol}" @> :${valueStrNum}`;
+            str = `(${str} OR "${rootCol}" @> :${valueStrNum})`;
             params[valueStrNum] = numVal;
           }
           break;