cgserver 13.2.13 → 13.2.15

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.
@@ -148,7 +148,7 @@ class MongoBaseService {
148
148
  }
149
149
  exports.MongoBaseService = MongoBaseService;
150
150
  const autoIdSchema = new mongoose_1.Schema({
151
- _id: { type: String, index: { unique: true } },
151
+ _id: { type: String },
152
152
  autoid: { type: Number, required: true, default: 0 }
153
153
  }, { id: false });
154
154
  autoIdSchema.virtual('id').get(function () {
@@ -45,7 +45,7 @@ const ini_1 = require("./ini");
45
45
  class MongoUserService extends MongoBaseService_1.MongoBaseService {
46
46
  constructor(extuserdef) {
47
47
  const userSchema = new mongoose_1.default.Schema({ ...{
48
- _id: { type: Number, index: { unique: true } },
48
+ _id: { type: Number },
49
49
  account_id: { type: String, index: { unique: true } },
50
50
  state: { type: Number, default: ini_1.EUserState.Normal },
51
51
  is_robot: { type: Boolean, default: false },
@@ -77,11 +77,11 @@ class AlipayTool {
77
77
  }
78
78
  }
79
79
  async exec(method, params, execType = EAlipayExecType.exec) {
80
+ let result = null;
80
81
  try {
81
82
  if (!this._alipaySdk) {
82
- return null;
83
+ return result;
83
84
  }
84
- let result = null;
85
85
  switch (execType) {
86
86
  case EAlipayExecType.exec:
87
87
  result = await this._alipaySdk.exec(method, params);
@@ -96,8 +96,8 @@ class AlipayTool {
96
96
  return result;
97
97
  }
98
98
  catch (error) {
99
- Log_1.gLog.error({ tip: '执行支付宝请求失败:', method, params, error: error });
100
- return null;
99
+ Log_1.gLog.error({ tip: '执行支付宝请求失败:', method, params, error, result });
100
+ return result;
101
101
  }
102
102
  }
103
103
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cgserver",
3
- "version": "13.2.13",
3
+ "version": "13.2.15",
4
4
  "author": "trojan",
5
5
  "type": "commonjs",
6
6
  "description": "free for all.Websocket or Http",
@@ -46,7 +46,6 @@
46
46
  "@types/underscore": "^1.11.15",
47
47
  "@types/urlencode": "^1.1.4",
48
48
  "@types/websocket": "^1.0.10",
49
- "alipay_sdk2": "^1.1.6",
50
49
  "alipay-sdk": "^4.13.0",
51
50
  "azgaar-fmg-parser": "^1.2.2",
52
51
  "colors": "^1.4.0",