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.
- package/dist/lib/Framework/Database/Mongo/MongoBaseService.js +1 -1
- package/dist/lib/Framework/Service/MongoAccountService.js +4 -4
- package/dist/lib/Framework/WebServer/Controller/MongoBaseUserController.js +1 -1
- package/dist/lib/Framework/WebServer/Controller/MysqlBaseUserController.js +1 -1
- package/dist/lib/Framework/global.js +23 -23
- package/dist/types/Framework/global.d.ts +23 -23
- package/package.json +1 -1
|
@@ -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,
|
|
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(
|
|
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(
|
|
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(
|
|
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({
|
|
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(
|
|
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(
|
|
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
|
|
34
|
-
static
|
|
35
|
-
static
|
|
36
|
-
static
|
|
37
|
-
static
|
|
38
|
-
static
|
|
39
|
-
static
|
|
40
|
-
static
|
|
41
|
-
static
|
|
42
|
-
static
|
|
43
|
-
static
|
|
44
|
-
static
|
|
45
|
-
static
|
|
46
|
-
static
|
|
47
|
-
static
|
|
48
|
-
static
|
|
49
|
-
static
|
|
50
|
-
static
|
|
51
|
-
static
|
|
52
|
-
static
|
|
53
|
-
static
|
|
54
|
-
static
|
|
55
|
-
static
|
|
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
|
|
7
|
-
static
|
|
8
|
-
static
|
|
9
|
-
static
|
|
10
|
-
static
|
|
11
|
-
static
|
|
12
|
-
static
|
|
13
|
-
static
|
|
14
|
-
static
|
|
15
|
-
static
|
|
16
|
-
static
|
|
17
|
-
static
|
|
18
|
-
static
|
|
19
|
-
static
|
|
20
|
-
static
|
|
21
|
-
static
|
|
22
|
-
static
|
|
23
|
-
static
|
|
24
|
-
static
|
|
25
|
-
static
|
|
26
|
-
static
|
|
27
|
-
static
|
|
28
|
-
static
|
|
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
|
*/
|