cainiao-hue 3 kuukautta sitten
vanhempi
commit
c11a156833
2 muutettua tiedostoa jossa 5 lisäystä ja 19 poistoa
  1. 1 17
      README.md
  2. 4 2
      soul-server/migration/import-data.js

+ 1 - 17
README.md

@@ -1,20 +1,4 @@
 #心灵陪聊项目仓库
 
 - soul-app 前端代码
-- soul-prod 产品文档
-greaterThan(key,value){
-        if(!this.whereOptions[key]) this.whereOptions[key] = {}
-        this.whereOptions[key]["$gt"] = value
-    }
-    greaterThanAndEqualTo(key,value){
-        if(!this.whereOptions[key]) this.whereOptions[key] = {}
-        this.whereOptions[key]["$gte"] = value
-    }
-    lessThan(key,value){
-        if(!this.whereOptions[key]) this.whereOptions[key] = {}
-        this.whereOptions[key]["$lt"] = value
-    }
-    lessThanAndEqualTo(key,value){
-        if(!this.whereOptions[key]) this.whereOptions[key] = {}
-        this.whereOptions[key]["$lte"] = value
-    }
+- soul-prod 产品文档

+ 4 - 2
soul-server/migration/import-data.js

@@ -1,15 +1,17 @@
 const { CloudQuery, CloudObject } = require("../lib/ncloud");
 //testCRUD()
 testQuery()
-//查询
+//ChatPartner表的查询
 async function testQuery(){
     let query = new CloudQuery("ChatPartner")
+    //query.greaterThanAndEqualTo("age",40)查询条件
+    //query.lessThan("age",41)查询条件
     let list = await query.find();
     console.log(list)
 }
 
 async function testCRUD(){
-    // 基本的增删查改测试
+    // ChatPartner表基本的增删查改测试
     let query = new CloudQuery("ChatPartner")
     let chatpartnerList = await query.find();
     console.log("chatpartnerList count",chatpartnerList?.length)