cgserver 6.9.473 → 6.9.475
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/Config/FrameworkConfig.js +2 -1
- package/dist/lib/Database/MongoBaseService.js +2 -2
- package/dist/lib/Database/MongoManager.js +1 -1
- package/dist/lib/SocketServer/IClientWebSocket.js +1 -1
- package/dist/types/Config/FrameworkConfig.d.ts +1 -0
- package/dist/types/Database/MongoBaseService.d.ts +1 -1
- package/dist/types/Database/MongoManager.d.ts +1 -1
- package/dist/types/SocketServer/IClientWebSocket.d.ts +3 -3
- package/package.json +1 -1
|
@@ -57,7 +57,8 @@ class FrameworkConfig extends Config_1.Config {
|
|
|
57
57
|
type: "dateFile",
|
|
58
58
|
filename: "./logs/log_date/date",
|
|
59
59
|
alwaysIncludePattern: true,
|
|
60
|
-
pattern: "yyyy-MM-dd-hh.log"
|
|
60
|
+
pattern: "yyyy-MM-dd-hh.log",
|
|
61
|
+
daysToKeep: 7
|
|
61
62
|
},
|
|
62
63
|
client_log_file: {
|
|
63
64
|
category: "log_file",
|
|
@@ -31,8 +31,8 @@ class MongoBaseService {
|
|
|
31
31
|
let rs = await MongoManager_1.GMongoMgr.findOne(this._table, null, { id: id });
|
|
32
32
|
return rs.one;
|
|
33
33
|
}
|
|
34
|
-
async get(proterty, where
|
|
35
|
-
let rs = await MongoManager_1.GMongoMgr.findOne(this._table, proterty, where
|
|
34
|
+
async get(proterty, where) {
|
|
35
|
+
let rs = await MongoManager_1.GMongoMgr.findOne(this._table, proterty, where);
|
|
36
36
|
return rs.one;
|
|
37
37
|
}
|
|
38
38
|
async countDocuments(where, options) {
|
|
@@ -136,7 +136,7 @@ class MongoManager {
|
|
|
136
136
|
* 获取单条消息
|
|
137
137
|
* @param collection
|
|
138
138
|
*/
|
|
139
|
-
async findOne(collection, property = {}, where = {}
|
|
139
|
+
async findOne(collection, property = {}, where = {}) {
|
|
140
140
|
this._convertWhere(where);
|
|
141
141
|
let rs = { errcode: null, one: null };
|
|
142
142
|
if (!this._mongo) {
|
|
@@ -17,7 +17,7 @@ export declare class MongoBaseService<T> {
|
|
|
17
17
|
* @param id
|
|
18
18
|
*/
|
|
19
19
|
getById(id: any): Promise<any>;
|
|
20
|
-
get(proterty?: {}, where?: {}
|
|
20
|
+
get(proterty?: {}, where?: {}): Promise<any>;
|
|
21
21
|
countDocuments(where?: {}, options?: mongo.CountDocumentsOptions): Promise<number>;
|
|
22
22
|
gets(property?: {}, where?: {}, sort?: {}, skip?: number, limit?: number): Promise<any[]>;
|
|
23
23
|
getRandoms(num: number, proterty?: {}, where?: {}): Promise<any[]>;
|
|
@@ -56,7 +56,7 @@ declare class MongoManager {
|
|
|
56
56
|
* 获取单条消息
|
|
57
57
|
* @param collection
|
|
58
58
|
*/
|
|
59
|
-
findOne(collection: string, property?: {}, where?: {}
|
|
59
|
+
findOne(collection: string, property?: {}, where?: {}): Promise<{
|
|
60
60
|
errcode: {
|
|
61
61
|
id: number;
|
|
62
62
|
des: string;
|
|
@@ -12,14 +12,14 @@ export declare class IClientWebSocket extends IWebSocket {
|
|
|
12
12
|
* 连接的服务器地址
|
|
13
13
|
*/
|
|
14
14
|
get host(): string;
|
|
15
|
-
protected _port:
|
|
15
|
+
protected _port: number;
|
|
16
16
|
/**
|
|
17
17
|
* 连接的服务器端口
|
|
18
18
|
*/
|
|
19
|
-
get port():
|
|
19
|
+
get port(): number;
|
|
20
20
|
protected _need_close: boolean;
|
|
21
21
|
constructor(protoType?: EProtoType, protoPath?: string);
|
|
22
|
-
connect(domain:
|
|
22
|
+
connect(domain: string, port: number): void;
|
|
23
23
|
protected _connect(): void;
|
|
24
24
|
onOpen(e?: any): void;
|
|
25
25
|
onClose(reasonCode: number, description: string): boolean;
|