Files
2026-04-21 22:34:39 +08:00

20 lines
720 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BalanceLogHelp = void 0;
class BalanceLogHelp {
static async record(walletBillRepo, params) {
const typeStr = String(params.type);
const isExpense = typeStr.startsWith('9');
const walletBill = walletBillRepo.create({
userId: params.userId,
type: params.type,
before: params.before,
after: params.after,
amount: isExpense ? `-${params.amount}` : params.amount,
remark: params.remark,
});
await walletBillRepo.save(walletBill);
}
}
exports.BalanceLogHelp = BalanceLogHelp;
//# sourceMappingURL=balance_log_help.js.map