支付:代金券功能

This commit is contained in:
luying
2022-07-11 18:08:00 +08:00
parent b9af56fd07
commit ae369f7bf2
14 changed files with 179 additions and 93 deletions
+2 -2
View File
@@ -57,10 +57,10 @@ export async function savePayLog(order: UserOrderModelType) {
try {
let role = await RoleModel.findByRoleId(order.roleId, 'userInfo roleId roleName serverId');
let params = getParamByRole(role);
let { productID, message: productName, price, localOrderID, orderID, state } = order;
let { productID, message: productName, price, localOrderID, orderID, state, useVoucher } = order;
let dicRmb = gameData.rmb.get(productID);
let isYuanbao = dicRmb.type == ACTIVITY_TYPE.YUAN_BAO_SHOP;
await UserLogModel.createRecord({ type: LOG_TYPE.PAY, ...params, productID, productName, price, isYuanbao, localOrderID, orderID, totalPay: role.totalPay, orderStatus: state });
await UserLogModel.createRecord({ type: LOG_TYPE.PAY, ...params, productID, productName, price, isYuanbao, localOrderID, orderID, totalPay: role.totalPay, orderStatus: state, useVoucher });
} catch (e) {
console.error(e);
}