ming_node 2.2.6 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/beforeTest/BaseMapperTest1.js +24 -0
- package/beforeTest/CollectUtilsTest.js +10 -0
- package/beforeTest/MongoDbBaseRestApiTest.js +3 -0
- package/beforeTest/installPluginTest.js +10 -0
- package/index.js +2541 -2507
- package/module/BaseMapper.js +38 -1
- package/package.json +1 -1
- package/utils/common/CollectionUtils.js +111 -0
- package/utils/common/DateUtils.js +36 -0
@@ -0,0 +1,24 @@
|
|
1
|
+
var M=require("../index");
|
2
|
+
Db= M.getMySql({
|
3
|
+
database: "lj_node"
|
4
|
+
})
|
5
|
+
const BaseMapper=require("../module/BaseMapper");
|
6
|
+
//mi_api 是表名
|
7
|
+
file_chat_msgMapper = new BaseMapper("file_chat_msg");
|
8
|
+
async function main(){
|
9
|
+
|
10
|
+
r=await file_chat_msgMapper.selectList({});
|
11
|
+
await BaseMapper.appendListName({
|
12
|
+
tableName:"vip_basic",
|
13
|
+
list:r,
|
14
|
+
list_idkey:"create_user",
|
15
|
+
list_namekey:"create_user_name",
|
16
|
+
db_idkey:"unionid",
|
17
|
+
db_namekey:"name"
|
18
|
+
})
|
19
|
+
console.log(r);
|
20
|
+
}
|
21
|
+
|
22
|
+
main().then(d=>{
|
23
|
+
process.exit()
|
24
|
+
})
|
@@ -0,0 +1,10 @@
|
|
1
|
+
var M=require("../index");
|
2
|
+
|
3
|
+
CollectionUtils= require("../utils/common/CollectionUtils")
|
4
|
+
|
5
|
+
r1= CollectionUtils.u([[{name:"zs"}],[{name:"zws"}]],"name")
|
6
|
+
r2= CollectionUtils.n([[{name:"zs"}],[{name:"zs"}]],"name")
|
7
|
+
console.log(r1)
|
8
|
+
console.log(r2)
|
9
|
+
|
10
|
+
console.log(MIO)
|