@pisell/pisellos 2.1.42 → 2.1.44

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.
@@ -634,7 +634,7 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
634
634
  case 0:
635
635
  _context6.prev = 0;
636
636
  _context6.next = 3;
637
- return this.dbManager.get('order', orderUuid);
637
+ return this.dbManager.get('order', orderUuid, true);
638
638
  case 3:
639
639
  return _context6.abrupt("return", _context6.sent);
640
640
  case 6:
@@ -723,7 +723,7 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
723
723
  }; // 🚀 性能监控:记录数据库添加操作耗时
724
724
  dbAddStartTime = Date.now();
725
725
  _context7.next = 6;
726
- return this.dbManager.add('order', newOrder);
726
+ return this.dbManager.add('order', newOrder, true);
727
727
  case 6:
728
728
  dbAddDuration = Date.now() - dbAddStartTime;
729
729
  this.logInfo('Database add operation completed', {
@@ -1141,8 +1141,11 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
1141
1141
  order: order
1142
1142
  });
1143
1143
  _context13.next = 24;
1144
- return this.dbManager.update('order', order);
1144
+ return this.dbManager.update('order', order, true);
1145
1145
  case 24:
1146
+ this.logInfo('更新订单支付项完成', {
1147
+ orderUuid: orderUuid
1148
+ });
1146
1149
  this.core.effects.emit("".concat(this.name, ":onPaymentAdded"), {
1147
1150
  orderUuid: orderUuid,
1148
1151
  payment: newPaymentItem
@@ -1160,10 +1163,10 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
1160
1163
  actualPaidAmount: (_newPaymentItem$metad2 = newPaymentItem.metadata) === null || _newPaymentItem$metad2 === void 0 ? void 0 : _newPaymentItem$metad2.actual_paid_amount,
1161
1164
  changeGivenAmount: (_newPaymentItem$metad3 = newPaymentItem.metadata) === null || _newPaymentItem$metad3 === void 0 ? void 0 : _newPaymentItem$metad3.change_given_amount
1162
1165
  });
1163
- _context13.next = 33;
1166
+ _context13.next = 34;
1164
1167
  break;
1165
- case 28:
1166
- _context13.prev = 28;
1168
+ case 29:
1169
+ _context13.prev = 29;
1167
1170
  _context13.t0 = _context13["catch"](1);
1168
1171
  console.error('[PaymentModule] 添加支付项失败', _context13.t0);
1169
1172
  this.logError('addPaymentItemAsync failed', _context13.t0, {
@@ -1171,11 +1174,11 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
1171
1174
  paymentItem: paymentItem
1172
1175
  });
1173
1176
  throw _context13.t0;
1174
- case 33:
1177
+ case 34:
1175
1178
  case "end":
1176
1179
  return _context13.stop();
1177
1180
  }
1178
- }, _callee13, this, [[1, 28]]);
1181
+ }, _callee13, this, [[1, 29]]);
1179
1182
  }));
1180
1183
  function addPaymentItemAsync(_x14, _x15) {
1181
1184
  return _addPaymentItemAsync.apply(this, arguments);
@@ -49,5 +49,5 @@ export declare class Product extends BaseModule implements Module {
49
49
  getCategories(): ProductCategory[];
50
50
  setOtherParams(key: string, value: any): void;
51
51
  getOtherParams(): any;
52
- getProductType(): "normal" | "duration" | "session";
52
+ getProductType(): "duration" | "session" | "normal";
53
53
  }
@@ -189,7 +189,8 @@ var onlineStoreConfig = {
189
189
  return {
190
190
  phone: String(params.phone),
191
191
  code: params.code,
192
- country_calling_code: String(params.country_calling_code)
192
+ country_calling_code: String(params.country_calling_code),
193
+ action: params.action
193
194
  };
194
195
  }
195
196
  },
@@ -511,7 +512,8 @@ var defaultConfig = {
511
512
  return {
512
513
  phone: String(params.phone),
513
514
  code: params.code,
514
- country_calling_code: String(params.country_calling_code)
515
+ country_calling_code: String(params.country_calling_code),
516
+ action: params.action
515
517
  };
516
518
  }
517
519
  },
@@ -328,6 +328,7 @@ export interface CheckMobileCodeParams {
328
328
  shop_id: number;
329
329
  code: string;
330
330
  country_calling_code: string;
331
+ action: string;
331
332
  }
332
333
  /**
333
334
  * 验证码有效性检查响应接口
@@ -308,7 +308,7 @@ var PaymentModule = class extends import_BaseModule.BaseModule {
308
308
  */
309
309
  async getPaymentOrderByUuidAsync(orderUuid) {
310
310
  try {
311
- return await this.dbManager.get("order", orderUuid);
311
+ return await this.dbManager.get("order", orderUuid, true);
312
312
  } catch (error) {
313
313
  console.error("[PaymentModule] 获取支付订单失败", error);
314
314
  return null;
@@ -338,7 +338,7 @@ var PaymentModule = class extends import_BaseModule.BaseModule {
338
338
  deposit_amount: params.deposit_amount || "0.00"
339
339
  };
340
340
  const dbAddStartTime = Date.now();
341
- await this.dbManager.add("order", newOrder);
341
+ await this.dbManager.add("order", newOrder, true);
342
342
  const dbAddDuration = Date.now() - dbAddStartTime;
343
343
  this.logInfo("Database add operation completed", {
344
344
  operation: "dbManager.add",
@@ -578,7 +578,10 @@ var PaymentModule = class extends import_BaseModule.BaseModule {
578
578
  orderUuid,
579
579
  order
580
580
  });
581
- await this.dbManager.update("order", order);
581
+ await this.dbManager.update("order", order, true);
582
+ this.logInfo("更新订单支付项完成", {
583
+ orderUuid
584
+ });
582
585
  this.core.effects.emit(`${this.name}:onPaymentAdded`, {
583
586
  orderUuid,
584
587
  payment: newPaymentItem
@@ -49,5 +49,5 @@ export declare class Product extends BaseModule implements Module {
49
49
  getCategories(): ProductCategory[];
50
50
  setOtherParams(key: string, value: any): void;
51
51
  getOtherParams(): any;
52
- getProductType(): "normal" | "duration" | "session";
52
+ getProductType(): "duration" | "session" | "normal";
53
53
  }
@@ -157,7 +157,8 @@ var onlineStoreConfig = {
157
157
  transformParams: (params) => ({
158
158
  phone: String(params.phone),
159
159
  code: params.code,
160
- country_calling_code: String(params.country_calling_code)
160
+ country_calling_code: String(params.country_calling_code),
161
+ action: params.action
161
162
  })
162
163
  },
163
164
  phonePasswordLogin: {
@@ -407,7 +408,8 @@ var defaultConfig = {
407
408
  transformParams: (params) => ({
408
409
  phone: String(params.phone),
409
410
  code: params.code,
410
- country_calling_code: String(params.country_calling_code)
411
+ country_calling_code: String(params.country_calling_code),
412
+ action: params.action
411
413
  })
412
414
  },
413
415
  phonePasswordLogin: {
@@ -328,6 +328,7 @@ export interface CheckMobileCodeParams {
328
328
  shop_id: number;
329
329
  code: string;
330
330
  country_calling_code: string;
331
+ action: string;
331
332
  }
332
333
  /**
333
334
  * 验证码有效性检查响应接口
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "2.1.42",
4
+ "version": "2.1.44",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",