ming_node 2.2.6 → 2.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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)
@@ -17,3 +17,6 @@ var app=M.server();
17
17
  app.listen(8888);
18
18
 
19
19
  app.use(mongoDbBaseRestApi);
20
+
21
+
22
+ console.log(M._globle_plugin)
@@ -0,0 +1,10 @@
1
+ var M=require("ming_node");
2
+
3
+ var app=M.server();
4
+ app.listen(8888);
5
+
6
+ app.installPlugin("http://localhost:4444/OssWebApi.js",{
7
+ name:"我是插件构造方法参数"
8
+ },{
9
+ name:"我是插件构造方法附加参数"
10
+ });