cgserver 10.0.3 → 10.0.5

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.
@@ -42,7 +42,7 @@ class MongoBaseService {
42
42
  * @param id
43
43
  */
44
44
  async getById(id) {
45
- let rs = await this.mongoDb.findOne(this._table, null, { id: id });
45
+ let rs = await this.mongoDb.findOne(this._table, { id: id });
46
46
  return rs.one;
47
47
  }
48
48
  async get(where = null, property = null) {
@@ -86,7 +86,7 @@ class MongoAccountService extends MongoBaseService_1.MongoBaseService {
86
86
  * @param openid
87
87
  */
88
88
  async getByThird(unionid, openid) {
89
- let am = await this.get(null, { unionid: unionid, openid: openid });
89
+ let am = await this.get({ unionid: unionid, openid: openid });
90
90
  return am;
91
91
  }
92
92
  /**
@@ -94,11 +94,11 @@ class MongoAccountService extends MongoBaseService_1.MongoBaseService {
94
94
  * @param unionid
95
95
  */
96
96
  async getByUnionid(unionid) {
97
- let am = await this.get(null, { unionid: unionid });
97
+ let am = await this.get({ unionid: unionid });
98
98
  return am;
99
99
  }
100
100
  async getByPhone(phone) {
101
- let am = await this.get(null, { phone: phone + "" });
101
+ let am = await this.get({ phone: phone + "" });
102
102
  return am;
103
103
  }
104
104
  /**
@@ -229,7 +229,7 @@ class MongoAccountService extends MongoBaseService_1.MongoBaseService {
229
229
  }
230
230
  account.login_time = Date.now();
231
231
  account.login_ip = ip;
232
- this.updateOne({ login_time: account.login_time, login_ip: account.login_ip }, { id: account.id });
232
+ this.updateOne({ id: account.id }, { login_time: account.login_time, login_ip: account.login_ip });
233
233
  rs.account = account;
234
234
  return rs;
235
235
  }
@@ -138,7 +138,7 @@ class MongoBaseUserController extends BaseController_1.BaseController {
138
138
  cm.key = this._session_id;
139
139
  cm.data = user.id;
140
140
  cm.expireAt = Date.now() + time * 1000;
141
- MongoCacheService_1.gMongoCacheSer.updateOne(cm, { key: cm.key }, true);
141
+ MongoCacheService_1.gMongoCacheSer.updateOne({ key: cm.key }, cm, true);
142
142
  }
143
143
  this._self_user = user;
144
144
  }
@@ -138,7 +138,7 @@ class MysqlBaseUserController extends BaseController_1.BaseController {
138
138
  cm.key = this._session_id;
139
139
  cm.data = user.id;
140
140
  cm.expireAt = Date.now() + time * 1000;
141
- MongoCacheService_1.gMongoCacheSer.updateOne(cm, { key: cm.key }, true);
141
+ MongoCacheService_1.gMongoCacheSer.updateOne({ key: cm.key }, cm, true);
142
142
  }
143
143
  this._self_user = user;
144
144
  }
@@ -30,29 +30,29 @@ const Core_1 = require("./Core/Core");
30
30
  * cg引擎的,全局对象
31
31
  */
32
32
  class global {
33
- static gMongoServiceMgr1 = MongoServiceManager_1.gMongoServiceMgr;
34
- static gCgServer1 = cgserver_1.gCgServer;
35
- static gDbCache1 = DBCache_1.gDbCache;
36
- static gTriggerMgr1 = TriggerMgr_1.gTriggerMgr;
37
- static gMongoMgr1 = MongoManager_1.gMongoMgr;
38
- static gMSSqlMgr1 = MSSqlManager_1.gMSSqlMgr;
39
- static gMysqlMgr1 = MysqlManager_1.gMysqlMgr;
40
- static gRedisMgr1 = RedisManager_1.gRedisMgr;
41
- static gCacheTool1 = CacheTool_1.gCacheTool;
42
- static gHttpTool1 = HttpTool_1.gHttpTool;
43
- static gLog1 = Log_1.gLog;
44
- static gSyncQueueTool1 = SyncQueueTool_1.gSyncQueueTool;
45
- static gEventTool1 = EventTool_1.gEventTool;
46
- static gByteTool1 = ByteTool_1.gByteTool;
47
- static gSmsTool1 = Alisms_1.gSMSTool;
48
- static gEmailTool1 = EmailTool_1.gEmailTool;
49
- static gQiniuTool1 = QiniuTool_1.gQiniuTool;
50
- static gQQTool1 = QQTool_1.gQQTool;
51
- static gWechatTool1 = WechatTool_1.gWechatTool;
52
- static gWechatOATool1 = WechatTool_1.gWechatTool;
53
- static gAlipayTool1 = AlipayTool_1.gAlipayTool;
54
- static gAppleTool1 = AppleTool_1.gAppleTool;
55
- static gProtoFactory1 = ProtoFactory_1.gProtoFactory;
33
+ static gMongoServiceMgr = MongoServiceManager_1.gMongoServiceMgr;
34
+ static gCgServer = cgserver_1.gCgServer;
35
+ static gDbCache = DBCache_1.gDbCache;
36
+ static gTriggerMgr = TriggerMgr_1.gTriggerMgr;
37
+ static gMongoMgr = MongoManager_1.gMongoMgr;
38
+ static gMSSqlMgr = MSSqlManager_1.gMSSqlMgr;
39
+ static gMysqlMgr = MysqlManager_1.gMysqlMgr;
40
+ static gRedisMgr = RedisManager_1.gRedisMgr;
41
+ static gCacheTool = CacheTool_1.gCacheTool;
42
+ static gHttpTool = HttpTool_1.gHttpTool;
43
+ static gLog = Log_1.gLog;
44
+ static gSyncQueueTool = SyncQueueTool_1.gSyncQueueTool;
45
+ static gEventTool = EventTool_1.gEventTool;
46
+ static gByteTool = ByteTool_1.gByteTool;
47
+ static gSmsTool = Alisms_1.gSMSTool;
48
+ static gEmailTool = EmailTool_1.gEmailTool;
49
+ static gQiniuTool = QiniuTool_1.gQiniuTool;
50
+ static gQQTool = QQTool_1.gQQTool;
51
+ static gWechatTool = WechatTool_1.gWechatTool;
52
+ static gWechatOATool = WechatTool_1.gWechatTool;
53
+ static gAlipayTool = AlipayTool_1.gAlipayTool;
54
+ static gAppleTool = AppleTool_1.gAppleTool;
55
+ static gProtoFactory = ProtoFactory_1.gProtoFactory;
56
56
  /**
57
57
  * web服务中mvc的控制器管理器
58
58
  */
@@ -3,29 +3,29 @@ import { core } from "./Core/Core";
3
3
  * cg引擎的,全局对象
4
4
  */
5
5
  export declare class global {
6
- static gMongoServiceMgr1: import("./Database/Mongo/MongoServiceManager").MongoServiceManager;
7
- static gCgServer1: import("./cgserver").CgServer;
8
- static gDbCache1: import("./Database/Decorator/DBCache").DBCache;
9
- static gTriggerMgr1: import("./AI/TriggerMgr").TriggerManager;
10
- static gMongoMgr1: import("./Database/Mongo/MongoManager").MongoManager;
11
- static gMSSqlMgr1: import("./Database/MSSqlManager").MSSqlManager;
12
- static gMysqlMgr1: import("./Database/MysqlManager").MysqlManager;
13
- static gRedisMgr1: import("./Database/RedisManager").RedisManager;
14
- static gCacheTool1: import("./Logic/CacheTool").CacheTool;
15
- static gHttpTool1: import("./Logic/HttpTool").HttpTool;
16
- static gLog1: import("./Logic/Log").Log;
17
- static gSyncQueueTool1: import("./Logic/SyncQueueTool").SyncQueueTool;
18
- static gEventTool1: import("./Logic/EventTool").EventTool;
19
- static gByteTool1: import("./Core/ByteTool").ByteTool;
20
- static gSmsTool1: import("./ThirdParty/Alisms").SMSTool;
21
- static gEmailTool1: import("./ThirdParty/EmailTool").EmailTool;
22
- static gQiniuTool1: import("./ThirdParty/QiniuTool").QiniuTool;
23
- static gQQTool1: import("./ThirdParty/QQTool").QQTool;
24
- static gWechatTool1: import("./ThirdParty/WechatTool").WechatTool;
25
- static gWechatOATool1: import("./ThirdParty/WechatTool").WechatTool;
26
- static gAlipayTool1: import("./ThirdParty/AlipayTool").AlipayTool;
27
- static gAppleTool1: import("./ThirdParty/AppleTool").AppleTool;
28
- static gProtoFactory1: import("./SocketServer/ProtoFilter/ProtoFactory").ProtoFactory;
6
+ static gMongoServiceMgr: import("./Database/Mongo/MongoServiceManager").MongoServiceManager;
7
+ static gCgServer: import("./cgserver").CgServer;
8
+ static gDbCache: import("./Database/Decorator/DBCache").DBCache;
9
+ static gTriggerMgr: import("./AI/TriggerMgr").TriggerManager;
10
+ static gMongoMgr: import("./Database/Mongo/MongoManager").MongoManager;
11
+ static gMSSqlMgr: import("./Database/MSSqlManager").MSSqlManager;
12
+ static gMysqlMgr: import("./Database/MysqlManager").MysqlManager;
13
+ static gRedisMgr: import("./Database/RedisManager").RedisManager;
14
+ static gCacheTool: import("./Logic/CacheTool").CacheTool;
15
+ static gHttpTool: import("./Logic/HttpTool").HttpTool;
16
+ static gLog: import("./Logic/Log").Log;
17
+ static gSyncQueueTool: import("./Logic/SyncQueueTool").SyncQueueTool;
18
+ static gEventTool: import("./Logic/EventTool").EventTool;
19
+ static gByteTool: import("./Core/ByteTool").ByteTool;
20
+ static gSmsTool: import("./ThirdParty/Alisms").SMSTool;
21
+ static gEmailTool: import("./ThirdParty/EmailTool").EmailTool;
22
+ static gQiniuTool: import("./ThirdParty/QiniuTool").QiniuTool;
23
+ static gQQTool: import("./ThirdParty/QQTool").QQTool;
24
+ static gWechatTool: import("./ThirdParty/WechatTool").WechatTool;
25
+ static gWechatOATool: import("./ThirdParty/WechatTool").WechatTool;
26
+ static gAlipayTool: import("./ThirdParty/AlipayTool").AlipayTool;
27
+ static gAppleTool: import("./ThirdParty/AppleTool").AppleTool;
28
+ static gProtoFactory: import("./SocketServer/ProtoFilter/ProtoFactory").ProtoFactory;
29
29
  /**
30
30
  * web服务中mvc的控制器管理器
31
31
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cgserver",
3
- "version": "10.0.3",
3
+ "version": "10.0.5",
4
4
  "author": "trojan",
5
5
  "type": "commonjs",
6
6
  "description": "free for all.Websocket or Http",