关卡:星级结算

This commit is contained in:
luying
2021-11-10 16:39:20 +08:00
parent 3b2624bda2
commit b15a9088e8
3 changed files with 19 additions and 14 deletions

View File

@@ -227,16 +227,15 @@ export class orderHandler {
// }
let activityData = await getActivityById(activityId);
if (!activityData) return resResult(STATUS.ACTIVITY_MISSING);
await UserOrderModel.applyOrder(serverId, roleId, productID, localOrderID, orderID, price, payType, activityId, paramStr, message);
let orderInfo = await UserOrderModel.applyOrder(serverId, roleId, productID, localOrderID, orderID, price, payType, activityId, paramStr, message);
//订单成功
let orderInfo = await UserOrderModel.findOrder(localOrderID);
if(!orderInfo) {
return resResult(STATUS.NO_ORDER);
}
let result = await settleOrder(orderInfo, serverId, sid);
orderInfo = await UserOrderModel.success(roleId, localOrderID, result);
orderInfo = await UserOrderModel.success(roleId, localOrderID, JSON.stringify(result));
console.log(`测试支付完成!!!!!!!!!!!!! serverId:${serverId}, productID:${productID}, productType:${productType}, roleId:${roleId}, localOrderID:${localOrderID}, payType:${payType}`)
return resResult(STATUS.SUCCESS, JSON.parse(result));
return resResult(STATUS.SUCCESS, result);
}
}