|
@@ -211,7 +211,7 @@ export class OrderService extends BaseService {
|
|
|
const order = await this.orderEntity.save({
|
|
|
merchantId: merchant.mchId,
|
|
|
channel: channel,
|
|
|
- customer_id: customer?.id.toString(),
|
|
|
+ customer_id: customer?.customer_id,
|
|
|
order_type: 'WITHDRAW',
|
|
|
amount: orderData.amount,
|
|
|
currency: params.currency,
|
|
@@ -774,10 +774,14 @@ export class OrderService extends BaseService {
|
|
|
},
|
|
|
});
|
|
|
console.log(`处理未完成的订单:${orders.length}`);
|
|
|
- for (const order of orders) {
|
|
|
- await this.thawed(order, queryRunner);
|
|
|
- order.status = 'FAILED';
|
|
|
- await this.orderEntity.update(order.id, order);
|
|
|
+ try {
|
|
|
+ for (const order of orders) {
|
|
|
+ await this.thawed(order, queryRunner);
|
|
|
+ order.status = 'FAILED';
|
|
|
+ await this.orderEntity.update(order.id, order);
|
|
|
+ }
|
|
|
+ } catch (err) {
|
|
|
+ console.log(784, err)
|
|
|
}
|
|
|
}
|
|
|
private async thawed(order: OrderEntity, queryRunner?: QueryRunner) {
|