@@ -41,11 +41,20 @@ function formatOrderTime(iso: string): string {
|
||||
}
|
||||
}
|
||||
|
||||
// function formatAmount(n: number): string {
|
||||
// return Number(n || 0).toLocaleString('zh-CN', {
|
||||
// minimumFractionDigits: 0,
|
||||
// maximumFractionDigits: 0,
|
||||
// });
|
||||
// }
|
||||
|
||||
function formatAmount(n: number): string {
|
||||
return Number(n || 0).toLocaleString('zh-CN', {
|
||||
minimumFractionDigits: 0,
|
||||
maximumFractionDigits: 0,
|
||||
});
|
||||
const num = Number(n || 0);
|
||||
// 先保留两位小数,再分割处理
|
||||
const fixed = num.toFixed(2);
|
||||
const [intStr, decStr] = fixed.split('.');
|
||||
const intFormatted = Number(intStr).toLocaleString('zh-CN');
|
||||
return decStr === '00' ? intFormatted : `${intFormatted}.${decStr}`;
|
||||
}
|
||||
|
||||
function amountCssClass(payAmount: number, base: string): string {
|
||||
|
||||
@@ -32,7 +32,6 @@ export class AdminOrdersService {
|
||||
startOfToday.setHours(0, 0, 0, 0);
|
||||
const orders = await this.prisma.order.findMany({
|
||||
where: {
|
||||
payAmount: { gte: 100 },
|
||||
payStatus: 'PAID',
|
||||
paidAt: { gte: startOfToday },
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user